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
//is not array object | |
var isObject = function(o){ | |
return new Object(o) === o && !(o instanceof Array) | |
} |
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 [ "node-v0.5.10" !-d ]; then | |
curl http://nodejs.org/dist/v0.5.10/node-v0.5.10.tar.gz | |
tar -xvf node-v0.5.10.tar.gz | |
fi | |
cd node-v0.5.10 | |
./configure | |
if [ $? != 0 ]; then | |
echo "configure failed =(" | |
exit 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
<?php | |
function _strtotime_us2($str,$now=null) { | |
if ($now === null) { | |
$now = time(); | |
} | |
$strp = explode('-',$str); |
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
/* | |
* nodejs style require for php | |
* */ | |
function _require($file){ | |
static $requireCache = array(); | |
if(isset($requireCache[$file])) return $requireCache[$file]; | |
//todo support namespaces? evil eval? copy the file... all sad solutions | |
$module = array(); | |
$module['exports'] = array(); |
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
cat /etc/passwd | node -e "var buf ='',rev=function(lines){lines.forEach(function(l,k){process.stdout.write(l.split('').reverse().join('')+'\n')})};process.stdin.on('data',function(b){buf+=b.toString();b = buf.split('\n');buf = b.shift();rev(b)}); process.stdin.resume();" |
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
// walkdir ~0.0.5 | |
var fs = require('fs') | |
, walkdir = require('../walkdir') | |
// write all logs to the logs.cat file | |
, ws = fs.createWriteStream('logs.cat') | |
; | |
var em = walkdir('./'); | |
em.on('file',function(path,stat){ |
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
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6L/Y30hj/CJ/WehbUuSrTb9qTFkX/uHya8copfyg4T0+VexzGhZV7dp5VZISVnk8B0N4ZOlBp5y15pRKR9OIK1q2JjMq5uyGRIkiF62kkvo8PQ/OpMBk/glV0WJ73AZdgYV9HRS8Zr/cnPsw2Lp4hjrMwvj9Tv+Q5l+dl3HQ7O3xfIAdxSe2y62Sn/tg3vp+d6tEtEz8HFc0+YoCbRnhAuXA9R8sEW3nuyLXnITGSZ6SEHcPBkqtEqdshXHRbg8cTu5TenA9jfbyIsF2+hc/kYnek8YUzscUXGYjjg5ItRsoVtBTKf51KPx23ZJGX7VGTmVPsFfC8byj/De2S2GjUw== soldair@host |
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
/* | |
* Method: email_rfc | |
* Validate email, RFC compliant version | |
* | |
* Originally by Cal Henderson, modified to fit Kohana syntax standards: | |
* - http://www.iamcal.com/publish/articles/php/parsing_email/ | |
* - http://www.w3.org/Protocols/rfc822/ | |
* | |
* Parameters: | |
* email - email address |
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 pr () { | |
local repo=`git remote -v | grep -m 1 "(push)" | sed -e "s/.*github.com[:/]\(.*\)\.git.*/\1/"` | |
local branch=`git name-rev --name-only HEAD` | |
if [ "$1" != "" ]; then | |
local branch=$1 | |
fi | |
echo "... creating pull request for branch \"$branch\" in \"$repo\"" | |
xdg-open https://github.com/$repo/pull/new/$branch | |
} |
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
make: Leaving directory `/usr/local/lib/node_modules/qrcode/node_modules/canvas/build' | |
/usr/local/bin/qrcode -> /usr/local/lib/node_modules/qrcode/bin/qrcode | |
npm WARN package.json eventemitter2@0.4.1 'contributers' should probably be 'contributors' | |
npm ERR! peerinvalid The package flatiron does not satisfy its siblings' peerDependencies requirements! | |
npm ERR! peerinvalid Peer flatiron-cli-config@0.1.3 wants flatiron@~0.1.9 | |
npm ERR! peerinvalid Peer flatiron-cli-users@0.1.1 wants flatiron@~0.1.9 | |
npm ERR! System Linux 3.2.0-23-generic | |
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "qrcode" | |
npm ERR! cwd /usr/local/lib/node_modules |