Archive for May 2009

Greasemonkey script: Facebook Reorder Sidebar

Hate scrolling down to see birthdays on Facebook? I just wrote a quick user script to reorder the parts in the sidebar on Facebook’s homepage.

Before: Requests, Suggestions, Sponsored, Highlights, Events/Birthdays, Connect
After: Requests, Events/Birthdays, Suggestions, Highlights, Sponsored, Connect

Step 1: install Greasemonkey (Firefox) or GreaseKit (Safari), and restart your browser
Step 2: install my Facebook Reorder Sidebar userscript
Step 3: visit Facebook and enjoy :)

Google I/O Keynote 2009, day 2

Google I/O 2009 Keynote, Day 2
4/28/2009

Google Wave – Product, Platform, and Protocol

  • Attempt to answer “what would email look like if it was developed today”
  • Combines Gmail, Translation, collaboration via Google Docs, Photos, etc., all in one
  • Because it is completely open, companies can host their own instances of Wave and Google never has to see the data – yet the users of separate platforms can still communicate with each other!

TechCrunch coverage
Google Wave
Google Wave APIs
Google Wave Protocols

I’m looking forward to WordCamp this weekend.  I’m curious to see if there will be any WordPress / Google Wave integration already.  Being able to have blog comments automatically pushed to users who aren’t actually looking at your blog would be a huge win.  If there’s no WordPress integration project already, I may just start one.

Notes from Google I/O Keynote 2009, day 1

Google I/O Keynote

Wednesday 5/27/2009

San Francisco, CA #io2009

Better liveblogging here: http://www.techcrunch.com/2009/05/27/live-from-google-io-2009/

100x improvement in JavaScript speed in the last decade

Firefox, Chrome, Safari, & Opera – all supporting HTML5 with Canvas, Video, Geolocation, App cache / database, Web workers

Canvas tag – supported in all but IE

Bespin – web IDE

Chrome profiler is built completely in HTML5

O3D – OpenSource 3d in JavaScript

Video tag – get video out of “plugin prison”

YouTube demo with <video> tag

Geolocation – supported in all browsers but IE

Mozillia VP – “A good API in 4 browsers is better than a perfect API in 0 or 1 browsers”

Google Maps will soon be adding a geolocation button

Announcement: Google Latitude on the iPhone in the browser using geolocation (WOW)

App cache / database – supported in all browsers but IE

Demo: with Safari – manifest file names cached application/graphics files

Demo: web app on Android with GMail in airplane mode – extremely fast

Web workers – threads in the browser – so JavaScript doesn’t completely freeze the browser

Demo: motion detection from the video tag all in JavaScript

===

Google App Engine

200,000+ developers, 80,000 + applications

Whitehouse app had 700 requests/second with no problem

Announcement: Java open on App Engine

Demo: develop an Ajax app in Eclipse (with Google plugin) in Java on both serverside (app engine) and client side (GWT) extremely quickly.  Just hit deploy (no FTP) in Eclipse.

Google Web Toolkit

Upcoming: Debug directly in any browser

Upcoming: runAsync() lets the compiler split up JavaScript files.  Example: 1.4MB to 200KB, compiler handled dependencies itself.

===

Google Web Elements (announcement)

Copy and paste website content:

Calendar, Conversation, Custom Search, Maps, News, Presentations, etc.

===

Android – coming soon new features

FREE ANDROID for everyone!

Standalone icons for Prism & Fluid: Gmail, GCal, & Wave

Today I tried Mozilla Prism (cross platform) and Fluid (mac only), both of which are used to create single-site browsers (SSBs).  I especially wanted to use them for GMail and Google Calendar since those are the two web apps I consistently have open in a tab at all times.

I’m still playing with them both but the first thing I realized was that they would have to do better than use the 16×16 favicons.  I was able to extract the official high resolution Google icons from the Google Gears desktop shortcuts for GMail and GCal, so they are attached.  These will work for Fluid.  For Prism, you’ll have to use the PNGs attached.

Later I found Chris Ivarson’s page with some great icons, but my first couple Google searches didn’t lead me there, and he doesn’t have the standard icons that come from Google.

Edit 1: By the way, I have chosen Fluid because its icon shows me my number of unread messages so I can keep it hidden when I don’t have new mail… very helpful.

Edit 2: By popular request, I just added a Fluid icon for Google Wave also

Attachments: gcal.icns gmail.icns google_wave.icns

gcal.png

gmail.png

google wave fluid prism icon

WordPress Plugin: Arbitrary Shortcodes

For a new project, I’m working on launching a large number of very similar WordPress installations with minimal effort. I needed a way to have WordPress automatically parse some kind of template tag or shortcode (like “[client_name]”) across all the different pages on the site. Not only that, I needed the field’s values to be easily updated in one place, and there would be an arbitrary number of shortcodes.

So I wrote my first WordPress plugin…

Here’s a description of it:

This plugin allows you to write your page content like this: “Contact our company, [company_name], by email at: [email].”

Text with these shortcodes can be defined on any number of pages throughout your site.

The values of all of the shortcodes are controlled in a single location: the Custom Fields of your blog’s home page. For the above example, there would be Custom Fields on the home page called “company_name” and “email” with the values, respectively, of “Example Company Name” and “info@example.com”.

This plugin requires that you have WordPress set to show a static Page on the home page under Settings->Reading and “Front page”.

So then, for all the custom fields entered on the home page, this plugin looks for shortcodes (in all pages) and replaces each of their values, upon output, with the relevant custom field value.

This is useful for if you want to fill many pages with text that includes an arbitrary number of shortcodes or template text and have all the values can be replaced in one place.

You can download it from the plugin page, or just grab the SVN.

Random WordPress notes:

  • I highly recommend always installing WordPress by svn – it’s easy (faster than uploading) and makes updates a breeze.  If you want to get fancy, you can also install your plugins by svn through svn:externals.
  • If you want to make the process go really quickly, take a look at wp-create.sh.  I’m using this (plus other tools) to setup WordPress installations in no time.
  • I just found out about /wp-admin/options.php for the first time – very handy way to see/edit all saved options at once.
  • I also just registered for WordCamp 2009 in San Francisco… looking forward to it!