This file contains hidden or 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
io.configure(function () { | |
io.set('authorization', function (data, accept) { | |
if (data.headers.cookie) { | |
cookieParser(data.headers.cookie, function(err, c) { | |
if(err) accept('cookie parse failure: ' + err, false) | |
data.cookie = c.cookies || {} | |
data.signedCookie = c.signedCookies || {} | |
data.sessionID = data.cookie[cookieKey] || data.signedCookie[cookieKey] || null | |
if(!data.sessionID) accept('no sid cookie', false) // bad cookie! bad! | |
sessionStore.get(data.sessionID, function (err, session) { |
This file contains hidden or 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
var child = require('child_process'), | |
util = require('util'), | |
netstat = child.spawn('netstat', ['-nb']), | |
out = '' | |
netstat.stdout.on('data', function(data) { | |
out += data | |
}) | |
netstat.stderr.on('data', function(data) { | |
console.log('err: ' + data) |
This file contains hidden or 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
<KyleXY> staticsafe: what? | |
<staticsafe> ubuntu 5.10 | |
<staticsafe> wat | |
<KyleXY> That's the truth, nenolod just blabbed about it | |
<KyleXY> <spam> | |
<KyleXY> 07:52 <@nenolod> Lucifer7: honestly cia.vc being down is probably good for the internet | |
<KyleXY> 07:52 <@nenolod> Lucifer7: and ultimately good for open source in general | |
<KyleXY> 07:53 <@nenolod> Lucifer7: now the community is forced to actually do something about the fact that the CIA.vc server was filled with security holes | |
<KyleXY> 07:53 < Lucifer7> but now i have to actually look at websites to see commits instead of just idle on irc ugh | |
<KyleXY> 07:53 <@nenolod> Lucifer7: such as running ubuntu 5.10 |
This file contains hidden or 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
$ node pass.js | |
99.3 |
This file contains hidden or 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
var fs = require('fs'), | |
start = new Date() | |
fs.readFile('flame.htm', 'utf8', function(err, data){ | |
if(err) throw err | |
console.log('pre-parsing: extracting css color codes') | |
var re, hex, res = data.match(/h([0-9a-f]{3,6})/g).sort().unique(), | |
post = ['fff', 'fefefe', 'ffffff', 'fffefe', 'fffffe', 'fefeff'], | |
css = '/' + "*!\n * <3\n" + '*' + "/\n" + 'pre{font: 8px monospace;line-height: 3px;color: #ffffff;}' |
This file contains hidden or 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 bcrypt.js && node bcrypt.js | |
var bcrypt = require('bcrypt'), current = '', last = '', salt = bcrypt.genSaltSync(2) | |
for(var i = 51;i <= 100;i++) { | |
current = bcrypt.hashSync(Array(i).join('a'), salt) | |
console.log("length: " + (i-1) + ' salt: ' + current) | |
if(current == last) break | |
last = current | |
} | |
length: 50 salt: $2a$04$NARA6XWraiNNu/gmbbZUQOg2RtlSFed9itNdWbDv2uMyZA.L/o8Yq |
This file contains hidden or 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 | |
# | |
# Local push to own server | |
# | |
# Requires: | |
# - remote webserver (best used w/userdirs) | |
# - local package "scrot" | |
# - local package "xclip" | |
# - local package "pngcrush" | |
# - iq > 20 |
This file contains hidden or 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 | |
namespace codebite\tsundere\Session; | |
use \R; | |
use \sigmabb\sigmabb\WebKernel as Sigma; | |
// licensed: MIT license | |
class Session | |
{ | |
private $app, $_sid_entry, $sid, $session, $ipv4_validation_level, $ipv6_validation_level; |
This file contains hidden or 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
Started GET "/csharp/master/tree/chap3_28_hw/chap3_28_hw" for [redacted] at 2012-01-29 11:31:46 -0600 [350/1886] | |
Processing by RefsController#tree as JS | |
Parameters: {"project_id"=>"csharp", "id"=>"master", "path"=>"chap3_28_hw/chap3_28_hw"} | |
Rendered refs/_tree_item.html.haml (11.7ms) | |
Rendered refs/_tree_item.html.haml (10.5ms) | |
Rendered refs/_tree_item.html.haml (10.2ms) | |
Rendered refs/_tree_item.html.haml (10.2ms) | |
Rendered refs/_tree_item.html.haml (6.8ms) | |
Rendered refs/_tree.html.haml (149.5ms) | |
Rendered refs/tree.js.haml (150.8ms) |
This file contains hidden or 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
set -g set-titles off | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
bind-key C-a last-window | |
unbind % # Remove default binding since we’re replacing | |
bind | split-window -h | |
bind - split-window -v | |
set -g lock-command 'tput civis && read -s -n1' |