Skip to content

Instantly share code, notes, and snippets.

@jterk
jterk / *jdwp-log*
Created January 6, 2011 20:06
jdibug configuration
15:07:41 [debug] jdibug : jdibug-connect
15:07:41 [debug] jdibug : jdibug-connected-p
15:07:41 [debug] jdibug : connected = 0
15:07:41 [ info] jdibug : JDIbug connecting...
15:07:41 [debug] jdibug : setting jdibug-active-thread to nil in jdibug-connect
15:07:41 [ info] jdibug : JDIbug connecting... localhost:8000
15:07:41 [trace] jdwp : jdwp-connect:localhost:8000
15:07:41 [debug] jdwp : jdwp-accept-process-output
15:07:41 [debug] jdwp : jdwp-receive-message:accept-process-output returned t
15:07:41 [debug] jdwp : jdwp-consume-output:len=14
@jterk
jterk / flac2mp3
Created January 2, 2011 17:43 — forked from mxcl/flac2mp3.md
Modified to tolerate missing metadata.
#!/usr/bin/ruby
# http://gist.github.com/gists/124242
filename = ARGV[0]
abort "Usage: flac2mp3 FLACFILE" if filename.nil?
`metaflac --export-tags-to=- "#{filename}"`.each_line do |s|
v = s.strip.split '=', 2
v[0].upcase!
v[1].gsub! '"', '\"'
jterk ~> brew install --universal --java --force subversion
==> Downloading http://subversion.tigris.org/downloads/subversion-1.6.13.tar.bz2
File already downloaded and cached to /Users/jterk/Library/Caches/Homebrew
==> ./configure --disable-debug --prefix=/usr/local/Cellar/subversion/1.6.13 --with-ssl --with-zlib=/usr --disable-neon-
configure: Configuring Subversion 1.6.13
configure: creating config.nice
checking for gcc... /usr/bin/cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
@jterk
jterk / gist:564613
Created September 3, 2010 21:39
I use this script to save and restore window positions on OS X when attaching and removing an external monitor.
#!/usr/bin/env ruby
require 'appscript'
include Appscript
DATA_FILE = File.expand_path "~/.saved_windows"
# Adium is very special.
ADIUM = "Adium"
ADIUM_CONTACTS = "Contacts"