All posts in “Squirt”

Squirt: Why Nielson’s Twitter Numbers Suck

The recent kurfuffle over Twitter’s retention rate according to Nielson is a tad ridiculous. Comparing the 30-40% retention rate to those of MySpace and Facebook at the same stage in life is like comparing Sonics to Marios. The major blogs nailed why this comparison doesn’t make sense – Twitter aggressively shutting down spam accounts – but there is a bit more to the story.

Two things I want to add to the discussion:

  • 1,000 Following/Day Limit – Since Twitter limited ALL accounts to allow only 1,000 new friends a day, the number of spam accounts has skyrocketed.
  • Low Time Investment – Automated systems (which I won’t link to here) can create tons of throwaway spam accounts.

Anyone else want to add to the discussion? Leave a comment (or two).

Squirt: Auto Updating WordPress Plugins

Am I missing something with the auto-updates for WordPress plugins? When I try to do an auto-update, I get a page asking me for the ftp(s) info for my server. I’m expected to:

  1. send ftps info unencrypted through the browser
  2. send my credentials to an untrusted third party
  3. open up my firewall so any ol’ IP can ftps to my server

Right.

Squirt: Follow Me On Twitter

Twitter Stream

I used wordle.net to generate a tag cloud of my twitstream so you can see the kind of stuff I’m blabbering about on Twitter. I’m usually complaining about something or another – The “All Mail” Gmail folder in Mail.app, Frustration with Kindle for iPhone, The App Store – but sometimes I tweet some useful junk like blog announcements or problem fixes.

So follow me!

I’m working on a couple interesting posts here so don’t write me off just yet. You can also subscribe to this blog to get updates.

Squirt: Moving Files Around Using Bash

I needed to copy all files with the string “_1” in them to a separate folder and remove the “_1”. I thought I could pull this with a one liner, but that wasn’t happening. A two liner had to do:

# find . -name "*_1.jpg" -exec cp {} ../xx/ \;
# for file in *_1.jpg; do mv $file "$(basename $file _1.jpg).jpg"; done

A brief explanation of the above.

I usually use find/xargs quite a bit, such as removing .svn directories when I forget to export. This wouldn’t work in this situation, because I needed to use the result of the find as an argument within my next command and the pipe wouldn’t do. So the -exec flag of find will pass the match as an argument that can be used with the syntax {}. The semi-colon denotes the end of the command and I’m escaping it with a backslash. So this reads “find all files in the current directory that end in _1.jpg and move them to ../xx/.”

The second command I ran within the “xx” directory. The basename string manipulation let me strip the _1.jpg from the name, then I re-added .jpg and this is all within the quotes so it comes out as a single file name. So this reads “for every file in this directory that ends in *_1.jpg, rename by removing _1.jpg then adding .jpg to the end.”

I guess this could have been done in one line, but whatever.

Squirt: Finding Hidden Preferences in OS X Applications

When Safari 4 Public Beta came out, there was a mad rush to find the applications hidden preferences. Some used it to bring back the aqua loading bar, others used it to bring back tabs on bottom, and others were just curious. I’m leaving S4PB the way it is because I want to give it a chance to win me over. Here are three ways that I know of to find these hidden preferences.

  1. Right click (control-click) on an application and select “Show Package Contents” from the popup. Open up the Info.plist and see if there is anything interesting to change. Also, it’s fun to poke around the Resources folder, there are all kinds of neato icons and other goodies.
  2. Find all the strings in the application binary. From the command line, run this “# strings /Applications/Safari.app/Contents/MacOS/Safari”. You have to target the binary file and “Safari.app” is just a package (a glorified folder). You’ll get back a bunch of junk, but if you look closely there are gems in there like “IncludeDebugMenu” which you can modify with the “defaults” utility. If you want to turn on the debug menu, you would do “# defaults write com.apple.Safari IncludeDebugMenu -bool YES”, restart Safari and you’ll see the debug menu.
  3. Read the defaults. So run “# defaults read com.apple.Safari” and you’ll get back a bunch of preferences. You can change these by using write or delete. Check out “# man defaults” for all the info.

If you know of other ways, I’d love to hear about them.