Skip to content

Instantly share code, notes, and snippets.

alert($('#thirdLevelContent table table input:checked').length + ' Zone checked');
var match = prompt("Please enter a match query to check", "zone 1");
if (match != null) {
// match = (match + '').replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
$('#thirdLevelContent table table').each(function() {
if ($(this).find('a').text().match(new RegExp(match))) {
if ($(this).find('input').length == 1) {
$(this).find('input').attr("checked", "checked");
}
}
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
# A small DSL for helping parsing documents using Nokogiri::XML::Reader. The
# XML Reader is a good way to move a cursor through a (large) XML document fast,
# but is not as cumbersome as writing a full SAX document handler. Read about
# it here: http://nokogiri.org/Nokogiri/XML/Reader.html
#
# Just pass the reader in this parser and specificy the nodes that you are interested
# in in a block. You can just parse every node or only look inside certain nodes.
#
# A small example:
#
@sb4m
sb4m / Fancy File Inputs.js
Created August 14, 2012 14:42 — forked from davist11/Fancy File Inputs.js
Fancy File Inputs
var SITE = SITE || {};
SITE.fileInputs = function() {
var $this = $(this),
$val = $this.val(),
valArray = $val.split('\\'),
newVal = valArray[valArray.length-1],
$button = $this.siblings('.button'),
$fakeFile = $this.siblings('.file-holder');
if(newVal !== '') {
@sb4m
sb4m / gist:3193448
Created July 28, 2012 13:40 — forked from matiskay/gist:3181894
Clean Install – Mountain Lion OS X 10.8 DP3