Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am cobyism on github.
  • I am cobyism ( on keybase.
  • I have a public key ASC_DegBn7CbCydRF-0Y8Fk9Vnu_A_OGt1kQqI4Q0B0_2Qo

To claim this, I am signing this object:


Thinking outside the square (Joan Chapple)

Excerpt from:
Author: Sarah Lang, for NZ Herald.
Originally published Monday Jun 23, 2008

Next door to Masson in a dark, decidedly-more-rudimentary house, Dr Joan Chapple sits, scanning the newspaper. Chapple's initial claim to consequence is as New Zealand's first hand surgeon and first female plastic surgeon. But at 78, with deep creases around her eyes, she couldn't be much more removed from the botoxed nip and tuck mercenaries.

sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
swapon -s
free -m
View jsmap2coffee.rb
#!/usr/bin/env ruby
require "json"
require "fileutils"
# Find all * files in current directory
files = Dir["./**/*"]
# Parse out the JSON
mapfiles = { |f| JSON.parse }
View dslchecker.rb
require 'rubygems'
require 'nokogiri'
require "net/http"
require "uri"
class DSLChecker
def check_phone_number(number)
params = { "TelNo" => number }
endpoint = URI.parse("")
response = Net::HTTP.post_form(endpoint, params)
command: "memory_pressure && sysctl -a | grep memsize"
refreshFrequency: 2000
style: """
// Change bar height
bar-height = 6px
// Align contents left or right
widget-align = left
View cask-finder.rb
#!/usr/bin/env ruby
exact_matches = {}
partial_matches = {}
no_matches = []
puts "Searching /Applications for things that exist in cask…"
Dir.glob('/Applications/*.app').each do |app|
app_name = File.basename(app)
search_term = File.basename(app, ".*").downcase.split(/\s/)[0]
View toast.rb
#! /usr/bin/env ruby
require 'octokit'
require 'awesome_print'
require 'open-uri'
client = => ENV['GHUSER'], :oauth_token => ENV['GHTOKEN'])
repo = 'example/repo'
Dir.mkdir('build') if !File.exists?('build')
# make this URL an endpoint that returns something like the users.json file in this gist.
baseUrl = ""
robot.respond /remote me/i, (msg) ->
if Math.random() < 0.01
msg.send ""
View gh-gmail-label-script.js
var my_teams = ["@github/css", "@github/design"] // Add any teams you want autodetected to this list
var base_label = ["GitHub"]
var my_teams_regex = new RegExp('(' + my_teams.join('|') + ')')
function GitHubThread(thread) {
this._thread = thread
// Determine why we got this message and label the thread accordingly.