Skip to content

Instantly share code, notes, and snippets.

View SlexAxton's full-sized avatar

Alex Sexton SlexAxton

View GitHub Profile
@gf3
gf3 / gist:328089
Created March 10, 2010 17:06
iTerm Colours
Black: 0, 0, 0
Red: 229, 34, 34
Green: 166, 227, 45
Yellow: 252, 149, 30
Blue: 196, 141, 255
Magenta: 250, 37, 115
Cyan: 103, 217, 240
White: 242, 242, 242
// The `quickEach` method will pass a non-unique jQuery instance
// to the callback meaning that there will be no need to instantiate
// a fresh jQuery instance on each iteration. Most of the slow-down
// inherent in jQuery's native iterator method (`each`) is the constant
// need to have access to jQuery's methods, and so most developers
// see constructing multiple instances as no issue... E.g.
// $(...).each(function(){ $(this)... $(this)... $(this)... });
// A better approach would be `quickEach`.
jQuery.fn.quickEach = (function(){
@mklabs
mklabs / pretty-bridge.js
Created March 3, 2011 23:27
My pretty bridge - inspired by, based on http://alexsexton.com/?p=51 - Using Inheritance Patterns to Organize Large jQuery Applications
// inspired by, based on http://alexsexton.com/?p=51
(function($, global) {
// Make sure Object.create is available in the browser (for our prototypal inheritance)
(function() {
if(typeof Object.create === 'function') {
return;
}
// the text-align: centaur; polyfill
// by paul irish
// it will find any styles that use `text-align: centaur` and instantly centaurize that text!
// uses the JSCSSP parser by Daniel Glazman
// thx to cameron daigle for march 2011's best javascript.
// http://textaligncentaur.com/
Array.prototype.join = function () {
return "LOL, UMAD?";
};
(function () {
"use built-ins";
console.log(['Hello', 'World'].join(', ')); // Hello, World
}());
@rmurphey
rmurphey / gist:1329222
Last active September 27, 2015 20:47
New computer setup notes

Bootstrap

  • Run software update
  • Download & install XCode in App Store
  • Install Google Chrome and enable syncing -- ensure 3rd party cookies are disabled
  • Install homebrew
  • brew install git
  • brew install wget
  • Copy ssh keys
  • git clone git@github.com:rmurphey/dotfiles.git
@TooTallNate
TooTallNate / transcode.js
Last active April 6, 2024 14:03
Transcode an OGG Vorbis audio file to an MP3 using node-ogg, node-vorbis and node-lame
/**
* Module dependencies.
*/
var fs = require('fs');
var ogg = require('ogg');
var lame = require('lame');
var vorbis = require('vorbis');
@heapwolf
heapwolf / discuss-excerpt.md
Last active December 10, 2015 23:58
discuss-excerpt

Paolo Fragomeni Jan 9 (2 days ago) to Nuno, Joe, Dan, discuss

Nuno, The Node Firm Members,

I've done a thorough background check on him and his immediate family. Despite his ridged, germanic sense of humor he appears to "have what it takes". We should definitely consider secretively acquiring a blood and stool sample and then performing official The Node Firm partner blessing ritual.

Concurrently, Paolo.