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 /
Last active May 19, 2020
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).


DIY Cardboard Laptop Stand


Here’s how to make your own laptop stand out of cardboard.


  • One piece of cardboard, approximately 53cm wide x 14cm high (cut up an old parcel box or something).
  • Scissors
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 / 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 /
Last active Dec 7, 2019
Command to create installable OS X USB drive.

Creating a bootable macOS USB installer

  • First, plug in an 8GB (or bigger) USB drive, and use Disk Utility to erase it
  • If you use the default settings, you should wind up with a blank drive at /Volumes/Untitled.

With that volume in place, and with the macOS installer sitting in /Applications/Install\ macOS\ [VERSION].app, run the following command in your terminal to create a bootable install media (for Sierra):

sudo /Applications/Install\ macOS\ --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ --nointeraction
cobyism / emojibomb.rb
Last active Sep 27, 2019
Generate a random emoji bomb via the command-line
View emojibomb.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'open-uri'
# Run `emojibomb` to get three emoji.
# Run `emojibomb N`, where `N` is a positive integer to get N emoji.
response = open("")
html =
emoji = html.scan(/:\S+:/)
cobyism /
Last active Jan 21, 2019
How to set up a Raspberry Pi so that VNC starts on boot. Mostly from

Starting VNC automatically on a Raspberry Pi

sudo apt-get install tightvncserver
vncserver :1 -geometry 1280x800 -depth 16 -pixelformat rgb565
  • Set up a password for access (optional)
sudo vi /etc/init.d/tightvncserver

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:

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.
cobyism /
Last active Feb 23, 2017
Q&A on design workflows.

Design workflow Q&A

James Kirkpatrick sent me some questions about designing in the browser, and design workflows in general to help with his dissertation at the University of Ulster. Here are my responses.

Question: Do you feel that designing in browser is fast becoming the standard in web design, or do you feel that there will still be a few die-hard designers that will refuse to adopt the idea?

I think it is definitely on its way to becoming the standard, especially with the improvements in the pipeline in terms of what’s possible within developer tools (source-map support for Sass, CoffeeScript and so forth). It’s not catching on as quickly as I feel it should be though (given the benefits I feel it has), and honestly I feel like that’s simply because it’s hard for people to drop the tools they know and love cold-turkey. It can take a while to adjust to new tools and workflows, and to be able to afford the time in-between where you just have to accept that you won’t be as productive as usual is

You can’t perform that action at this time.