Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
require 'spreadsheet'
# Begin Test
print "Spreadsheet Test\n"
# Create the rows to be inserted
row_1 = ['A1', 'B1']
row_2 = ['A2', 'B2']
# change foo to your library name
# change Foo::Database to your Sequel database
namespace :bundler do
task :setup do
require 'rubygems'
require 'bundler/setup'
end
end
class Application < Sinatra::Base
configure do
enable :static
set :views, File.join(File.dirname(__FILE__), 'views')
end
get '/' do
slim :index
end
@ematta
ematta / .irbrc
Last active October 11, 2015 23:57
My .irbrc file
require 'irb/completion'
require 'irb/ext/save-history'
require 'map_by_method'
require 'what_methods'
require 'pp'
IRB.conf[:AUTO_INDENT] = true
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" #FOR WINDOWS CHANGE HOME TO HOMEPATH
@ematta
ematta / ubuntu-ruby-gem-watir-install
Created May 12, 2011 13:51
Ubuntu Installation of Ruby, Gems, and WATIR
sudo apt-get install ruby
wget http://production.cf.rubygems.org/rubygems/rubygems-1.7.2.tgz
tar xvzf rubygems-1.7.2.tgz
cd rubygems-1.7.2
sudo ruby setup.rb
ln -s /usr/bin/gem1.8 /usr/bin/gem
sudo gem update --system
sudo gem install watir