Month: May 2010
My Attempt at Humor
How to Create a Pinned Cygwin Icon in Windows 7
When you install Cygwin, it creates a shortcut to the Cygwin.bat file that resides in the installation directory. But if you try to pin it to the Windows 7 taskbar with drag-and-drop, it won’t work. Here’s how you can do it:
- Right-click on the desktop, and in the context menu, select New->Shortcut.
- In the dialog box, enter the location of the shortcut item. If Windows and Cygwin are installed in the default locations, it will be something like:
- Click “Next”. Enter “Cygwin” for the shortcut name. An icon with the C:\ command prompt will appear on your desktop.
- Right-click the icon and view Properties. Click the “Change Icon…” button. Browse to the Cygwin installation directory and select Cygwin.ico.
- Double-click the new desktop shortcut and make sure the Bash shell appears. Right-click the icon in the taskbar and select and select “Pin this program to the taskbar”. You’re done!
C:\Windows\System32\cmd.exe /c C:\cygwin\Cygwin.bat
Alternatively, you could just run cmd.exe, pin it to the taskbar, and edit the properties to run Cygwin.bat while it’s pinned. But then you would not be able to alter the icon as easily.
Facebook’s Official PHP Client Library Moves to New Location, now PHP SDK
Joyent, a Web hosting company, is offering free Facebook app hosting for one year. So far my experience with it has been pleasant, but I’m not sure how I’d be faring without plenty of prior experience building Web apps.
Joyent supports Ruby on Rails, PHP, and Python for Facebook development. I decided to follow the path of least resistance and go with PHP, since they support it “Out of the Box”. I got a “Hello World” app running out the gate quickly, but when I tried to install the Facebook Client library, I ran into trouble.
The developer wiki on Joyent’s site wants you to go to a Subversion repository on Facebook, but the link is dead so their instructions fail. Facebook’s dev Wiki, on the other hand, links to GitHub.
To make it work, I logged into my Joyent account via SSH and ran these commands:
cd ~/web mkdir php cd php curl http://download.github.com/facebook-php-sdk-v2.0.2-0-gdffbcde.tar.gz 2>/dev/null |\ gtar -xzf - --strip-components=2 'facebook-php-sdk-94fcb13/src/facebook.php'
(I got the URL for the gzip file by navigating to http://github.com/facebook/php-sdk/downloads, clicking the most recent tgz link, and noting the download location in the Firefox download dialog. I’m sure there are easier ways to do this.)
Then you’ll get a php directory with the facebook.php file, and you can include it in a script in your public directory like this:
require '../php/facebook.php'; ?>
Note: I just took a peek at Facebook’s wiki history and I can see that they updated this on April 29th (3 days ago). Also, it looks like the name has changed from “Facebook Client library” to “Facebook PHP SDK”.