This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ "keys": ["alt+super+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} }, | |
{ "keys": ["super+shift+f"], "command": "search_in_project" }, // requires SearchInProject to be enabled | |
{ "keys": ["super+k","super+m"], "command": "toggle_minimap" }, | |
{ "keys": ["super+k", "super+t"], "command": "title_case" }, | |
{ | |
"keys": ["super+alt+left"], | |
"command": "set_layout", | |
"args": { | |
"cols": [0.0, 0.33, 1.0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Function for returning the user to any 'y' position in a Facebook app/tab. Uses jQuery animate, otherwise gracefully falls-back without it. | |
// Source[1]: http://stackoverflow.com/questions/7193425/how-do-you-animate-fb-canvas-scrollto | |
// Source[2]: https://developers.facebook.com/docs/reference/javascript/FB.Canvas.scrollTo/ | |
var scrollY = function (y) { | |
if (window.jQuery) { | |
FB.Canvas.getPageInfo (function (pageInfo) { | |
$({ y: pageInfo.scrollTop }) | |
.animate({ | |
y: y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Konami code with jQuery. | |
// Source: http://paulirish.com/2009/cornify-easter-egg-with-jquery/ | |
var kkeys = [], | |
konami = "38,38,40,40,37,39,37,39,66,65"; | |
$(document).keydown(function(evt) { | |
kkeys.push( evt.keyCode ); | |
if ( kkeys.toString().indexOf( konami ) >= 0 ){ | |
$(document).unbind('keydown',arguments.callee); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller | |
// fixes from Paul Irish and Tino Zijdel | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns rotation in degrees when obtaining transform-styles using javascript | |
* http://stackoverflow.com/questions/8270612/get-element-moz-transformrotate-value-in-jquery | |
*/ | |
function getRotationDegrees(obj) { | |
var matrix = obj.css("-webkit-transform") || | |
obj.css("-moz-transform") || | |
obj.css("-ms-transform") || | |
obj.css("-o-transform") || | |
obj.css("transform"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Using default click events in touch-supported devices | |
* incurs a delay (in order to determine if the user is performing a gesture). | |
* | |
* Detecting for touchstart events using the foloowing, we can replace the default 'clicks' | |
* for touch events, making a snappier experience for mobile/touch devices. | |
* Use wisely as this could prevent some gestures from happening. If there are scrolling | |
* issues try swap out 'touchstart' for 'touchend' | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* An extend function to merge some default arguments | |
* with those passed in from the user. | |
* | |
* @param {object} obj The default settings | |
* @param {object} extObj Arguments from the user | |
* @return {object} A merged object | |
* | |
*/ | |
var extend = function (obj, extObj) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A Google Analytics event tracking proxy. | |
* | |
* This lobal allows us to do tests for the instantiation of _gaq | |
* and also allows us easier debugging in a test environment. | |
* | |
* Hat-tip to @stugoo for most the self-invoked function features! | |
* | |
*/ | |
window.track = function (args) { |