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
after "deploy:symlink", "deploy:restart_workers" | |
after "deploy:restart_workers", "deploy:restart_scheduler" | |
## | |
# Rake helper task. | |
# http://pastie.org/255489 | |
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
def run_remote_rake(rake_cmd) | |
rake_args = ENV['RAKE_ARGS'].to_s.split(',') |
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
#!/usr/bin/env ruby | |
require 'sinatra' | |
warn Process.pid | |
get '/' do | |
'hi' | |
end |
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
/* Generated by Opal 0.10.0.dev, indentation fixed manually */ | |
/* source: a = true ? 2 : 0 rescue 10 */ | |
(function(Opal) { | |
Opal.dynamic_require_severity = "error"; | |
var OPAL_CONFIG = { method_missing: true, arity_check: false, freezing: true, tainting: true }; | |
var $a, self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, a = nil; | |
return a = (function() { | |
try { | |
(function() { |
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
#!/usr/bin/env ruby | |
require 'csv' | |
require 'elasticsearch' | |
require 'securerandom' | |
file = ARGV.shift | |
unless file | |
warn "Usage: $0 <ledger 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
require 'spec_helper' | |
describe "A method stub" do | |
def decorate(klass, scope) | |
klass.class_eval <<-EOF | |
#{scope} | |
def some_stubbed_method | |
end |
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
#include <SPI.h> | |
#include <avr/sleep.h> | |
#include "nRF24L01.h" | |
#include "RF24.h" | |
#include "printf.h" | |
RF24 radio(8, 7); | |
int led = 3; | |
int temp = A2; |
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
var camera, scene, renderer; | |
var geometry, material, mesh; | |
init(); | |
animate(); | |
function init() { | |
camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 10000 ); | |
camera.position.z = 300; |
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
class GA | |
def self.track(type, args, cookies = nil, request = nil) | |
begin | |
self.delay(:queue => :analytics).track_send(type, args, cookies, request) | |
rescue Redis::CannotConnectError => e | |
Rails.logger.error e.message + "\n" + e.backtrace.join("\n") | |
end | |
end | |
private |
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
<?php | |
/** | |
* Simple excel writer class with no external dependencies, drop it in and have fun | |
* @author Matt Nowack | |
* @license Unlicensed | |
* @version 1.0 | |
*/ | |
class Excel { | |
private $col; |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'machete' | |
rails_root = ARGV[0] | |
file = ARGV[1] | |
if rails_root.nil? || !File.exists?(rails_root) || file.nil? || !File.exists?(file) | |
warn "Usage: dead_models <rails root> <source file>" |
NewerOlder