Skip to content

Instantly share code, notes, and snippets.

View cwonrails's full-sized avatar

Chris Watson cwonrails

View GitHub Profile
@cwonrails
cwonrails / Monaco for Powerline.otf
Created January 24, 2016 01:18 — forked from baopham/Monaco for Powerline.otf
Patched font Monaco for OSX Vim-Powerline
@cwonrails
cwonrails / 00-about-search-api-examples.md
Created January 20, 2016 17:27 — forked from jasonrudolph/00-about-search-api-examples.md
5 entertaining things you can find with the GitHub Search API
@cwonrails
cwonrails / gist:dde3886a23bb4c38ffe8
Created January 4, 2016 20:58 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@cwonrails
cwonrails / gist:a957046be77d9d870b8b
Created December 22, 2015 21:01 — forked from juanje/gist:3797297
Mount apt cache of a Vagrant box in the host to spin up the packages installation

This is a little trick I use to spin up the packages instalation on Debian/Ubuntu boxes in Vagrant.

I add a simple function that checks if a directory named something similar to ~/.vagrant.d/cache/apt/opscode-ubuntu-12.04/partial (it may have another path in Windows or MacOS) and create the directory if it doesn't already exist.

def local_cache(basebox_name)
  cache_dir = Vagrant::Environment.new.home_path.join('cache', 'apt', basebox_name)
  partial_dir = cache_dir.join('partial')
  partial_dir.mkdir unless partial_dir.exist?
 cache_dir
@cwonrails
cwonrails / Fetch.sublime-settings
Created November 3, 2015 19:24 — forked from gaspanik/Fetch.sublime-settings
ST: Fetch files & packages
{
"files":
{
"Chart.js": "https://github.com/nnnick/Chart.js",
"Modernizr.js": "http://modernizr.com/downloads/modernizr-latest.js",
"Normalize.css 1.x": "https://github.com/necolas/normalize.css/blob/v1.1.3/normalize.css",
"Normalize.css 2.x": "https://github.com/necolas/normalize.css/blob/v2.1.3/normalize.css",
"Normalize.css 3.x": "https://raw.githubusercontent.com/necolas/normalize.css/master/normalize.css",
"Respond.js": "https://github.com/scottjehl/Respond/blob/master/dest/respond.min.js",
"Sanitize.css": "https://raw.github.com/ZDroid/sanitize.css/master/sanitize.css",
@cwonrails
cwonrails / -
Created September 27, 2015 14:09 — forked from kemitchell/-
npm license values
74925 NONE
54706 MIT
9268 ISC
3050 BSD
1521 BSD-2-CLAUSE
791 APACHE-2.0
699 APACHE 2.0
392 BSD-3-CLAUSE
364 WTFPL
346 UNKNOWN
@cwonrails
cwonrails / sm-annotated.html
Last active September 15, 2015 18:11 — forked from hdragomir/sm-annotated.html
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
BOX_NAME=vagrant-build
BASE_DIR="`pwd`/machines"
BOX_DIR="${BASE_DIR}/${BOX_NAME}"
mkdir -p ${BASE_DIR}
VBoxManage createvm --name "${BOX_NAME}" --ostype RedHat_64 --basefolder ${BASE_DIR}
VBoxManage registervm "${BOX_DIR}/${BOX_NAME}.vbox"
mkdir -p tmp