Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
#!/bin/bash | |
cp $1 ~/Dropbox/Public/ | |
echo "http://dl.dropbox.com/u/<your id>/"$1 | xclip -i -selection clipboard |
// call elementQuery and pass it an object containing the tests. | |
// also pass it an object containing a 'passed' callback and a 'failed' callback | |
// you can also pass a bool for whether you want to bind this to be run on resize | |
$('#torso').elementQuery({ 'min-width' : 910 , 'max-width' : 1155}, { | |
passed : function() { | |
$(this).addClass('l-full').removeClass('l-xlarge'); | |
}, | |
failed : function() { | |
$(this).removeClass('l-full'); |
// call elementQuery and pass it an object containing the tests. | |
// also pass it an object containing a 'passed' callback and a 'failed' callback | |
// you can also pass a bool for whether you want to bind this to be run on resize | |
$('#torso').elementQuery({ 'min-width' : 910 , 'max-width' : 1155}, { | |
passed : function() { | |
$(this).addClass('l-full').removeClass('l-xlarge'); | |
}, | |
failed : function() { | |
$(this).removeClass('l-full'); |
var ED = ED || {}; | |
// Utility functions | |
ED.util = (function() { | |
// Data structure functions | |
function each(object, callback) { | |
if (object === null) return; |
<?php | |
/** | |
* Quickly assemled rest controller based on Kohana 3's Kohana_Controller_REST | |
* https://github.com/kohana/core/blob/3.1%2Fmaster/classes/kohana/controller/rest.php | |
* | |
* Added functionality from FuelPHP's Controller_Rest | |
* https://github.com/fuel/fuel/blob/develop/fuel/core/classes/controller/rest.php | |
* | |
* All credits to Kohana and FuelPHP teams! | |
* Jonas Nyström - cambiata |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
// 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"); |
$base-font-size:16px; | |
@mixin base-10-rem($property, $values...) { | |
$length:length($values); | |
$base-value:10px; | |
$px-values:""; | |
$rem-values:""; | |
@for $i from 1 through $length { | |
$tmp:$base-value * nth($values, $i); |
#!/usr/bin/env ruby | |
# | |
# Homebrew fix 1 - osxfuse dylibs | |
# | |
# original solutions: https://gist.github.com/aaronzirbes/3239033 | |
# https://gist.github.com/trinitronx/5437061 | |
# | |
# Fixes the following: | |
# | |
# > Warning: Unbrewed dylibs were found in /usr/local/lib. |
#!/bin/bash | |
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \ | |
"/usr/local/lib/libosxfuse_i32.2.dylib" \ | |
"/usr/local/lib/libosxfuse_i64.2.dylib" \ | |
"/usr/local/lib/libmacfuse_i64.2.dylib" \ | |
"/usr/local/lib/libosxfuse_i32.la" \ | |
"/usr/local/lib/libosxfuse_i64.la" \ | |
"/usr/local/lib/pkgconfig/osxfuse.pc" ) |