Skip to content

Instantly share code, notes, and snippets.

Coby Chapple cobyism

Block or report user

Report or block cobyism

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
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 / 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')
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 / 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 / schema.rb
Created May 29, 2011
Current SARMS db schema
View schema.rb
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
View fresh-install.mkd
cobyism / widgets_controller.rb
Created Apr 15, 2012
Controller code that is replaced by the new InheritedResources::Base inheritance stuff.
View widgets_controller.rb
class WidgetsController < ApplicationController
# GET /widgets
# GET /widgets.json
def index
@widgets = Widget.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @widgets }
View hello.asciidoc

This is body text

Optional Title
Code listing line one

Code listing line two

And more body text.

View gist:3694843
unnamed gist
wat is this i don't even
cobyism /
Created Sep 18, 2012
Highlight things mentioning GitHub on Hacker News using defunkt/dotjs
// Highlight articles on/about GitHub
$('span, a, p').filter(':contains("github")')
.css('background-color', '#ffff66')
$('span, a, p').filter(':contains("GitHub")')
.css('background-color', '#ffff66')
You can’t perform that action at this time.