This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# one way (older scala version will be installed) | |
# sudo apt-get install scala | |
#2nd way | |
sudo apt-get remove scala-library scala | |
sudo apt-get --yes install openjdk-6-jdk | |
wget http://www.scala-lang.org/files/archive/scala-2.11.2.deb | |
sudo dpkg -i scala-2.11.2.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RUN THIS FROM WITHIN THE RAILS CONSOLE OF THE APP | |
# WITH THE MODELS YOU'RE USING AS A TEMPLATE | |
RAILS_COMMAND = "rails g resource" | |
RAILS_COMMAND_OPTIONS = "--skip-migration" | |
FILE_NAME = "resource_generation.rb" | |
# First, ensure we've loaded all of the model classes | |
Dir.glob("#{Rails.root}/app/models/*.rb").sort.each { |file| require_dependency file } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pass in a tweet id to open a link in the text | |
# | |
# :open $xx | |
Earthquake.init do | |
command %r|^:open\s+([^\/\s]+)$|, :as => :open do |m| | |
twitter.status(m[1]).tap do |s| | |
if s["text"] | |
link_match = s["text"].match(/(https?:\/\/\S*)/) | |
if link_match | |
Launchy.open(link_match[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From http://github.com/jaymcgavren | |
# | |
# Save this as rcov.rake in lib/tasks and use rcov:all => | |
# to get accurate spec/feature coverage data | |
# | |
# Use rcov:rspec or rcov:cucumber | |
# to get non-aggregated coverage reports for rspec or cucumber separately | |
require 'cucumber/rake/task' | |
require 'spec/rake/spectask' |