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
$.extend((function() { | |
var counts = {}; | |
return { | |
generateId: function(prefix) { | |
prefix = (prefix || 'jq') + '-'; | |
counts[prefix] = counts[prefix] || 0; | |
return prefix + counts[prefix]++; | |
} | |
} | |
})()); |
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
require 'rubygems' | |
require 'tzinfo' | |
require 'json' | |
# Run to generate Olson => goog.i18n.TimeZone data. | |
zones = %w(UTC Pacific/Auckland) | |
FIFTY_YEARS_FROM_NOW = DateTime.now + 365 * 50 | |
MINUTES_IN_HOUR = 60 |
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
$('.reply-to').live('click', function() { | |
var hash = ($(this).attr('href') || '').split('#')[1]; | |
if ($('#' + hash).length && hash) { | |
window.location.hash = hash; | |
return 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
Ext.apply(Ext.form.VTypes, { | |
publicip: function(v) { | |
var errorMessage = 'Invalid public IP address', | |
i, | |
parts = []; | |
v = Ext.util.Format.trim(v || '').split('.'); | |
for (i = 0; i < v.length; i++) { | |
var num = parseInt(v[i]); | |
if (Ext.isNumber(num) && num >= 0 && num <= 255) { | |
parts.push(num); |
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
### | |
Copyright (c) 2010 Maxim Vasiliev, Rowan Crawford | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
/** Untested */ | |
Ajax.Pjaxer = Class.create(Ajax.Updater, { | |
initialize: function($super, container, url, options) { | |
options = Object.clone(options); | |
options.headers = options.headers || {}; | |
Object.extend(options.headers, { | |
'X-PJAX': 'true' | |
}); | |
var onComplete = options.onComplete; |
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 index = 0, | |
words = ['badger', 'badger', 'badger', 'badger', 'badger', 'mushroom'] | |
$.extend({ | |
badger: function() { | |
return words[index++ % words.length]; | |
} | |
}); | |
}(jQuery)); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<sop id="DLM3931700" irdnumbering="no" raised.by="Government" sop.no="265" stage="published" xml:lang="en-NZ" year="2011" year.imprint="2011"><date>Thursday, 4 August 2011</date><billref>Aquaculture Legislation Amendment Bill (No 3)</billref><body id="DLM3931701"><heading>Proposed amendments</heading><motion>Hon Phil Heatley, in Committee, to move the following amendments:</motion><sop.amend id="DLM3931702"><clause.ref>Clause 13: new section 25A</clause.ref><sop.para><text><emphasis style="italic">Subsections (9) and (10)</emphasis>: to omit these subsections (lines 19 to 28 on page 21) and substitute the following subsections:</text><instrument.amend close.quote="no" open.quote="yes" quote="1"><subprov quote="1" skeleton="no"><label auto.number="no" denominator="yes" quote="1">9</label><para><text>The chief executive must decline the application, if the applicant does not lodge—</text><label-para quote="1" skeleton="no"><label auto.number="no" denominator="yes" quote="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
execve("/usr/local/bin/node", ["node", "test.js"], [/* 38 vars */]) = 0 | |
brk(0) = 0x2b7a000 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fce53525000 | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
open("/etc/ld.so.cache", O_RDONLY) = 3 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=124100, ...}) = 0 | |
mmap(NULL, 124100, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fce53506000 | |
close(3) = 0 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) |
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
1.9.3-p0 :002 > Crimson::Parser.parse('nil') | |
Exception: Parse error: Expected one of -, 0, nil at line 1, column 4 (byte 4) after . | |
from /Users/jnh/Dev/Toys/CrimsonScript/lib/crimson/parser.rb:12:in `parse' | |
from (irb):2 | |
from /Users/jnh/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in `<main>' | |
1.9.3-p0 :003 > Crimson::Parser.parse('0') | |
Exception: Parse error: Expected one of -, 0, nil at line 1, column 2 (byte 2) after . | |
from /Users/jnh/Dev/Toys/CrimsonScript/lib/crimson/parser.rb:12:in `parse' | |
from (irb):3 | |
from /Users/jnh/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in `<main>' |
OlderNewer