blog

[ 08:24 PM on April 08, 2012 ]

[ 09:08 AM on March 30, 2012 ]

My photo log now uploads to dropbox. Code is here.

[ 08:59 AM on March 13, 2012 ]

gist.github.com/2028580 shows twitter updates in batches rather than incrementing the number of new items by 1. By default this number is 10, you can change it via localStorage -- e.g. to see batches of 20 use
localStorage.setItem('batch.number',20)
This will make sure that, for the batch number min, that neither the title bar shows '(N) Twitter' nor is there a display of 'N new Tweets' for N < min.

The question then arises, which more of an act of procrastination: (1) reading twitter or (2) writing programs to reduce time spent doing #1?

[ 01:11 PM on March 11, 2012 ]

I was searching for a Lego set with a traffic light so I could control the light using an arduino. I found this Lego Catwoman Chase set here:

lego-catwoman-chase.png

As it turns out this was the actually second time I've owned this one, but that's not the point. Here is the outcome -- and pretend the wires aren't there, they will eventually not be:



Instructions how to wire this up correctly are here, I'm way to embarrassed of my wiring to show it. The same should be true for the code, but it lives here.

[ 08:19 AM on March 07, 2012 ]

A bookmarklet to toggle twitter time stamps from this:

twitterDates2.png


to this:

twitterDates1.png


gist.github.com/1993030

[ 08:10 PM on March 04, 2012 ]

Made a few changes to the rdio+eventful.user.js userscript including a small change in font that was an oversight and date formatting that both make a little difference -- here's the show list with a little context:

rdio+eventful-new.png


As well as a few scattered bugs, sorting the events by date, and restructuring the code into something marginally maintanable.

[ 08:00 PM on March 04, 2012 ]

I cleaned out my bookmarks:

new-bookmarks-bar.png

Why do I still use bookmarks?

[ 02:14 AM on March 03, 2012 ]

rdio+eventful.user.js is a userscript mashup of rd.io and eventful that displays local events on rd.io artists pages. So, when you're viewing an artist's page and that artist has upcoming shows in your area, a new shows tab:

rdio+eventful2.png

It's placed on the right with the other meta information:

rdio+eventful1.png

Some catches:
  1. In order to register your local city, you have to go to the main page at least once after installing the userscript
  2. The searches are stored in localStorage, so eventhough all the search information is stored domain-specifically, other userscripts will be able to see this information. In all this script stores:
    1. Date of the last search for an artist in a city -- for caching
    2. Search contents
    3. Eventful API key
  3. You have to register an use your own eventful api key and set the value of localStorage['eventful.api.key'] to it -- i.e. localStorage['eventful.api.key'] = key. You can get the key here.

[ 01:09 AM on March 01, 2012 ]

Seinfeld characters.

[ 09:18 AM on February 13, 2012 ]

gist.github.com/1817223 is a userscript that will redirect google queries starting with '!' to duckduckgo. This way you can keep google (or whatever) as your default search engine so that when you type cat in the address bar, google is searched. But, when you type !yt cat, youtube is searched, because this gets forwarded to duckduckgo, which forwards it to youtube. See more about duckduckgo's bang.

I understand one could just change their search engine to duckduckgo and prepend !g to every query on which they want to just use google, but I'd prefer have the default be google (again, or whatever) and then do something different for banged queries.

[ 08:10 AM on January 01, 2012 ]

orangefr.user.js is a userscript to bypass the log in screen for organge.fr wifi.

[ 08:43 AM on December 08, 2011 ]

ycombinator polls is a bookmarklet to add colored histograms to polls at news.ycombinator.org. So, you get

ycombinatorPoll-after.png

instead of just

ycombinatorPoll-before.png

[ 11:53 PM on December 07, 2011 ]

A simple way to show colored android logcat output on another display, if you've run out of graphics cards, like me:
machine1> nc -l 4343 | adb_colorize
machine2> adb logcat | nc machine1 4343

[ 08:54 AM on November 30, 2011 ]

gist.github.com/1409077 is a bookmarklet to monitor a Jenkins build page and alert you of success and failures in the build by playing:
  • The Golden Girls theme when the build fails
  • The Arrested Development theme when the build succeeds
Drag this link to your toolbar:
jenkins
It also shows a little box in the corner with status and lets you force a state, e.g.

jenkins_success.png

jenkins_fail.png

jenkins_non.png

[ 12:54 PM on November 22, 2011 ]

amazonbuy.user.js is a userscript that automates adding items from amazon.com to your cart. For example, when installed you see a little box in the bottom right corner of the screen when visiting the site:

amazonbuy1.png
To add ASINs to the list of items to add, paste them in the text box:

amazonbuy2.png
then click Add:

amazonbuy3.png
Then click Go and all the items in the list will be added to your cart -- you'll see a bunch of page reloads as this happens. And, remember, users use this at their own risk; I'm not responsible for anything done with this script. Keep in mind, unless cleared, all ASINs will be stored in localStorage. Also, other scripts could add to this list.

[ 10:55 PM on October 09, 2011 ]

foursquare map is a bookmarklet to open a foursquare location page in google maps. When you're on a foursquare venue, click this, it will take you to that location in google maps. The original is here.

[ 01:24 PM on October 02, 2011 ]

Apparently I've been busy since February 24th when rdio announced they had a roku app, but it doesn't seem to let you browser by artist -- but does let you see your playlists. So, this will create one playlist for every artist:
gist.github.com/1257664
It uses the latest rdio gem.

[ 01:26 PM on September 03, 2011 ]

plot is a bookmarklet to correlate arbitrary functions to data using google's trends correlate draw. It's catered towards trigonometric ones (since they make nice pretty curves) and translates the input so that a function -- such as Math.sin(y) -- has the origin in the middle-left of the actual graph and domain of .

To use, first you input a function:

gtd1.png

then, that function will be plotted on the canvas:

gtd2.png

then, you can correlate it to some data:

gtd3.png

This is the permalink for the sin-ish function before -- there's some strange behavior towards the end of the graph, so it's not really sin, but I don't think anyone really cares.

A gist of this code is here: gist.github.com/1191495.

This has been tested on sin(y) and cos(y).

[ 11:41 AM on August 29, 2011 ]

gmailtitle.user.js previously just displayed your unread message count in the front of the title, so when the tab titles were truncated one could at least see this count. Now, it allows you to achieve a fake zero inbox. That is, I want the unread message count in the title to show the number of messages I intend to read immediately, not those that are archived and want to remain unread. So, by setting a localStorage value on this page, you can delare a fudge factor of the number of messages that are unread and should not be included in the number in the title. For example, I have 1699 unread messages I want to ignore:



So, I do the following to ignore these messages:

gmailtitle-console.png

And now I have a fake zero inbox:

gmailtitle-zero.png

[ 09:17 PM on August 20, 2011 ]

ebay pages is bookmarklet to allow you to see the first item in every page for a given query on ebay. So, if you searched for ipad sorted by price, you can jump directly into the desired page, rather guessing what the price for a given page is. Here is what it would look like for that query:

ebaypages.js.png Since, I sorted by price, I could then skip into a section for a particular price rather than browsing until I found the section with the prices I want -- each item's link now points to the section page, not the item's page.

ebaypages.js-2.png

A more compelling example would be a query yielding 1000s of results sorted by time left with values ranging from seconds to days, but you were interested in a couple days left. Now, you could jump into this desired range without browing through pages and pages of results. The non-compressed code is here: https://gist.github.com/1159951.

[ 08:44 PM on August 08, 2011 ]

Craigslist Image Preview, which shows craiglist listing images under the posting, now filters out spam and 404 images. This is the current version: craigslist.user.js.

[ 10:50 AM on August 07, 2011 ]

I collected snapshots of the reddit homepage every 5 minutes over a period of about 10 hours starting at around 10pm Eastern on August 6th, and redditvotes shows how pages travel down as time passes. A bar at the nth position with number i indicates that, at the time shown, that url was displayed at position n and started out at position i. Bars of this color represent pages that weren't initially present on the homepage. It's shown below or see the full version.

[ 05:44 PM on August 03, 2011 ]

text links is a bookmarklet to show all the links in text of a page. For example, sometimes a forum page is the top hit to a google search, but that forum (e.g. macrumors) doesn't allow urls in links. So, instead of searching the page manually for these links, this will display them in a box at the top of the page, like this:

textlinks.png

The uninteresting, decompressed code is here.

[ 11:56 AM on August 03, 2011 ]

redditimagebox.user.js is a userscript to open reddit image links in a light box instead of opening another page. Clicking the titles of image links then shows the images like so:

redditimagebox.png

You can close the box with the CLose link or by clicking in the black. The image link still opens the actual link, i.e.

redditimagebox2.png

I find this more convenient than opening an entire new page.

[ 03:51 PM on August 01, 2011 ]

tabtab.user.js allows you to navigate to the main search input by holding down TAB and pressing another key. So, if you've searched for something and scrolled down the page and want to search for something else, you can just hold down TAB and start typing and focus will go to the search input. I first thought that doing this with TAB+1 would be useful, so, when seeing if it wasn't already implemented in a browser or web page I noticed google already did it for TAB + any key. So, I decided that was more useful. Testing includes yahoo, it works with that.

[ 01:26 AM on July 27, 2011 ]

In the same vein of identifying twitter users to follow by looking at who the folks you follow follow, I thought this would be useful for github. So, github following finds the intersection of the users that other users follow -- similar to the same for twitter here. Here's an example using two people I follow.

github-following.png

[ 04:41 PM on June 30, 2011 ]

Here's a little Arduino project to display your Office Communicator status in LEDs controlled over the web. It has two parts:
  1. A little http python server that will (a) server the main page & assets and (b) send status updates to the Arduino.
  2. Javascript on the page served by (1) that accesses the appropriate ActiveX object to receive status updates, and send those to the server.
To use you launch the http server on one machine and open that port (possibly the same, possibly not) to see a page similar to this:

a-ss.png

When working, you'll see that the status and LEDs stay in sink (here the board is plugged into the server machine, and the screen is on a remote machine):

a-green.png

a-yellow.png

a-red.png

The code is on github. I endorse neither it nor my ghetto electrical-enginnering skills displayed here. Oh yeah, this is 100%, totally insecure.

[ 01:09 PM on June 18, 2011 ]

A friend sent a link to this marvelous site that presents some lovely ladies and poses the question of whether each is an anchor woman or porn star...the only problem is that you have to go to another page to see the solution. So, pornstaroranchorwoman.user.js reveals the answer by simply mousing over the pictures, relieving you of the mind-melting suspense of not knowing the answer. Example here is a porn star:

pornstar.png
And, here is an anchor woman:

anchorwoman.png

[ 02:23 PM on June 13, 2011 ]

Java interview question #5:
If the next version of Java contained the keyword, fluffy, briefly describe what its purpose would be.

[ 10:30 AM on June 07, 2011 ]

rdioExplicitLinks.user.js is a userscript to make explicit what is the artist link and what is the album link for self-titled albums in the rdio player. When used, when you mouseover the links in the player you see explcitly what is the artist and what is the album:

radioLinksArtist.png
radioLinksAlbum.png
I'm done with being lost in this maze.

[ 10:44 PM on May 07, 2011 ]

Updated ruby rdio api to reflect these api changes:
  • optional isCompilation field on Album will indicate if the album is a compilation
  • optional isOnCompilation field on Track will indicate if the track is on a compilation
  • optional bigIcon field on Album, Track and Playlist
  • optional trackKeys on Playlist (sorry, that missing was just an oversight)
  • optional isTrial, isSubscriber & isUnlimited fields on the current User indicating the user's subscription state.

thongs in court

[ 01:46 PM on April 26, 2011 ]

thongs-iphone.png

I stand by you, as always, mighty iphone.

[ 10:14 AM on April 26, 2011 ]

I never seem to check njtransit.com before leaving in the morning, so here is a script to set up as a cron job to send emails when there are problems with the trains.

[ 02:28 PM on April 24, 2011 ]

gmailtitle.user.js tries to make the gmail window title somewhat more useful by putting your inbox count in the front:

gmailtitle-after.png

instead of towards the back.

gmailtitle-before.png

[ 09:31 AM on April 15, 2011 ]

Here is a bookmarklet to inline the images you've viewed in your chrome history:
chrome history images
Clicking it will change your history from this

chrome-history-images-before.png

to this:

chrome-history-images-after.png

[ 02:34 PM on April 10, 2011 ]

following is a little twitter app to find the intersection of the users other users follow. The idea being this: If you follow two people because of a similar reason -- e.g. they've done something cool, not they both tell good dick jokes, it's likely you'll want to follow the people they both follow. That's what this does, granted it could and will probably do it better in the future. Here's a little shot showing two people (paulg and bramcohen) I follow and the people they both follow.

twitter-following.png

Due to rate-limiting, there's a good chance this make not work if you try it. That should probably be addressed.

[ 11:05 PM on April 05, 2011 ]

Lego spudtrooper.

spudtrooper-lego-small.png

[ 09:29 PM on March 19, 2011 ]

treerepl is an attempt to abstract github repl a bit and to find something useful with which to test ruby rdio API. There are two examples here now
The idea is to feed a Repl instance enough information to allow you to navigate a web API's data like a file system, which usually includes additional commands and a tree model.

[ 07:17 PM on March 12, 2011 ]

rdiorb is a work-in-progress ruby implementation of the rd.io API. As of right now, it passes the following test case:
  key = <RDIO_KEY>
  secret = <RDIO_SECRET>
  r = Rdio::Api.new key,secret
  user = r.findUserByEmail 'jeff@jeffpalm.com'
  'Jeffrey' == user.first_name
  'Palm' == user.last_name
In the future, it will pass more.