This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Tries to install something using fink, macports, and apt-get. | |
# | |
cmds="fink port apt-get" | |
for c in $cmds; do | |
test x`which $c` != 'x' && { | |
$c install $@ | |
test "$?" -eq "0" && exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
C: | |
cd c:\cygwin\bin | |
REM bash -login -i | |
rxvt -km ISO-8859-15 -sl 2500 -sb -geometry 90x30 -tn rxvt -fn 'Lucida Console-14' -sr -e /usr/bin/bash --login -i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
awk -F/ '/tcp.*print|print.*tcp/ {gsub(/.*[ \t]/,"",$1); print $1}' /etc/services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Displays a window listing the first item in every page for a | |
// paginated ebay query. This allows you to jump into the desired | |
// section of en ebay query, rather than browsing through pages and | |
// pages. For example, you search for an item yielding 1000s of pages | |
// of results with bidding periods ranging from seconds to days, and | |
// you're willing to wait a couple days -- so you sort by 'time left'. | |
// Instead of clicking through the pages until you find the results | |
// that have a couple days, you could directly to that page. There is | |
// more here: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Searches a list of jar files for a given package or class and prints | |
# the jar file that contains files in that package. The first | |
# argument is the package for which we search, the rest are jar files | |
# to search. Examples searching for a (1) package and (2) class: | |
# | |
# search_jars org.apache.http *.jar # (1) | |
# search_jars HttpExecutionContext *.jar # (2) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Mails the USER or email you pass in if the video experimenter from | |
# nootropicdesign.com is back in stock. Put this in your crontab to | |
# periodically check. | |
# | |
to=$1 | |
to=${to:=$USER} | |
link="http://nootropicdesign.com/store/index.php?main_page=product_info&cPath=1&products_id=24" | |
res=$(curl -s $link | grep -l "Out of Stock") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# A ghetto way to download the photos (skipping sized and thumbnails) | |
# in a phpAlbum photo gallery. Create a file called credentials.rb | |
# that looks like this: | |
# | |
# HOSTNAME = 'example.com' | |
# USERNAME = 'example_user' | |
# PASSWORD = 'example-password' | |
# FOLDER = '/public_html/folder' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Creates a playlist for every artist in your library -- since the | |
# Roku app doesn't have browsing by artists. The following need to be | |
# in the ENV: | |
# | |
# export RDIO_KEY=... | |
# export RDIO_SECRET=... | |
# | |
# You have to install the rdio gem, too. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var html = String(document.body.innerHTML); | |
var res = html.match(/GLatLng\s*\(\s*(-?\d+\.?\d*)\s*,\s*(-?\d+\.?\d*)\s*\)/); | |
if (res) { | |
var lat = res[1], lng = res[2]; | |
var title = document.getElementsByTagName('h1')[0].innerHTML; | |
var link = 'http://maps.google.com/maps?q=' | |
+ escape(title) + '@' + lat + ',' + lng; | |
window.open(link,'_'); | |
} else { |