Skip to content

Instantly share code, notes, and snippets.

View matthijsgroen's full-sized avatar

Matthijs Groen matthijsgroen

View GitHub Profile
@matthijsgroen
matthijsgroen / prepare.rake
Created July 8, 2011 11:51
Rake file for executing guard to prepare your environment
desc "compiles all coffeescripts and scss stylesheets in the project"
task :prepare => 'prepare:all'.to_sym
namespace :prepare do
desc "compiles all coffeescripts in the project"
task :coffeescript do
run_guards "Guard::CoffeeScript"
end
@matthijsgroen
matthijsgroen / 0_README.md
Created July 5, 2011 06:27 — forked from netzpirat/0_README.md
Continuous CoffeeScript testing with Guard and Jasmine

Continuous CoffeeScript testing with Guard and Jasmine

This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo

  • Install Gems with Bundler with bundle install
  • Define your guards with mate Guardfile
  • Initialize Jasmine with bundle exec jasmine init
  • Configure Jasmine with mate spec/support/yasmine.ym
  • Start Guard with bundle exec guard
@matthijsgroen
matthijsgroen / scss-watch.rake
Created March 28, 2011 06:31
Rake task to watch all scss files
namespace :scss do
task :watch do
files = `find . -iname *.scss`
destination = "public/stylesheets/"
pairs = []
files.each_line do |file|
file.strip!
pairs << "#{file}:#{destination}#{File.basename(file, ".scss")}.css"
end
command = "sass --watch #{pairs.join " "}"
@matthijsgroen
matthijsgroen / move-repos.rb
Created March 3, 2011 13:28
Move repositories from one git repo to another
#!/usr/bin/ruby
require "yaml"
module Git
class RepoMover
CONFIG_ROOT = "repo_movement"
@matthijsgroen
matthijsgroen / exporter.rb
Created February 28, 2011 09:52
Set up database backup scripts
#!/usr/bin/ruby
u = "root"
p = "password"
Dir.chdir "/root/database_backups"
`git reset --hard`
`git checkout backups`
`git merge master`