Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/ruby
file = File.open('orders.tsv')
out = File.open('orders.csv', 'w')
file.each_line do |line|
fields = line.split("\t")
out.puts '"'+fields.join('","')+'"'
end
@epall
epall / gist:83178
Created March 22, 2009 14:28
test_controller.rb
class TestController < ApplicationController
def rubyversion
text = `which ruby`
text += "<br>"
text += "<br>"
text += `ruby --version`
text += "<br>"
text += "<br>"
text += `gem list --local`.split("\n").join("<br>")
render :text => text
@epall
epall / nt.sh
Created December 13, 2008 21:57
#!/usr/bin/env sh
# A simple script to open a new tab in Terminal in the current directory
# Author: Eric Allen
osascript -e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' > /dev/null
osascript -e "tell application \"Terminal\" to do script \"cd $PWD && clear\" in window 1" > /dev/null