Skip to content

Instantly share code, notes, and snippets.

View twitchy's full-sized avatar

Reeve Jolliffe twitchy

View GitHub Profile
@twitchy
twitchy / flip.css
Created February 15, 2013 20:33
css flip
.flip {
-moz-transform: scaleX(-1);
-o-transform: scaleX(-1);
-webkit-transform: scaleX(-1);
transform: scaleX(-1);
@twitchy
twitchy / text-selection.css
Created February 15, 2013 20:37
change default text selection
::selection {
background-color: #dd2020;
color: #fff;
}
::-moz-selection {
background-color: #dd2020;
color: #fff;
}
@twitchy
twitchy / blockquote.css
Created February 15, 2013 21:02
Simple blockquote
blockquote {
background:#f9f9f9;
border-left:10px solid #ccc;
margin:1.5em 10px;
padding:.5em 10px;
quotes:"\201C""\201D""\2018""\2019";
}
blockquote:before {
color:#ccc;
content:open-quote;
@twitchy
twitchy / 0_reuse_code.js
Created November 7, 2013 21:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@twitchy
twitchy / system-nobounce.txt
Created January 20, 2014 17:14
Prevent bouncing dock icon nag alert
defaults write com.apple.dock no-bouncing -bool TRUE
killall Dock
@twitchy
twitchy / grunt-build-control
Last active August 29, 2015 13:56
grunt-build-control
// GRUNT-BUILD-CONTROL
// https://npmjs.org/package/grunt-build-control
// http://curtisblackwell.com/blog/my-deploy-method-brings-most-of-the-boys-to-the-yard
//
// use grunt to auto push /dist to live, stage, whatever on build
//
- npm install grunt-build-control --save-dev
- // grunt.loadNpmTasks('grunt-build-control'); ( not needed with yeoman )
- configuration:
@twitchy
twitchy / git-autocorrect
Created February 9, 2014 16:41
git autocorrect
git config --global help.autocorrect 1
@twitchy
twitchy / grunt-useful-tasks
Created February 9, 2014 18:00
useful grunt tasks
https://github.com/jrcryer/grunt-pagespeed
https://npmjs.org/package/grunt-responsive-images
https://npmjs.org/package/grunt-modernizr
https://github.com/globaldev/grunt-montage
https://github.com/nicholasstephan/grunt-spritesheet
https://npmjs.org/package/grunt-autoshot
@twitchy
twitchy / js-method-in-callback.js
Created June 6, 2014 05:24
Invoke method in from within a callback
function MyClass() {
this.myCallback = function() {
alert("MyClass.myCallback()");
};
this.startRequest = function() {
var myself = this;
GM_xmlhttpRequest({
'method': 'GET',
'url': "http://www.google.com/",
@twitchy
twitchy / dispatchTables.js
Created June 11, 2014 05:07
Dispatch Tables
var thingsWeCanDo = {
doThisThing : function() { /* behavior */ },
doThatThing : function() { /* behavior */ },
doThisOtherThing : function() { /* behavior */ },
default : function() { /* behavior */ }
};
var doSomething = function(doWhat) {
var thingToDo = thingsWeCanDo.hasOwnProperty(doWhat) ? doWhat : "default"
thingsWeCanDo[thingToDo]();