Skip to content

Instantly share code, notes, and snippets.

View ryanburgess's full-sized avatar

Ryan Burgess ryanburgess

View GitHub Profile
@ryanburgess
ryanburgess / Placeholder hack.js
Created February 11, 2014 01:58
Placeholder text in old browsers (pear.rs)
$(function(){
var d = "placeholder" in document.createElement("input");
if (!d){
$("input[placeholder]").each(function(){
$(this).val(element.attr("placeholder")).addClass('placeholder');
}).bind('focus',function(){
if ($(this).val() == element.attr('placeholder')){
$(this).val('').removeClass('placeholder');
}
}).bind('blur',function(){
@ryanburgess
ryanburgess / gist:ff177d78f2781d5450ef
Created November 2, 2014 23:38
Open iOS Simulator without opening Xcode
// Alias
alias iphone='open /Applications/Xcode.app/Contents/developer/applications/ios\ Simulator.app'
// command
open /Applications/Xcode.app/Contents/developer/applications/ios\ Simulator.app
@ryanburgess
ryanburgess / README.md
Last active August 29, 2015 14:12
Determines whether or not the given browser is IE8.

Is IE8

Is a simple JavaScript module that determines whether or not the given browser is IE8.

Install

npm install is-ie8 --save-dev
@ryanburgess
ryanburgess / directory
Last active August 29, 2015 14:17
Bash Shell Alias - quick directory
# a quick way to get out of current directory
alias .1='cd ../'
alias .2='cd ../../'
alias .3='cd ../../../'
alias .4='cd ../../../../'
alias .5='cd ../../../../../'
alias .6='cd ../../../../../../'
alias .7='cd ../../../../../../../'
alias .8='cd ../../../../../../../../'
@ryanburgess
ryanburgess / server
Created March 18, 2015 22:07
Bash Shell Alias - start python server
# start server
alias server='python -m SimpleHTTPServer 8000'
@ryanburgess
ryanburgess / git-log
Created March 18, 2015 22:08
Bash Shell Alias - visualize git log
# Visualize git log
alias lg='git log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"'
@ryanburgess
ryanburgess / pretty-git-log
Created March 18, 2015 22:09
Bash Shell Alias - pretty git log
# Pretty git log
alias gl="git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@ryanburgess
ryanburgess / launch-iphone
Created March 18, 2015 22:12
Bash Shell Alias - launch iPhone simulator
alias iphone='open /Applications/Xcode.app/Contents/developer/applications/ios\ Simulator.app'
@ryanburgess
ryanburgess / git-soft-reset
Created March 18, 2015 22:13
Bash Shell Alias - git soft reset
alias fix='git reset --soft HEAD~1'
@ryanburgess
ryanburgess / open-ports
Created March 18, 2015 22:15
Bash Shell Alias - show open ports
alias ports='netstat -tulanp'