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
/* | |
smtpd.js is SMTP server written for node.js | |
MIT License | |
*/ | |
var tcp = require('tcp'); | |
var sys = require('sys'); |
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(){ | |
//this is the core exposed function | |
var o = function(a){return a.fn?a:(new core(a))} | |
function core(e){ | |
var i=this[L]=e[L]; | |
if(!i){this[0]=e;this[L]=1}; | |
for(;i--;)this[i]=e[i]; | |
this.fn = core.prototype; | |
this.o = o; |
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
//Partial Implemenation CSS 2.1 Selectors in 500 bytes | |
function QSA(s){var p=[document.documentElement];(" "+s).replace(/ *([\>\+]) */g,"$1;%").replace(/ ([\.\#\:])/g," *$1").replace(/([ \%\.\#\:\>\+\[]|^)(;\% .+?\]|;|[^\[\.\#\:\>\+\% ]*)/g,function(z,o,a){for(var i=0,n=[],c;i<p.length;i++){c=p[i];c.nodeType==1&&(n=n.concat([].slice.call(eval({" ":'c.getElementsByTagName(a||"*")',">":"c.childNodes","+":"c.nextSibling","%":"c.tagName&&c.tagName.toLowerCase()==a.toLowerCase()?[c]:[]",".":'(" "+c.className+" ").indexOf(" "+a+" ")<0?[]:[c]',"#":"c.id==a?[c]:[]"}[o]))))}p=n});return p}; |
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 (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
var Storage = function (type) { | |
function createCookie(name, value, days) { | |
var date, expires; | |
if (days) { | |
date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); |
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
// geo-location shim | |
// currentely only serves lat/long | |
// depends on jQuery | |
// doublecheck the ClientLocation results because it may returning null results | |
;(function(geolocation){ | |
if (geolocation) return; |
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
WP Bag of Tricks | |
1. Helpful Scripts/Plugins: | |
Hacks: | |
http://wordpress.org/extend/plugins/tac/ | |
http://wordpress.org/extend/plugins/exploit-scanner/ (Can be extremely resource intensive.) | |
http://wordpress.org/extend/plugins/wp-malwatch/ |
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
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
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
import re | |
# http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone | |
from metaphone import dm as double_metaphone | |
# get the Redis connection | |
from jellybean.core import redis | |
import models | |
# Words which should not be indexed |
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
<?php | |
// Register an app: http://dev.twitter.com/apps | |
define('CONSUMER_KEY', 'YOUR CONSUMER KEY'); | |
define('CONSUMER_SECRET', 'YOUR CONSUMER SECRET'); | |
define('TWITTER_TOKEN', ''); | |
define('TWITTER_TOKEN_SECRET', ''); | |
$oauth = new OAuth(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_URI); |
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(){ | |
//this is the core exposed function | |
function core(e){ | |
var t=this, i=t[_length]=e[_length]; | |
if(i===_undefined){ | |
t[0]=e; | |
t[_length]=1 | |
} |