Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jonnymaceachern's full-sized avatar

Jonny jonnymaceachern

  • Developer @ Media Mechanics
  • Halifax, NS
  • 12:32 (UTC -03:00)
View GitHub Profile
@shrwnsan
shrwnsan / gist:2860805
Created June 3, 2012 01:14
Sublime Text 2 - Fetch Settings
{
"files":
{
"jquery" : "http://code.jquery.com/jquery.js",
"jquery.min" : "http://code.jquery.com/jquery.min.js",
"jquery-cookie" : "https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js",
"jquery-dotimeout" : "https://raw.github.com/cowboy/jquery-dotimeout/master/jquery.ba-dotimeout.min.js",
"jquery-extra-selectors" : "https://raw.github.com/keithclark/JQuery-Extended-Selectors/master/jquery-extra-selectors.js",
"jquery-flexslider" : "https://raw.github.com/mbmufffin/FlexSlider/master/jquery.flexslider-min.js",
"jquery-mediaelement" : "https://raw.github.com/johndyer/mediaelement/master/build/mediaelement-and-player.js",
@mrinalwadhwa
mrinalwadhwa / clearfix.css
Created June 15, 2012 05:37
CSS clearfix
/* based on http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified/ */
.cf:before,
.cf:after {
content: ".";
display: block;
height: 0;
overflow: hidden;
}
.cf:after {clear: both;}
@thomaspark
thomaspark / bootswatchlet.js
Created August 16, 2012 04:32
Bootswatch bookmarklet
if($('.bootswatcher')[0]){
$('.bootswatcher').remove();
} else {
var $e = $('<select class="bootswatcher"><option>Amelia</option><option>Cerulean</option><option>Cosmo</option><option>Cyborg</option><option>Journal</option><option>Readable</option><option>Simplex</option><option>Slate</option><option>Spacelab</option><option>Spruce</option><option>Superhero</option><option>United</option></select>');
var l = 1 + Math.floor(Math.random() * $e.children().length);
var r = '<link rel="stylesheet" href="http://bootswatch.com/default/bootstrap-responsive.min.css">';
$e.css({'z-index': '99999', 'position': 'fixed', 'top': '5px', 'right': '5px', 'opacity': '0.5'}
).hover(
function(){$(this).css('opacity', '1');},
function(){$(this).css('opacity', '0.5');}
@rviscomi
rviscomi / Auto GA Event Tracking.js
Created September 6, 2012 08:43
Automatically trigger Google Analytics events by setting data attributes on HTML elements to track.
/* Custom event-tracker wrapper function. */
function trackEvent(category, action) {
if (!category || !action) {
console.warn('trackEvent takes a category and an action.');
}
else {
_gaq.push(['_trackEvent'].concat([].slice.call(arguments)));
}
}
@evalica
evalica / CSScomb Alphabetical order
Created October 2, 2012 17:13
See CSScomb (http://csscomb.com/) for more details. Alphabetical order can be used by replacing $default_sort_order variable in "/Sublime Text 2/Packages/CSScomb/csscomb/libs/csscomb.php" with the following code:
$default_sort_order = '[
"-webkit-animation",
"-moz-animation",
"-ms-animation",
"-o-animation",
"animation",
"-webkit-animation-delay",
"-moz-animation-delay",
"-ms-animation-delay",
"-o-animation-delay",
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@sct
sct / DarkMonokai.qss
Created November 9, 2012 21:04
dark monokai quassel
/**
* ____ _ ___ ___ _ _
* | _ \ | | | \/ | | | (_)
* | | \ |__ _ _ __| | __ | . . | ___ _ __ ___ | | __ __ _ _
* | | | | _` | '__| |/ / | |\/| |/ _ \| '_ \ / _ \| |/ // _` | |
* | |_/ /(_| | | | < | | | | (_) | | | | (_) | <| (_| | |
* |____/\__,_|_| |_|\_\ \_| |_/\___/|_| |_|\___/|_|\_\\__,_|_|
*
* Quassel Theme
*
@iambibhas
iambibhas / scopes.txt
Last active April 8, 2024 20:37
Sublime Text 2: Snippet scopes
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
@clopez
clopez / DarkMonokai.qss
Last active October 12, 2017 22:47 — forked from sct/DarkMonokai.qss
Amazing stylesheet for Quassel IRC Client
/**
* ____ _ ___ ___ _ _
* | _ \ | | | \/ | | | (_)
* | | \ |__ _ _ __| | __ | . . | ___ _ __ ___ | | __ __ _ _
* | | | | _` | '__| |/ / | |\/| |/ _ \| '_ \ / _ \| |/ // _` | |
* | |_/ /(_| | | | < | | | | (_) | | | | (_) | <| (_| | |
* |____/\__,_|_| |_|\_\ \_| |_/\___/|_| |_|\___/|_|\_\\__,_|_|
*
* Quassel Theme
*