Tag: Programming

Quick Update – Play Button iTunes Patch

OS X El Capitan has been released, and my iTunes Play Button Patch is not compatible with it because of the new System Integrity Protection (SIP) that restricts any user (even root user) from modifying any system files. You can get around this by temporarily disabling SIP, applying the patch and then re-enabling SIP. I feel like this is not a good solution because it is cumbersome and it will likely have to be redone every time iTunes is updated (something needed by the existing method as well).

So, what’s the alternative? I have used Vox music player on and off, and I noticed that it has a preference pane which works with El Capitan and accomplishes the same goal with a different approach. I believe they use a background service that listens for the key and handles it, if configured. I feel like that’s a better approach to this problem and properly deals with the SIP restrictions that Apple has added to OS X El Capitan.

I am new to OS X service programming so I am going to research and see if I can learn about it to address this need. This will likely also address the enhancement request that many folks have submitted to allow control from other devices.

Play Button iTunes Patch GUI App is Live!

Play Button iTunes Patch GUI app is live!

Read full post...

Play Button iTunes Patch GUI App Almost Ready to Go Live

Play Button iTunes Patch GUI app is almost ready to go. You can download the beta version from the project page. Source code is in the gui branch.

The new interface

Migrating Play Button iTunes Patch to a GUI App

I am working on migrating the Play Button iTunes Patch to a GUI app. Here is a sneak peak of what it looks like so far. You can see the source code in github.

This has been an interesting project because I have had to learn about elevated privileges in OS X, which apparently isn’t a very common use case. I am hoping that this version will be simpler and minimize the xcode command line tool installation.

Alpha Version

Play Button iTunes Patch DOES work on OS X Lion

After some research I am concluding that my Play Button iTunes Patch DOES work on OS X Lion. The patched file is replaced by the upgrade process so you will have to re-run to patch the latest file.

Please let me know if you experience otherwise.

2011-08-18 fa: Users have confirmed that the patch works OK in OS X Lion.

Executing a lot of SQL queries with Django’s db API? Watch out for one thing.

I recently had the need to write an indexer that processes a lot of text files and creates a huge number of database rows (19 million+). This is a background script for an internal django website so I ended up using the standard django psycopg2 library, but tried to minimize the overhead by executing queries directly using the db cursor. Even after this consideration and special ‘del’ statements to clean things out after regular intervals, to my surprise, the process was still taking up a lot of memory. So, I tweeted about this experience. Daniele Varrazzo, one of the authors of psycopg2, tweeted back with more info.

Read full post...

Subtle details

I love it when I see programmers and designers going above and beyond and paying attention to the small details. One feature that recently caught my eye were the browser icons (or favicon) used by Google Calendar (and Gmail).

Gmail and Google Calendar conveying useful information through their favicon

Note how the blue Google Calendar icon actually has today’s date instead of some random number. Left of it is the Gmail icon showing the unread mail count. In order to get this functionality in Gmail you have enable the “Unread message icon by Manu C.”

Google folks, keep up the good work! 🙂

Wake-on-LAN for WebOS update

Personally I have moved on to Android based cell phone from WebOS/Palm Pre, but I am still trying to keep my Wake-on-LAN (WOL) for WebOS application up to date. Previously it was based on a Java service, which isn’t compatible with WebOS 2.0. So, I have recently rewritten the backend WOL service be a node.js based service that is compatible with WebOS 2.0. Unfortunately, I am facing a few issues with the new model that I have started working through on the Palm Developer forums. Chime in if you can! 🙂

I am hoping to publish this as a free app on the market once I get some of these kinks worked out. Also, source code for this app is now available on google code.

code 400, message Bad request version

Lately I have noticed that I kept getting a 400 bad request when doing django development (i.e. using runserver) and browsing through Google Chrome. It was only Chrome that was behaving this way because Firefox would browse without generating any of these errors on the server side.

[09/Nov/2010 00:31:53] "GET /acq/ HTTP/1.1" 200 1393
[09/Nov/2010 00:31:53] code 400, message Bad request syntax ('\x16\x03\x00...')
?????????...." 400 -???8 .....?????
[09/Nov/2010 00:33:39] "GET /acq/ HTTP/1.1" 200 1393

I finally took a few minutes to debug. After clearing the cache and browsing data as suggested by many sites and having no luck I started disabling all of the extensions that I had installed. Guess what? The error disappeared.

This issue was being caused by the Secure Sites extension which lets you use secure versions of the site if one is available. In order to figure out whether a secure version is available it does an extra request, and it is this extra request that was causing the problem.

What’s the solution? I went into the options for this extension and added localhost to “Assumed no secure version exists” and the error disappeared.

Wake-on-LAN for WebOS (Palm Pre)

I recently published the Wake-on-LAN client for webOS (used by Palm Pre and Pixi) and finally got a chance to create a video showing how it works. You can see it below. I had to write a Java dbus service to accomplish this functionality so, unfortunately, this won’t be showing up in the Palm app catalog, but you can install it using Preware. For more information checkout the WoL project page.