Skip to content

Instantly share code, notes, and snippets.

View jrodl3r's full-sized avatar

John Rodler jrodl3r

View GitHub Profile

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@ericelliott
ericelliott / essential-javascript-links.md
Last active May 17, 2024 03:38
Essential JavaScript Links
@chriseppstein
chriseppstein / compass_browser_support_thresholds.scss
Created August 7, 2014 20:45
This is how you can ask compass what the usage threshold cutoff for each browser version is.
@each $browser in browsers() {
.#{$browser} {
@each $version in browser-versions($browser) {
threshold: $version omitted-usage($browser, $version);
}
}
}
@cowboy
cowboy / bocoup-training-more-efficient-event-handlers.js
Created February 12, 2013 21:38
Bocoup training: More Efficient jQuery Event Handlers
// Straightforward + simple.
$("button").on("click", function(event) {
event.preventDefault();
var button = $(this);
var numberElem = button.find(".number");
var number = Number(numberElem.text()) - 1;
numberElem.text(number);
if (number === 0) {
button.prop("disabled", true);
button.off("click");
@cowboy
cowboy / Cowboy - Presentation.tmTheme
Created November 29, 2012 19:55
Sublime / TM theme I use for presentations.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Jacob Rus</string>
<key>comment</key>
<string>Created by Jacob Rus. Based on ‘Slate’ by Wilson Miner</string>
<key>name</key>
<string>Cowboy - Presentation</string>
@jrodl3r
jrodl3r / H5BP_Clone
Created October 29, 2012 01:55
Clone H5BP to New Project
git clone https://github.com/h5bp/html5-boilerplate.git H5BP_Custom
cd H5BP_Custom
git remote rm origin
git remote add origin https://github.com/JRodl3r/H5BP_Custom.git
git push origin master
@olivierlacan
olivierlacan / launch_sublime_from_terminal.markdown
Created September 5, 2011 15:50
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

:+1:
:-1:
:airplane:
:art:
:bear:
:beer:
:bike:
:bomb:
:book:
:bulb:
@apinstein
apinstein / ipfw bandwidth throttle.sh
Created August 3, 2009 19:38
ipfw bandwidth throttling
#!/bin/sh
#
# Use ipfw to throttle bandwidth.
# usage:
# ./throttle.sh # Throttle at default (60KB/s)
# ./throttle.sh 5 # Throttle at custom speed (5KB/s)
# ./throttle.sh off # Turn throttling off
# flush rules
ipfw del pipe 1