Skip to content

Instantly share code, notes, and snippets.

@tatey
Created April 27, 2013 00:10
Show Gist options
  • Select an option

  • Save tatey/5471285 to your computer and use it in GitHub Desktop.

Select an option

Save tatey/5471285 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __FILE__)
require 'bundler/setup'
require 'sequel'
if ARGV.size != 2
puts "usage: #{__FILE__} <DATA_PATH> <DB_PATH>"
puts " #{__FILE__} ~/Desktop/sites.txt ~/Desktop/database.sqlite"
abort
end
@tatey

tatey commented Apr 27, 2013

Copy link
Copy Markdown
Author

Instead of going cd myscript; ruby script.rb now I can go myscript/script. Don't have to remember where the Gemfile is either.

@twe4ked

twe4ked commented Apr 28, 2013

Copy link
Copy Markdown

Nice, now to put them on GitHub :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment