Skip to content

Instantly share code, notes, and snippets.


Coby Chapple cobyism

View GitHub Profile

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.

cobyism /
Created Jun 27, 2015
Commands to create swapfile on a Digital Ocean Ubuntu droplet
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
swapon -s
free -m
cobyism / jsmap2coffee.rb
Created Jan 23, 2015
Reverse engineer * files to *.coffee
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 }
cobyism / dslchecker.rb
Created Oct 9, 2014
Started hacking on a BT DSL checker screen scraper thing
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
cobyism / cask-finder.rb
Last active Dec 14, 2019
Search /Applications for apps that can be installed with `brew cask` (see
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]
cobyism / toast.rb
Created Jun 1, 2014
Example GIF compiler script for Toasts.
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')
cobyism /
Created May 13, 2014
hubot remote me example.
# 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 ""
cobyism / gh-gmail-label-script.js
Created May 5, 2014
GitHub Email Notification labeller script for Google Apps/Gmail
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.