tech notes

by Jacob Friis Saxberg

Rdio signup howto from outside US

  1. Get and install the Tor Browser Bundle (We need Tor, Vidalia, Firefox, and Torbutton).
  2. Start Vidalia.
  3. On Firefox Torbutton click Toggle Tor status.
  4. Click View the Network in Vidalia.
  5. Memorize nicknames of US relays.
  6. Click Settings, choose Advanced and Edit current torrc.
  7. Insert nicknames comma separated after ExitNodes (ExitNodes nickname1, nickname2).
  8. Insert this line somewhere: StrictExitNodes 1.
  9. Click Use a New Identity.
  10. Goto rdio.com and sign up.

Connect with me here.

When using iDefrag make sure you turn your screen brightness down before you reboot to keep the disks cooler.

Git: How to upgrade from a remote branch

git fetch [remote]

git merge [remote]/[branch]

Amazon CloudFront with Custom Origin via Cyberduck

It took me some time to figure out how to enable Custom Origin in order to utilize Origin Pull on Amazon CloudFront via Cyberduck, although I tried this and even that, so I thought I would share how I made it work.

  1. Create a CloudFront distribution.
  2. Create a S3 bookmark in Cyberduck. Use your Origin Bucket hostname as server.
  3. Edit the bookmark XML file.
    On a Mac it’s around here: Library/Application Support/Cyberduck/Bookmarks
  4. Add <key>Web URL</key><string>http://YourCustomOrigin.tld/</string> inside <dict>.
  5. Connect to the server and select the Distribution (CDN) panel from the Info window.
  6. Enable Enable Amazon CloudFront distribution.
  7. You’re done.

FastCGI Process Manager as a Service Management Facility

Here’s how to get FastCGI Process Manager (PHP-FPM) to work with Service Management Facility (SMF) on Solaris.

git clone git://gist.github.com/888451.git php-fpm
svccfg import php-fpm/php-fpm.xml

Clone it here.

Git clone and your submodules

After git clone don’t forget:

git submodule init
git submodule update

Pretty print JSON via command line

curl http://api.twitter.com/1/users/show/webjay.json | php -r "print_r(json_decode(fgets(STDIN)));"

CakePHP 1.3 currently only supports SimpleTest 1.0.

1.1 will give you Call to undefined method CakeHtmlReporter::SimpleReporter().

How to get PID from a photo on Facebook

  • Goto photo album
  • Copy id from url
  • Goto photos.getAlbums
  • Enter id in uid
  • Get the aid from the album where the image is in
  • Goto photos.get
  • Enter aid
  • You should now be able to get the pid