Skip to content
Writing

Notes, fixes and guides.

Sixteen years of working notes on Linux and networking, Django and Laravel deployment, SwiftUI and AWS. Written down mostly so I can find them again.

iOS Jun 17, 2012 1 min read

iOS: Change the Orientation of the Status Bar

Lets see how to change the orientation of the status bar programmatically in an iphone/ipad application. There are four orientations: Portrait, PortraitUpsideDown, LandscapeLeft, LandscapeRight. The…

iOS Jun 11, 2012 1 min read

iOS: How to get App’s Version number (CFBundleVersion)

  Recently, i had to make an update to one of my apps. I was trying to figure out a way to see if all the users have…

General Jun 7, 2012 1 min read

Asianet(ISP) now showing Interstitial ads (intad.pag2p.co) along with their javascript injection.

  Asianet had been injecting javascript code to each webpage requested, for the past three months now. Now, they have started showing interstitial ads. When you type in…

iOS May 4, 2012 1 min read

iOS: NSNotificationCenter – broadcast information within a program

An NSNotificationCenter object (or simply, notification center) provides a mechanism for broadcasting information within a program. An NSNotificationCenter object is essentially a notification…

iOS Apr 28, 2012 1 min read

iOS: Check whether internet connection is available

Updated for 2026: this tutorial is from 2012. For a current version in SwiftUI, see SwiftUI: Check Internet Connection with NWPathMonitor. Here, i am just checking whether network…

Android Apr 19, 2012 1 min read

android.os.NetworkOnMainThreadException due to StrictMode.ThreadPolicy

StrictMode.ThreadPolicy was introduced since API Level 9 and the default thread policy had been changed since API Level 11, which in short, does not allow network operation (include HttpClient and HttpUrlConnection) get executed on UI thread. if you do this, you get NetworkOnMainThreadException.

General Mar 31, 2012 1 min read

Remove ui.streamride.net ads injected by ISPs (Asianet in my case)

Read it full here : Asianet(ISP) injecting javascript code(ads) in every webpage requested by the customer Here asianet(ISP) is injecting a javascript code into a website without the…

General Mar 31, 2012 1 min read

Asianet(ISP) injecting javascript code(ads) in every webpage requested by the customer

Update: Asianet(ISP) now showing Interstitial ads (intad.pag2p.co) along with their javascript injection.   Some of you out there, using Asianet, might have noticed that an ad is shown…

iOS Mar 24, 2012 3 min read

iOS LOGIN Screen Tutorial with Server Authentication – JSON – PHP

This tutorial will guide you to create a simple app with a Login screen which takes username and password from the user and then posts it to a url and parses the JSON response form the server.

PERL Mar 17, 2012 1 min read

Perl: Process an array or a hash inside a Template

Process and array or a hash inside a perl template 14190980886adb5aef4dc19_000045 Enjoy coding! :)

Rails Feb 6, 2011 1 min read

RubyOnRails: Create a Controller and Views for it using a single command

Lets create a controller named 'home' with  views 'index', 'view2' view3'. Fortunately, you can do that in a single command. Enter this command in your terminal: $ rails…

Magento Jan 17, 2011 1 min read

Magento: Check if an admin is logged in or not

If you are writing a custom module, and you want it to be accessed only by admins, then you possibly need the following code in your controller. 14190980886adb5aef4dc19_000046