Skip to content

Instantly share code, notes, and snippets.

Avatar

Jamie Hamel‑Smith jamiehs

View GitHub Profile
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

View gist:7437652
[color]
ui = true
[alias]
st = status
c = commit -m
a = add
aa= !git add -u && git add . && git status
co = checkout
cob = checkout -b
up = !git fetch origin && git rebase origin/master
View onDOMContentLoaded-01.js
const PHANTOM_FUNCTION_PREFIX = '/* PHANTOM_FUNCTION */';
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
if (msg.indexOf(PHANTOM_FUNCTION_PREFIX) === 0) {
eval('(' + msg + ')()');
} else {
console.log(msg);
}
View adjust-background-color.css
body .lens-tool-kit.sd2-light .slide-source-custom.slide-type-image .sd2-node-caption {
background: gray;
}
View bash.sh
#Alias
alias ll="ls -lah"
alias svnup="svn up --ignore-externals"
alias svnst="svn st --ignore-externals"
alias vhosts="subl /etc/apache2/extra/httpd-vhosts.conf ; subl /etc/hosts"
export PATH="/usr/local/mysql/bin:$PATH"
export PATH=/usr/local/bin:$PATH
export SVN_EDITOR="subl -w"
View .bashrc
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
@jamiehs
jamiehs / mq.css
Created Oct 4, 2012 — forked from chriscoyier/mq.css
Media Query Breakpoints for Retina Displays
View mq.css
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
You can’t perform that action at this time.