I hereby claim:
- I am blovett on github.
- I am blovett (https://keybase.io/blovett) on keybase.
- I have a public key ASDZKJuCWcupXUpd1oCLmfXlXQ_6L7SgDqEUWYTkyHVnXgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # Except sqlite3 all the libraries are standard that should be present with a Ruby installation. | |
| # If you don't have sqlite3 installed. Use `gem install sqlite3` | |
| require 'fileutils' | |
| require 'sqlite3' | |
| require 'uri' | |
| require 'net/http' | |
| require 'set' | |
| require 'thread' |
Install XQuartz (http://xquartz.macosforge.org) which is the development version of the X11.app that ships with OS X, which means it is way more up to date. I have had some weird issues with X11.app v. 2.3-something. XQuartz 2.5.0 fixed that.
Install dwm from Homebrew, brew install dwm. This makes a bunch of necessary tweaks to the DWM configuration.
Add the following script to $PATH, name it dwm-launch and chmod 755:
cd ~
while true
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2
| #!/bin/bash | |
| while true; do | |
| kill -9 $RANDOM | |
| done |
| #!/usr/bin/env ruby | |
| require 'open-uri' | |
| require 'optparse' | |
| require 'json' | |
| @options = {} | |
| opts = OptionParser.new | |
| opts.on("--node S", String, "Node name") do |n| | |
| @options[:node] = n |
| #!/usr/bin/ruby | |
| # This script installs to /usr/local only. To install elsewhere you can just | |
| # untar https://github.com/blovett/homebrew/tarball/master anywhere you like. | |
| module Tty extend self | |
| def blue; bold 34; end | |
| def white; bold 39; end | |
| def red; underline 31; end | |
| def reset; escape 0; end | |
| def bold n; escape "1;#{n}" end |
| #!/usr/bin/ruby | |
| # https://gist.github.com/1361100 | |
| ID3_TAGS = { | |
| "TITLE" => "tt", | |
| "ARTIST" => "ta", | |
| "ALBUM" => "tl", | |
| "DATE" => "ty", | |
| "GENRE" => "tg", | |
| "TRACKNUMBER" => "tn", |
| #!/usr/bin/perl | |
| while (<>) { | |
| chomp; | |
| if (/IN\s*PTR/) { | |
| if (/^(.*)\s+IN\s+PTR\s+(\w.*)/) { | |
| my $v6_addy = $1; | |
| my $ptr_val = $2; | |
| my $ipv6_reverse = `sipcalc -r $v6_addy | grep ip6.arpa | tail -n1`; | |
| chomp($ipv6_reverse); |