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
String.prototype.validate = function (regex) { | |
var pattern = { | |
zip: /^\d{5}([\-])?$/, | |
email: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i, | |
ip: /(?:\d{1,3}\.){3}\d{1,3}/ | |
}; | |
return pattern[regex].test(this.trim()); | |
} |
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
> console.log(util.inspect(Date, true, null)) | |
{ [Function: Date] | |
[now]: { [Function: now] [arguments]: null, [length]: 0, [name]: 'now', [caller]: null }, | |
[arguments]: null, | |
[UTC]: { [Function: UTC] [arguments]: null, [length]: 7, [name]: 'UTC', [caller]: null }, | |
[length]: 7, | |
[name]: 'Date', | |
[prototype]: | |
{ Invalid Date | |
[constructor]: [Circular], |
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
<script type="text/javascript"> | |
var client = new XMLHttpRequest(); | |
client.open("GET", "http://zip.elevenbasetwo.com?zip=48867", true); | |
client.onreadystatechange = function () { | |
if(client.readyState == 4) { | |
alert(client.responseText); | |
}; | |
}; | |
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
curl http://api.nodejitsu.com -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.83 Safari/535.11' -v |
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
[ { '@': | |
{ b1: '475174', | |
start_tfs_zulu: '2012-04-17T03:12:59Z', | |
event: 'Single', | |
start_tfs: '231259', | |
num: '75', | |
b2: '460026', | |
pitcher: '543022', | |
batter: '475174', | |
b3: '', |
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
NameVirtualHost *:80 | |
<Directory /var/www/> | |
AllowOverride All | |
</Directory> | |
<VirtualHost *:80> | |
</VirtualHost> | |
Include sites-enabled/* |
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
<VirtualHost *:80> | |
ServerName mtambo.com | |
ServerAlias www.mtambo.com | |
DocumentRoot /var/www/mtambo.com/htdocs | |
ErrorLog /var/www/mtambo.com/logs/error.log | |
CustomLog /var/www/mtambo.com/logs/acomess.log common | |
</VirtualHost> |
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
if (err || !files) return (err ? console.log(err) : (function() {throw new Error('no files')})()) |
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
{ | |
"author": "Joshua Holbrook", | |
"name": "hoarders", | |
"description": "node.js's most complete \"utility grab-bag\". Dedicated to substack.", | |
"version": "0.0.0", | |
"dependencies": { | |
"27bslash6-module": "*", | |
"2co": "*", | |
"2csv": "*", | |
"2kenizer": "*", |
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
#!/bin/bash | |
ip=`/usr/bin/curl -s ipv4.icanhazip.com` | |
echo -n $ip | /usr/bin/pbcopy | |
echo $ip |