Skip to content

Instantly share code, notes, and snippets.

View xlymian's full-sized avatar

Paul Mylchreest xlymian

View GitHub Profile
### Keybase proof
I hereby claim:
* I am xlymian on github.
* I am xlymian (https://keybase.io/xlymian) on keybase.
* I have a public key ASARPjpKsgNqnA6zWvF8TAKhm7oBWQiEtcQx25L7huhFXwo
To claim this, I am signing this object:
@xlymian
xlymian / gist:3698677
Created September 11, 2012 13:55
heroku: how to set the default app
git config heroku.remote heroku
@xlymian
xlymian / gist:3698634
Created September 11, 2012 13:50
Heroku: git push current branch
git config remote.heroku.push HEAD:master
@xlymian
xlymian / git_branch_prunable
Created February 23, 2012 21:02
What branches can be pruned?
#!/usr/bin/env ruby
# git_branch_prunable 0.1 - 2011-11-29
# by Paul Mylchreest (paul.mylchreest@mac.com)
#
%x( git branch ).each_line do |branch|
branch.strip!
next if branch =~ /master|development|staging/
cmd = "git log #{branch} -n 1 --pretty=oneline"
first_commit_line = %x( #{cmd} )
@xlymian
xlymian / git-prunable-branches
Created December 9, 2011 21:26
git-prunable-branches
#!/usr/bin/env ruby
# git_branch_prunable 0.1 - 2011-11-29
# by Paul Mylchreest (paul.mylchreest@mac.com)
#
%x( git branch ).each_line do |branch|
branch.strip!
next if branch =~ /master|development|staging/
cmd = "git log #{branch} -n 1 --pretty=oneline"
first_commit_line = %x( #{cmd} )
@xlymian
xlymian / gist:1383412
Created November 21, 2011 18:16
ChuckTestar rspec formatter
[paulmylchreest@Paul fib (master)]$ bundle exec rspec spec/* --format ChuckTestar
Yeeep
Your tests pass!
Nope! It's just Chuck Testa!
Failures:
require 'benchmark'
require 'matrix'
class Array
def parallel_map(&block)
result = []
# Creating a group to synchronize block execution.
group = Dispatch::Group.new
# We will access the `result` array from within this serial queue,
# as without a GIL we cannot assume array access to be thread-safe.