blog
[ 08:10 AM on January 01, 2012 ]
[ 08:43 AM on December 08, 2011 ]
instead of just
[ 11:53 PM on December 07, 2011 ]
machine1> nc -l 4343 | adb_colorize machine2> adb logcat | nc machine1 4343
[ 08:54 AM on November 30, 2011 ]
- The Golden Girls theme when the build fails
- The Arrested Development theme when the build succeeds
jenkinsIt also shows a little box in the corner with status and lets you force a state, e.g.
[ 12:54 PM on November 22, 2011 ]
To add ASINs to the list of items to add, paste them in the text box:
then click Add:
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 ]
[ 01:24 PM on October 02, 2011 ]
gist.github.com/1257664It uses the latest rdio gem.
[ 01:26 PM on September 03, 2011 ]
To use, first you input a function:
then, that function will be plotted on the canvas:
then, you can correlate it to some data:
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 ]
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:
And now I have a fake zero inbox:
[ 09:17 PM on August 20, 2011 ]
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.
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 ]
[ 10:50 AM on August 07, 2011 ]
[ 05:44 PM on August 03, 2011 ]
The uninteresting, decompressed code is here.
[ 11:56 AM on August 03, 2011 ]
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.
I find this more convenient than opening an entire new page.
[ 03:51 PM on August 01, 2011 ]
- A little http python server that will (a) server the main page & assets and (b) send status updates to the Arduino.
- Javascript on the page served by (1) that accesses the appropriate ActiveX object to receive status updates, and send those to the server.
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):
The code is on github. I endorse neither it nor my ghetto electrical-enginnering skills displayed here. Oh yeah, this is 100%, totally insecure.
And, here is an anchor woman:
If the next version of Java contained the keyword, fluffy, briefly describe what its purpose would be.
- optional isCompilation field on
Albumwill indicate if the album is a compilation - optional isOnCompilation field on
Trackwill indicate if the track is on a compilation - optional bigIcon field on
Album,TrackandPlaylist - optional trackKeys on
Playlist(sorry, that missing was just an oversight) - optional isTrial, isSubscriber & isUnlimited fields on the current
Userindicating the user's subscription state.
thongs in court
[ 01:46 PM on April 26, 2011 ]
I stand by you, as always, mighty iphone.
[ 10:14 AM on April 26, 2011 ]
[ 02:28 PM on April 24, 2011 ]
instead of towards the back.
[ 09:31 AM on April 15, 2011 ]
chrome history imagesClicking it will change your history from this
to this:
[ 02:34 PM on April 10, 2011 ]
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 ]
[ 09:29 PM on March 19, 2011 ]
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 ]
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_nameIn the future, it will pass more.
[ 12:15 AM on March 08, 2011 ]
Then, I could list the users I follow
and chose someone I follow -- e.g. fberger -- and list his repositories.
Finally, choosing one of his repositories -- e.g. ilist -- and clone it.
You can see all the commands by typing help:
[ 02:00 AM on February 28, 2011 ]
[ 12:48 PM on February 27, 2011 ]
gist.github.com/846362
[ 12:31 AM on February 20, 2011 ]
I'm, of course, deeply grateful for every message I received today, I just like automating things. It came from facebook-birthdays.js.
[ 11:04 PM on February 17, 2011 ]
When installed, when you view this page a search link appears near the one on the right:
It also appears on its main page:
When you click one of these links, you get a certain retailers page for this album:
Of course, this is in no way affiliated with either rd.io or this retailer.
[ 02:00 PM on February 13, 2011 ]
shdoc command. The idea is that you
include inline documentation for shell functions that are created on
login -- like rdoc, javadoc, ...
For example, I include a file
~/.functions that is
included when I log into a shell, and this file contains the following
definition:
# Groups the output of wireshark packets into single blocks
# @example sniff "ip src facebook.com" | group_packets
function group_packets() {
awk -F" " '/^$/ {print} /^[0-9a-f]{4}/ {printf("%s",$2)}'
}
When I run shdoc.rb on this file, I can now use man to see what group_packets does. e.g.
I get the following:% man group_package
This uses an example, but you can also add parameters for options, for example, consider this function:
# Run tshark on "en1"
# @param options shark options
function sniff() {
tshark -i "en1" "$@"
}
then
gives me the following:% man sniff
This is a work in progress, and by default all the files are written to
~/man/man1, but say you have a file
named .functions that is run on start up, then I would
copy shdoc.rb to ~/bin and add the following to
my start up script:
export MANPATH=$MANPATH:$HOME/man
if [ -f ~/.functions ]; then
source ~/.functions;
if [ ! -f ~/bin/shdoc.rb ]; then
wget --no-check-certificate \
https://github.com/spudtrooper/shdoc/blob/master/shdoc.rb \
-o ~/bin/shdoc.rb;
fi
chmod +x ~/bin/shdoc.rb
ruby ~/bin/shdoc.rb .functions;
fi
[ 09:20 PM on February 12, 2011 ]
So, whenever you visit a recipe on this site, you'll get an improved title:
improved ingredients:
and improved directions:
to make any recipe a rooster sauce recipe.
[ 03:00 PM on February 12, 2011 ]
tshark -i "en1" -x -f "ip src pandora.com" | \
awk -F" " '/^$/ {print} /^[0-9a-f]{4}/ {printf("%s",$2)}' |\
perl -n -e 'm/<artistExplorer[^>]+name="([^"]+)"/ && ($n=$1) ||\
($n=~s/\s+/%20/g) && \
print "http://www.rdio.com/#/search/$n/artists/\n"'
So, when you are listening to an artist in pandora for whom you'd like
to search in rd.io, just click the more recent link in the terminal.
A few notes:
tsharkshould point to thetsharkbinary of Wireshark. If it's not pointed there, this won't work. If you don't have Wireshark installed, also, this won't work- I'm using
en1as my interface, you may want to change this
[ 12:50 PM on February 06, 2011 ]
[ 11:38 AM on January 31, 2011 ]
ls as a tree, e.g.
% ls_tree [suess] lorax.txt [websockets] [websockets/client] client.php socket.js readme.txt [websockets/server] socket.class.php socketWebSocket.class.php socketWebSocketTrigger.class.php startDaemon.phpThat's it.
[ 09:22 AM on January 31, 2011 ]
rdioLike so.
It came from rdio.js.
[ 07:28 PM on January 23, 2011 ]
| Name | Age | Favorite Donut |
|---|---|---|
| Joe | 19 | Glazed |
| Suzy Q | 45 | Strawberry-filled |
| Bob | 25 | I hate donuts |
We would construct this by the following:
t = Table.from_array([[ 'Name', 'Age', 'Favorite Donut'],
[ 'Joe', 19, 'Glazed'],
['Suzy Q', 45, 'Strawberry-filled'],
[ 'Bob', 25, 'I hate donuts']])
Printing this with puts t yields what you'd expect:
To update the value of a cell -- say, to change Suzy Q's age to 125234 -- we would do the following:
t[2][1].value = 125234But, to make this easier, by assigning mnemonics to the rows and columns, we can udpate the table more readably:
# Assign mnemonics t.col_mnemonics = [:name,:age,:donut] t.row_mnemonics = [:head,:joe,:suzy_q,:bob] # Updating values t[2][1].value = 125234 t[:joe][:donut].value = 'Chocolate' t.joe.age.value = 123Now, printing
t yields:
Finally, this provides ways to format the cells (on a VT100 terminal), e.g.:
t.head.color = Color::RED t.joe.background = Color::BLUE t.bob.donut.bold = true t.bob.donut.underline = true t.bob.donut.color = Color::YELLOW t.bob.donut.background = Color::GREENyielding:
[ 12:30 PM on January 22, 2011 ]
[ 12:40 PM on January 16, 2011 ]
download all imgur.com/*.js
curl can do patterns -- e.g. curl
http://reddit.com/[1..10].js -- and wget can do
outright recursion -- e.g. wget -r http://reddit.com, but
neither of these (I think) can allow you to download via patterns.
This will:
download_allThis takes urls and regular expressions as arguments (or combinations) and downloads the links from these urls that match the patterns. For example (slightly edited to conform to my shitty blog design):
% download_all imgur.com/*.js [1/1] http://imgur.com/ [ 1/12] /ajax/libs/jquery/1.4.1/jquery.min.js -> jquery.min.js [ 2/12] jquery.progressbar.pack.js -> jquery.progressbar.pack.js [ 3/12] jquery.colorbox-min.js?111910 -> jquery.colorbox-min.js [ 4/12] jquery.multifile.pack.js?081710 -> jquery.multifile.pack.js ...The above example is the same as
download_all imgur.com *.js download_all imgur.com /*.js/ download_all http://imgur.com /*.js/This example will download all the js files from imgur.com, html files from spudtrooper.org and all jpg files:
download_all imgur.com/*.js spudtrooper.org/*.html *.jpgCoicidentally, after just opening a certain browser to enter this post, it became clear that the universe has its own agenda on how I should go about downloading in bulk:
[ 09:12 AM on January 16, 2011 ]
the entire page is updated as the page expands:
Here is the new version:
redditcolor.user.js
[ 04:11 PM on January 13, 2011 ]
- Search for something
- Click on one of the result links in the same tab
- Decide I want to keep that result open, but explore some of the rest
- Go back
- Find the link I clicked the first time
- Open it in a new tab
[ 12:04 PM on January 09, 2011 ]
- Convert the total to base 15
- Move the "point" over to the left
- Convert that back to decimal
then move the "point" over one place and convert it back to decimal:
$10.60 is not the right answer, $24 is...I was thinking moving the "point" over on a base 15 would take 15% of that number; it obviously does not, it takes 1/15 of that number. So, clearly, instead of converting to base 15, we need to convert a base so that when divide by this base we have the effect of multiplying by .15 -- so try base 100/15:
move the "point" over and then convert back to decimal.
[ 02:04 PM on January 07, 2011 ]
I couldn't find anything that did this for individual files, though I didn't look very hard.a.bin -> t/a.bin [ 12.02% ] 93.26 MB / 775.92 MB
[ 01:08 PM on January 05, 2011 ]
It looks like this when installed and you move your face closer to the screen.
[ 10:16 AM on January 04, 2011 ]
export FOURSQUARE_KEY=<your foursquare oauth key> export FOURSQUARE_SECRET=<your foursquare oauth secret> export FOURSQUARE_VID=<your foursquare venue id> export FOURSQUARE_VENUE=<your foursquare venue> export FOURSQUARE_GEOLAT=<your foursquare geolat> export FOURSQUARE_GEOLONG=<your foursquare geolong>signing up for oauth, installing the Ruby foursquare gem, then running the script -- with a possible message as arguments. When prompted for the access code, accept your apps access in a browser and paste that access code into your shell and hit enter.
[ 03:37 PM on January 02, 2011 ]
[ 01:20 PM on December 29, 2010 ]
Coincidence? No, irony? Coincidence.
[ 03:02 PM on December 27, 2010 ]
So, whenever you make this oopsy, you're given a friendly reminder that you probably meant to type this into the address bar:
And, then you're magically swept away to your desired location.
[ 03:59 PM on December 26, 2010 ]
So, the first stab was with amazon_table, and to create a CSV file from a search result URL (e.g. amazon_table_eg.csv), then one could view an appropriate program or google docs. To use, just pass in the URL and it dumps the CSV to stdout.
But, a more seamless way is with this bookmarklet
amazon tablecreated from amazon-table.js that will create a table in place and continue to update it as new result pages are crawled:
[ 11:24 PM on December 20, 2010 ]
So, fbphotoalbum.user.js is a user script to replace the thumbnails of a facebook album with the full images. For example, take this anonymized album, where a link appears to the right of the title on an album page showing thumbnails, like so:
When clicked, we start to replace the thumbnails with the full images. And, since each image requires another request, the whole thing could take on the order of seconds -- or on the order of hours if you are one of the lucky customers of Time Warner. So, the View all link becomes just text showing the current progress.
The resulting full-sized images will be (possibly) out of order, but to get the idea, you can see that the first thumbnail (first screen shot) appears as the second full-sized image (second screen shot).
[ 12:25 PM on December 16, 2010 ]
[ 10:42 PM on December 13, 2010 ]
[ 09:55 AM on December 06, 2010 ]
[ 11:00 AM on November 29, 2010 ]


