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
;;; js-beautify.el -- beautify some js code | |
(defgroup js-beautify nil | |
"Use jsbeautify to beautify some js" | |
:group 'editing) | |
(defcustom js-beautify-args "--jslint-happy --brace-style=end-expand --keep-array-indentation" | |
"Arguments to pass to jsbeautify script" | |
:type '(string) | |
:group 'js-beautify) |
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
;;; js-beautify.el -- beautify some js code | |
(defgroup js-beautify nil | |
"Use jsbeautify to beautify some js" | |
:group 'editing) | |
(defcustom js-beautify-args "--jslint-happy --brace-style=end-expand --keep-array-indentation" | |
"Arguments to pass to jsbeautify script" | |
:type '(string) | |
:group 'js-beautify) |
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
-- Things to Pomodoro App for iPad | |
-- This script asks Things for the currently selected todos | |
-- and generates a Pomodoro App for iPad compatible JSON file | |
-- for you to import in to the app (using Dropbox) | |
-- | |
-- Created by Thomas on 2011-02-17 | |
-- Inspired by Andreas on 2011-02-17 | |
-- | |
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
-- OmniFocus (or many other apps) to Pomodoro App for iPad | |
-- This script practically takes text that's on your clipboard | |
-- and generates a Pomodoro App for iPad compatible JSON file | |
-- to import into the app. (using Dropbox) | |
-- | |
-- I'm using it with OmniFocus, where copied tasks remain | |
-- on the clipboard as lines of text, basically. | |
-- | |
-- Created by Andreas on 2011-02-17 | |
-- http://www.macosxscreencasts.com |
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
javascript:(function(){var p=[];for(var i in window){if(/webkit/i.test(i))p.push(i);}p.sort();alert(p.join('\n'));})(); |
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
//TODO: refactoring | |
(function($){ | |
var origOuterWidth = $.fn.outerWidth, | |
origOuterHeight = $.fn.outerHeight; | |
/** | |
* Get the current outer width for the first element in the set of matched elements. | |
* or set the outer width of each element in the set of matched elements. | |
* |
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($){ | |
var hasTouch = /android|iphone|ipad/i.test(navigator.userAgent.toLowerCase()), | |
eventName = hasTouch ? 'touchend' : 'click'; | |
/** | |
* Bind an event handler to the "double tap" JavaScript event. | |
* @param {function} doubleTapHandler | |
* @param {number} [delay=300] | |
*/ |
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
// usege: node haml2html <file> | |
var sys = require('util'), | |
fs = require('fs'), | |
http = require('http'), | |
exec = require('child_process').exec | |
var argv = process.argv, | |
target = argv[2] | |
if(!target){ |
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($) { | |
var hasTouch = 'ontouchstart' in window; | |
/** | |
* @param {number} [amount=2] | |
* @param {string} [direction=both] both, h, v | |
*/ | |
$.fn.feedbackable = function(options){ | |
var settings = $.extend({ |
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(){ | |
var hasTouch = 'ontouchstart' in window; | |
x$.extend({ | |
tap: function(fn, delay){ | |
// browser fallback | |
if(!hasTouch){ | |
return this.each(function(){ | |
x$(this).click(fn); |