Skip to content

Instantly share code, notes, and snippets.

View cjbarnes's full-sized avatar

chris barnes cjbarnes

View GitHub Profile
@pgib
pgib / README.md
Last active December 24, 2015 15:19
Throw this in your Jekyll `_plugins/ext.rb` or into a separate file.

Terminal Notifier for Jekyll site builds

This Jekyll monkey patch triggers a Mac OS X Notification Center notification using the terminal-notifier gem.

If you start jekyll without bundle, first install the necessary gems:

gem install terminal-notifier
gem install terminal-notifier-guard

If you start jekyll with bundle exec (ie. bundle exec jekyll serve --watch, ensure the above two gems are in your Gemfile:

@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@eirikbacker
eirikbacker / addEventListener-polyfill.js
Created June 3, 2012 19:30
addEventListener polyfill for IE6+
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence
(function(win, doc){
if(win.addEventListener)return; //No need to polyfill
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}}
function addEvent(on, fn, self){
return (self = this).attachEvent('on' + on, function(e){
var e = e || win.event;
e.preventDefault = e.preventDefault || function(){e.returnValue = false}
e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true}