Skip to content

Instantly share code, notes, and snippets.

// details: http://joseoncode.com/2011/08/08/javascript-continuous-testing-with-qunit-phantomjs-and-powershell/
/**
 * Wait until the test condition is true or a timeout occurs. Useful for waiting
 * on a server response or for a ui change (fadeIn, etc.) to occur.
 *
 * @param testFx javascript condition that evaluates to a boolean,
 * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
 * as a callback function.
 * @param onReady what to do when testFx condition is fulfilled,
(function( $, document ){
var enablePlaceholders = {
init: function( el ){
var $t = this, $ = jQuery;
$t.el = $(el).data( 'hasplaceholder', true );
$t.placeholder = $t.el.attr('placeholder');
$t.addPlaceholder( $t.el );
} // init
import sublime, sublime_plugin, string
class MultiSelectNumbersCommand(sublime_plugin.TextCommand):
def run(self, edit):
window = self.view.window()
def countThoseSelections(pattern):
pattern = string.split( pattern, ':' )
region_index = int( pattern[0] )