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/ruby | |
# show recent anonymous edits to a Wikipedia article from interesting domains | |
require 'hpricot' | |
require 'open-uri' | |
require 'socket' | |
require 'yaml' | |
article = 'Henry_Paulson' |
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 | |
# turn dd-wrt web gui on only when you need it | |
ROUTER=192.168.0.1 | |
USER=root | |
[ "$1" = "on" ] && COMMAND="httpd -h /www -S" | |
[ "$1" = "off" ] && COMMAND="kill \`cat /tmp/var/run/httpsd.pid\`" |
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
export PS1="${debian_chroot:+($debian_chroot)}\u@\h:\w\$(git branch 2>/dev/null | sed -n 's/^\* \(.*\)/ git:\1/p')\$ " |
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
#++ | |
# | |
# :title: Google Latitude plugin for rbot | |
# | |
# Author:: Matthew M. Boedicker <matthewm@boedicker.org> | |
# | |
# Copyright:: (C) 2009 Matthew M. Boedicker | |
# | |
# License:: GPL v3 | |
# |
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
// mozrepl function to select the next tab with title matching a regex | |
function next_tab(title_re) { | |
var tabContainer = window.getBrowser().tabContainer; | |
var tabs = tabContainer.childNodes; | |
var numTabs = tabs.length; | |
var startIndex = tabContainer.selectedIndex; | |
var testIndex; | |
for (i = 0; i < numTabs - 1; 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
#!/usr/bin/ruby | |
# fetch a user's facebook news feed | |
require 'rubygems' | |
require 'httparty' | |
require 'digest/md5' | |
require 'pp' |
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
require 'rubygems' | |
require 'RMagick' | |
# add methods to rmagick to generate Conway's life iterations | |
module Magick | |
class Image | |
def occupied?(x, y); pixel_color(x, y).to_color == 'black' end |
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/ruby | |
# parse and log diagnostic information from an APC UPS | |
require 'pp' | |
require 'time' | |
time_fields = %w{ | |
APC | |
DATE |
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/ruby | |
# pianobar event script to make rbot send currently playing song to an IRC | |
# channel | |
# Copyright (c) 2010 | |
# Matthew M. Boedicker <matthewm@boedicker.org> | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal |
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/ruby | |
# pianobar event script to maintain a JSON file of the last 10 songs played | |
# Copyright (c) 2010 | |
# Matthew M. Boedicker <matthewm@boedicker.org> | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |