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
<!-- save to ~/Library/Application Support/Sublime Text 2/Packages/User --> | |
<snippet> | |
<content><![CDATA[console.log($1);$0]]></content> | |
<tabTrigger>log</tabTrigger> | |
<scope>source.html,source.javascript</scope> | |
</snippet> |
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
[ | |
// Drawn from http://www.sublimetext.com/forum/viewtopic.php?f=2&t=7477#p31755 | |
// Kills the annoying default of cmd-left jumping to the start of a line's | |
// code, rather than column 0. | |
{ "keys": ["super+left"], "command": "move_to", "args": {"to": "hardbol", "extend": false} }, | |
{ "keys": ["super+right"], "command": "move_to", "args": {"to": "hardeol", "extend": false} } | |
] |
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
<!doctype html> | |
<html> | |
<head> | |
<script> | |
Array.prototype.each = function (method) { | |
if (this) { | |
if (Array === this.constructor) { | |
for (i = 0; i < this.length; i++) { | |
method(this[i]); | |
} |
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
// Sometimes you want to know the exact pixel dimension of a CSS property, but it’s | |
// in non-pixel units. This hack might help you out. | |
// | |
// Note: assumes a jQuery object `$`. | |
// | |
// License: http://github.com/stilist/ratafiacurrant/blob/master/License | |
var cssDimensionInPx = (function () { | |
return function ($element, property) { | |
var dimension = $element.css(property); |
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
// How to determine if you need a vendor prefix to access a CSS property. | |
// | |
// License: http://github.com/stilist/ratafiacurrant/blob/master/License | |
var vendorPrefixes = ["", "-webkit-", "-moz-"]; | |
var test = document.createElement("div"); | |
// http://unscriptable.com/index.php/2009/05/01/a-better-javascript-memoizer/ | |
var cssPrefix = (function () { | |
var cache = {}; | |
return function (property, value) { |
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
// ==UserScript== | |
// @name Twitter hashtag eliminator | |
// @description Hides all hashtags on Twitter | |
// @include http://www.twitter.com/* | |
// @include http://twitter.com/* | |
// @include https://www.twitter.com/* | |
// @include https://twitter.com/* | |
// @creator Jordan Cole (http://ratafia.info) | |
// ==/UserScript== |
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
#!/usr/bin/env ruby -wKU | |
# encoding: UTF-8 | |
# provided under the MIT license; see | |
# http://github.com/stilist/ratafiacurrant/blob/master/License | |
require "rubygems" | |
require "sinatra" | |
helpers do |
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
<!doctype html> | |
<html lang='en'> | |
<head> | |
<title>JavaScript Solari Board</title> | |
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script> | |
<script> | |
$(document).ready(function () { | |
$("body").append($("<div id='rack'>")); | |
var from_string = "Hello"; |
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
<!doctype html> | |
<html lang='en'> | |
<head> | |
<meta charset='UTF-8'> | |
<title>Overlay toy</title> | |
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script> | |
<script> | |
$(document).ready(function () { | |
$("div.open span").click(function () { | |
$overlay = $("<div>").attr("id", "overlay"). |
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
#!/usr/bin/env ruby -w | |
=begin | |
I had paths like: | |
entries/02009/December/01/x.rc | |
I wanted paths like: | |
entries/02009/December/01/text/x.rc | |
Code provided under the MIT license. Get a copy at |