Written by Dave on Sun, Sep 6, 2009 at 3:19am
Filed under Social Engineering, iPhone
Facebook’s iPhone app seems to integrate with the Facebook Platform using the same rules that other applications must follow. After you sign in to the iPhone app for the first time, a corresponding Facebook app, Facebook for iPhone, is automatically granted access to your profile.
There is nothing unusual about this; Facebook is merely playing by their own rules. But there is an interesting side effect.
Facebook is a social platform, so all application pages allow you to list other friends using that app. Facebook for iPhone, the Facebook counterpart for the iPhone app, is no different.
These are all your Facebook friends who use (or once used)…
It is worth noting that the Facebook for iPhone app remains in your profile until you explicitly remove it, so results may be misleading. (After all, how would Facebook know that your iPhone fell into the toilet, when you may simply not have run their app for a long time?)
If any of this bothers you, breathe deeply… then get off the internet.
And my lawn.
Written by Dave on Mon, Aug 17, 2009 at 4:59pm
Filed under OS X
Accessing the OS X clipboard (or “pasteboard”) from the CLI is made simple with the pbcopy and pbpaste commands:
cat ~/ confidential_information.txt | pbcopy
pbpaste > confidential_information.txt
The pbcopy/pbpaste manpages have more detailed information about their use.
An interesting footnote to OS X’s clipboard system is that there are actually four pasteboards, each assigned to its own, unique purpose. The Find clipboard is particularly useful because it enables search queries to be saved automatically between applications. To test this, enter a string in (for example) Firefox’s search box. Don’t copy it to the clipboard. Now open your text editor and start a new search. The same string should already be in the dialog box…
Written by Dave on Sat, Feb 7, 2009 at 12:04am
Filed under Google, OS X
As many have noted, recent Google software releases for OS X now include Google Software Update, a background daemon that checks for and installs updates to Google software with no user intervention and no option for disabling it.
In theory, GSU is removed automatically when the last Google software to utilise it is uninstalled from your computer… but this assumes that you use the uninstallers bundled by Google, and don’t attempt to remove the software by hand.
I’ll save my disappointment for another editorial.
Instead, here is a workaround:
sudo rm /Library/LaunchAgents/com.google.keystone.agent.plist
sudo rm /Library/LaunchDaemons/com.google.keystone.daemon.plist
sudo rm /Library/LaunchDaemons/com.google.keystone.daemon4.plist
sudo touch /Library/LaunchAgents/com.google.keystone.agent.plist
sudo touch /Library/LaunchDaemons/com.google.keystone.daemon.plist
sudo touch /Library/LaunchDaemons/com.google.keystone.daemon4.plist
sudo chmod 000 /Library/LaunchAgents/com.google.keystone.agent.plist
sudo chmod 000 /Library/LaunchDaemons/com.google.keystone.daemon.plist
sudo chmod 000 /Library/LaunchDaemons/com.google.keystone.daemon4.plist
This hint does not uninstall GSU – it only “disables” the launchd entries that would run GoogleSoftwareUpdateAgent.app at boot time.
We first remove each entry (sudo rm …) and create empty files (sudo touch …) in their place. We then change their POSIX permissions (sudo chmod) to deny any access to these files (000) for all accounts except root.
Creating inaccessible dummy files is important. Without them, the launchd entries can simply be replaced whenever Google software is run. But with these steps taken, no Google app can reinstall the GSU launchd entries, unless they:
- ask for your username and password (to authenticate as root),
- use different filenames, or
- create local launchd entries (~/Library/Launch[…])
This hint is easily adapted for each of these cases. You can also use this technique to remove GSU completely.
Written by Dave on Fri, Feb 6, 2009 at 3:31am
Filed under OS X
By default, Leopard Server disables Spotlight indexing on its system drive.
I assume that this decision was made to avoid confusion when administrators search the global catalog for system files on other machines. However, I find this to be a hassle when I need to locate a file on the server itself.
You can easily include a server’s local drives in its Spotlight index using mdutil:
sudo mdutil -i on /
The same command can be reissued with the off parameter to reverse the change.
Written by Dan on Tue, Dec 16, 2008 at 9:45am
Filed under OS X, iTunes
The recent post on TUAW about streaming your iTunes library over the internet inspired me to stop using SimplifyMedia and to roll my own solution. The downside was that I found that the software TUAW linked to did not consistantly work. Worse was that the Mac specific version of the application did not work on Leopard.
I compiled a fresh version of the application that works on Leopard. Its much nicer than the generic Java version. When you run it you’ll notice a new icon in your menu bar.

Click on it and you will be able to set up the hosts as they describe in the directions at TUAW.
Download RendezvousProxy for Mac.
Written by Dave on Thu, Dec 11, 2008 at 10:53pm
Filed under CSS, JavaScript
IE 6 famously lacks support for CSS 2.1’s max-width and max-height properties. Most solutions involve an IE 6-exclusive expression(…) with an inline conditional:
max-width: 100px;
width: expression(this.clientWidth > 102 ? "100px" : "auto");
Despite the apparent success of this technique, I’ve still found the inline conditional to be intermittently problematic. A slightly different take on the same solution has worked better for me:
max-width: 100px;
width: expression(Math.min(this.clientWidth, 100) + "px");
Shorter, and IMO, marginally more elegant… if any IE hack could bear that label.
Written by Dave on Thu, Nov 6, 2008 at 2:02am
Filed under OS X
Two among OS X’s more underutilised CLI tools are mdls and mdfind.
These both query the detailed metadata in Spotlight’s database (hence the md prefix). The first command will return all the attributes of a file or directory. The second will find all files that match a given attribute query string. O’Reilly’s MacDevCenter has an article detailing advanced use of these commands.
The first example uses Apple’s afplay, but since the AudioFile API seems to be incapable of understanding its own DRM (*.m4p), the second example uses qtplay from MacPorts.
Given the pervasive nature of Spotlight’s metadata, the possibilities are vast. Hint: SSH and “&”.
Written by Dan on Tue, Oct 28, 2008 at 9:34am
Filed under OS X
TextMate makes sure that the project you are working on has an up to date file list. One of the ways that it does this is by scanning the directory tree of your project every time TextMate regains focus. This is usually good. However, when working with large projects or a project based on file server via NFS or CIFS, TextMate can take seemingly forever to actually regain focus when switching back to it from another application.
Luckily there is ReMate, which gives the ability to disable the project refresh feature. This option is added under the Window menu and also if you right click on any file inside a project there is a new menu item in there called Refresh All Projects.
Written by Dan on Wed, Oct 22, 2008 at 7:30pm
Filed under OS X
The newer Blackberry models all have media players installed on them out of the box. I recently started using a Blackberry Curve and wanted to transcode some of my podcast videos I download to watch on the bus.
ffmpegX handles this conversion well. You’ll need to use the following settings for the transcoded video to work on a Blackberry.
These are the important settings for the video to work.
- Video Codec: MPEG4 (MP4) (ffmpeg)
- Video Bitrate: 600–800 kbit/s (higher bitrates will lead to stuttering)
- Video Size: 320×240
- Autosize: 4:3
- Audio Codec: AAC (MOV/MP4/3GP)
- Audio bitrate: 96kbit/s
- Sampling: 44100Hz
To save everyone time, I saved these settings to a ffmpegX preset file.
Written by Dan on Wed, Oct 22, 2008 at 7:31am
Filed under Ruby
I generally code in python and am used to the default features of the ipython interactive python shell. One of the features that I use a lot is tab completion. It helps me locate method names and also just do exploration inside modules that are new to me.
Wirble is a gem for ruby that enhances the irb interactive ruby shell to have tab completion, syntax coloring, and a few other irb tweaks that I haven’t looked in to yet.
Its pretty easy to install wirble on most unix systems with ruby gem support installed:
gem install wirble
Then, add the following lines to your ~/.irbrc
require 'rubygems'
require 'wirble'
require 'irb/completion'
Wirble.init
Wirble.colorize
Next time you start up irb save typing using tab completion and relax your eyes using the syntax coloring.