Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am docto on github.
  • I am docto (https://keybase.io/docto) on keybase.
  • I have a public key whose fingerprint is 7669 295F 16F7 F46A 72AB EAAE B628 448A 45C8 6385

To claim this, I am signing this object:

jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
phone_number = phone_number.replace(/\s+/g, "");
return this.optional(element) || phone_number.length > 9 &&
phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
}, "Please specify a valid phone number");
// Source: http://docs.jquery.com/Plugins/Validation/CustomMethods/phoneUS
<snippet>
<content><![CDATA[
console.log(" /");
console.log(" .7");
console.log(" \\\ , //");
console.log(" |\\\.--._/|//");
console.log(" /\\\ ) ) ).'/");
console.log(" /( \\\ // /");
console.log(" /( J`((_/ \\\");
console.log(" / ) | _\\\ /");
@docto
docto / gist:3921960
Created October 20, 2012 03:58 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@docto
docto / gist:3471544
Created August 25, 2012 22:20 — forked from edhedges/gist:2995805
Sublime Text 2 - Useful Shortcuts (Mac OS X)

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt