Skip to content

Instantly share code, notes, and snippets.

View stephenway's full-sized avatar

Stephen Way stephenway

View GitHub Profile
@stephenway
stephenway / ir.css
Created March 19, 2012 04:20
CSS Image Replacement
.ir {
border: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@stephenway
stephenway / jquery.autogrow.js
Created March 19, 2012 22:56 — forked from jlong/jquery.autogrow.js
Autogrow Textareas in jQuery
/*
* jquery.autogrow.js
*
* A plugin written for UserVoice that makes it easy to create textareas
* that automatically resize to fit their contents.
*
* Based on Scott Moonen's original code for Prototype.js:
*
* <http://scottmoonen.com/2008/07/08/unobtrusive-javascript-expandable-textareas/>
*
@stephenway
stephenway / inline-block.css
Created March 29, 2012 20:10
CSS Inline-Block
.inline-block {
*display: inline;
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
}
@stephenway
stephenway / color-hacker.scss
Created April 2, 2012 19:58
Sass color-hacker
@function scale-to-adjust($start, $change) {
@if($change > 0) {
$end: $start + $change;
@return percentage(($end - $start)/(100 - $start));
} @else {
@return percentage($change / $start);
}
}
@function scale-key($key, $color) {
@stephenway
stephenway / bashrc
Created April 3, 2012 14:28
bashrc
# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi
PS1='\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize
# Tell the terminal about the working directory at each prompt.
if [ "$TERM_PROGRAM" == "Apple_Terminal" ] && [ -z "$INSIDE_EMACS" ]; then
@stephenway
stephenway / gist:2293120
Created April 3, 2012 15:54
Sublime Install subl
# Add this to your ~/.bash_profile
export PATH="$PATH:$HOME/bin"
export EDITOR="subl -w"
# Run these commands in Terminal
source ~/.bash_profile
mkdir ~/bin
cd ~/
setfile -a "V" "bin"
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
@stephenway
stephenway / gist:2312847
Created April 5, 2012 17:54
CSS Apply a natural box layout model to all elements
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
@stephenway
stephenway / noise.jpg
Created April 5, 2012 19:50
Sass Noise Mixin
ffd8 ffe1 0018 4578 6966 0000 4949 2a00
0800 0000 0000 0000 0000 0000 ffec 0011
4475 636b 7900 0100 0400 0000 4600 00ff
e103 2d68 7474 703a 2f2f 6e73 2e61 646f
6265 2e63 6f6d 2f78 6170 2f31 2e30 2f00
3c3f 7870 6163 6b65 7420 6265 6769 6e3d
22ef bbbf 2220 6964 3d22 5735 4d30 4d70
4365 6869 487a 7265 537a 4e54 637a 6b63
3964 223f 3e20 3c78 3a78 6d70 6d65 7461
2078 6d6c 6e73 3a78 3d22 6164 6f62 653a
@stephenway
stephenway / portal.sass
Created April 6, 2012 15:44
Evolution of a portal sass
@import "compass/css3"
html, #Top, #Footer
:background-color #4C5358 !important
ol
:list-style-type decimal !important
#Top
+linear-gradient(color-stops(#79868E, #4C5358))
@stephenway
stephenway / gist:2352117
Created April 10, 2012 15:25
Install Internet Explorer on a Mac
Download & Install VirtualBox
http://www.virtualbox.org/wiki/Downloads
Decide which versions of Internet Explorer you want to download and install from Terminal
Install ALL versions of Internet Explorer: IE7, IE 8, and IE 9
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash
Install Internet Explorer 7 Only
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="7" bash