This file contains hidden or 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
// Jake is like Rake for nodejs https://github.com/mde/jake | |
// | |
// Assumes that Jake will be run in the root of the web app with coffee files in /js/ and | |
// a single app.less file in /css/ that can include references to other .less files | |
// | |
//requires | |
var sys = require('util'); | |
var execute = require('child_process').exec; | |
var fs = require('fs'); |
This file contains hidden or 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
Make a keyboard shortcut to run a shell script with Alfred or Quicksilver, and point it at | |
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend |
This file contains hidden or 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
class Job | |
LAZY_ENVIRONMENTS = %w(development test) | |
# Add a job to the queue. If we're currently running in any of the | |
# environments listed in +LAZY_ENVIRONMENTS+ then it automatically performs | |
# the job. | |
def self.enqueue(*args) | |
if LAZY_ENVIRONMENTS.include? Rails.env | |
Rails.logger.debug "Performing job instead of enqueuing: #{name}" | |
perform(*args) |
This file contains hidden or 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
require 'eventmachine' | |
EM.run do | |
SEKRET_SAUCE = EM.attach( | |
open(RUBY_PLATFORM =~ /mswin|mingw/ ? 'NUL:' : '/dev/null', 'w') | |
) | |
EM.start_server('0.0.0.0', 80, Module.new do | |
def post_init; proxy_incoming_to(SEKRET_SAUCE); end | |
end) | |
end |
This file contains hidden or 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
# Rails example | |
recipe :ignore | |
ignore(/(^tmp|jpg|png|gif|css|\.DS_Store)$/) | |
recipe :rails | |
process do |files| | |
Ruby.run_tests(files.take_and_map do |file| | |
case file |
NewerOlder