Notes, fixes and guides.
Sixteen years of working notes — Linux and networking, Django and Laravel deployment, SwiftUI, AWS. Written down mostly so I can find them again.
iOS: Hide/Show the Status bar in an iPhone/iPad application
Lets see how to change the visibility of the status bar in an iphone/ipad application. The UIApplication class provides a centralized point of control and coordination for applications…
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: 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…
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: 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: Check whether internet connection is available
Here, i am just checking whether network connectivity is available to a server and its done synchronously. You can use Reachability if you need notifications when there is…
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.
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…
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 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: Process an array or a hash inside a Template
Process and array or a hash inside a perl template 10751750046aa67a9be68a3_000047 Enjoy coding! :)
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…