Skip to content

Instantly share code, notes, and snippets.

Ben Marini bmarini

Block or report user

Report or block bmarini

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am bmarini on github.
  • I am benmarini ( on keybase.
  • I have a public key whose fingerprint is 071F BE82 8D4C 65BA D311 A8BA FC0E E0BF 8831 987C

To claim this, I am signing this object:

bmarini / stdin.go
Created Dec 30, 2014
Read lines from stdin
View stdin.go
package main
import (
func main() {

a simple git branching model

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.

The gist

bmarini /
Created Nov 7, 2013
ui router logging...
View ($rootScope, $filter, $log) ->
$rootScope.$on( '$stateChangeStart', (ev, to, toParams, from, fromParams) ->
$'state change from ',, $filter('json')(fromParams), ' to ',, $filter('json')(toParams))
bmarini / threads-and-queues.rb
Created May 4, 2013
Playing with threads and queues.
View threads-and-queues.rb
#!/usr/bin/env ruby
require 'thread'
# Usage ./list-files [DIRECTORY]
queue =
@results =
threads = []
bmarini / msplit.rb
Created Mar 3, 2013
Multi Split == Multi Recursion
View msplit.rb
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 )
msplit( *delimiters[1..-1] )
bmarini / Procfile
Created May 25, 2012
Goliath app to serve static files
View Procfile
web: bundle exec ruby app.rb -sv -e prod -p $PORT
bmarini / .gitconfig
Created Mar 17, 2012
My global git config
View .gitconfig
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
View potential-ff-api.rb
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 = do |ff|
ff.input "input.avi"
ff.output "output.avi" do |o|
bmarini /
Created Jan 2, 2012
Half-assed port of event-map feature from backbone
class UI
container: null
events: { }
constructor: () ->
bindEvents: () ->
for event_type_and_selector, callback of @events
[event_type, selector] = event_type_and_selector.split(' ')
You can’t perform that action at this time.