Skip to content

Instantly share code, notes, and snippets.

View dmmfll's full-sized avatar

Don Morehouse dmmfll

  • Fort Lauderdale, Florida
View GitHub Profile
@marianoguerra
marianoguerra / table2rst.py
Created August 10, 2011 16:14
csv table 2 rst
'''read a csv file representing a table and write a restructured text simple
table'''
import sys
import csv
def get_out(out=None):
'''
return a file like object from different kinds of values
None: returns stdout
string: returns open(path)
@zachwaugh
zachwaugh / gist:521133
Created August 12, 2010 15:19
Loading rails environment in a script
#!/usr/bin/env ruby
# Load Rails
ENV['RAILS_ENV'] = ARGV[0] || 'production'
DIR = File.dirname(__FILE__)
require DIR + '/../config/environment'
# ... do stuff that requires using your rails models