Skip to content

Instantly share code, notes, and snippets.

@robolson
robolson / keybase.md
Created September 11, 2019 14:28
keybase proof of identity

Keybase proof

I hereby claim:

  • I am robolson on github.
  • I am robolson (https://keybase.io/robolson) on keybase.
  • I have a public key ASB_WjNtTeu1DL3YD6HyS00e_o-qpuFdGBS_4cIQJ9_fVwo

To claim this, I am signing this object:

@robolson
robolson / gist:9518870
Created March 12, 2014 23:28
exif data for an image taken on iPhone 5s
ExifTool Version Number : 9.52
File Name : cookies.jpeg
Directory : .
File Size : 128 kB
File Modification Date/Time : 2014:03:12 16:03:46-07:00
File Access Date/Time : 2014:03:12 16:26:02-07:00
File Inode Change Date/Time : 2014:03:12 16:03:59-07:00
File Permissions : rw-r--r--
File Type : JPEG
MIME Type : image/jpeg
@robolson
robolson / gist:8994680
Created February 14, 2014 02:16
Thumbor watermark test failure
============
Vows Results
============
Url vows
Parse
With thumbor inside watermark
✗ should have image
Expected topic("s.glbimg.com/some/image.jpg',0,0,0)/some.domain/img/path/img.jpg") to equal 'some.domain/img/path/img.jpg'
[rob@rob-desktop ~]$ echo $PATH
/home/rob/narwhal/bin:/home/rob/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
[rob@rob-desktop ~]$ ./Downloads/Starter/bootstrap.sh
================================================================================
Found an existing Narwhal/Cappuccino installation, /home/rob/narwhal. Remove it automatically now?
WARNING: the ENTIRE directory, /home/rob/narwhal, will be removed (i.e. 'rm -rf /home/rob/narwhal').
Be sure this is correct. Custom modifications and installed packages WILL BE DELETED.
Enter "yes" or "no":
yes
# Blog post at
# http://pivotallabs.com/users/rolson/blog/articles/1162-redefine-a-method-from-a-module-like-a-gentleman
module Teacher
def self.included(base)
base.extend ClassMethods
base.overwrite_initialize
base.instance_eval do
def method_added(name)
@robolson
robolson / gist:212563
Created October 18, 2009 05:36
Catalog TV show downloads
#!/usr/bin/env ruby
#
# Cataloger watches the directory where completed torrents are placed.
# Upon scanning the directory for all .avi or .mkv files the script will
# attempt to extract the name of the TV show and the season number from the
# filename. Cataloger then checks for a directory of the format:
# "#{COMPLETED_DIR}/#{SHOW_NAME}/Season_#{SEASON_NUMBER}
# and copies over the file.
#
# Naturally this script is for educational purposes only.
@robolson
robolson / jonathancoulton.sh
Created June 28, 2009 01:26
Bash script to download all of Jonathan Coulton's free songs.
#!/bin/sh
# Downloads all of Jonathan Coulton's free songs
# from http://www.jonathancoulton.com/store/downloads/
curl -C - "http://www.jonathancoulton.com/mp3/Washy%20Ad%20Jeffy.mp3" -o "Washy Ad Jeffy.mp3" \
"http://www.jonathancoulton.com/mp3/SkyMall.mp3" -o "SkyMall.mp3" \
"http://www.jonathancoulton.com/mp3/Creepy%20Doll.mp3" -o "Creepy Doll.mp3" \
"http://www.jonathancoulton.com/mp3/Big%20Bad%20World%20One.mp3" -o "Big Bad World One.mp3" \
"http://www.jonathancoulton.com/mp3/Mr.%20Fancy%20Pants.mp3" -o "Mr. Fancy Pants.mp3" \
"http://www.jonathancoulton.com/mp3/I'm%20Your%20Moon.mp3" -o "I'm Your Moon.mp3" \
@robolson
robolson / gist:137147
Created June 27, 2009 22:54
Shell command to fix escaped spaces in filenames
# Finds all the files with "%20" in their filename and replaces it with a plain space
find . -name "*%20*" -exec sh -c 'mv ${0} "${0//\%20/ }"' {} \;
@robolson
robolson / update-gits.sh
Created March 7, 2009 21:39
Shell script to check multiple git repositories for updates.
#!/bin/bash
repos=(
"/Users/rob/Library/Application Support/TextMate/Bundles/Git.tmbundle"
"/Users/rob/Library/Application Support/TextMate/Bundles/Ruby.tmbundle"
"/Users/rob/Library/Application Support/TextMate/Bundles/RubyAMP.tmbundle"
"/Users/rob/Library/Application Support/TextMate/Bundles/Ruby Haml.tmbundle"
"/Users/rob/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle"
"/Users/rob/Library/Application Support/TextMate/Bundles/ruby-sass.tmbundle"
"/Users/rob/Library/Application Support/TextMate/Bundles/ruby-shoulda.tmbundle"
require 'test/unit'
class Set
def initialize(initial=[])
@contents = Hash.new
initial.each do |item|
@contents[item.to_s] = item
end
return self
end