This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.
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
app.get '/riders', (req, res) -> | |
redis.smembers 'riders', (err, replies) -> | |
results = [] | |
build_json = (rider) -> | |
redis.hgetall rider, (err, reply) -> | |
results.push reply | |
res.json(results, 200) if results.length == replies.length | |
build_json rider for rider in replies |
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 UI | |
container: null | |
events: { } | |
constructor: () -> | |
this.bindEvents() | |
bindEvents: () -> | |
for event_type_and_selector, callback of @events | |
[event_type, selector] = event_type_and_selector.split(' ') |
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
it "has a nice api" do | |
# To set the video bitrate of the output file to 64kbit/s: | |
# ffmpeg -i input.avi -b:v 64k output.avi | |
builder = FastForward.build do |ff| | |
ff.input "input.avi" | |
ff.output "output.avi" do |o| | |
o.bitrate("64k").stream("video") | |
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
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green |
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
web: bundle exec ruby app.rb -sv -e prod -p $PORT |
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
module MultiSplit | |
def msplit(*delimiters) | |
return [ self ] if delimiters.empty? | |
if idx = index( delimiters.first ) | |
[ self[ 0...idx ] ] + self[ ( idx + delimiters.first.length )..-1 ].msplit( *delimiters ) | |
else | |
msplit( *delimiters[1..-1] ) | |
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
#!/usr/bin/env ruby | |
require 'thread' | |
# Usage ./list-files [DIRECTORY] | |
WORKERS = 5 | |
queue = Queue.new | |
@results = Queue.new | |
threads = [] |
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
App.run ($rootScope, $filter, $log) -> | |
$rootScope.$on( '$stateChangeStart', (ev, to, toParams, from, fromParams) -> | |
$log.info('state change from ', from.name, $filter('json')(fromParams), ' to ', to.name, $filter('json')(toParams)) | |
) |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"os" | |
) | |
func main() { |