a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
require('connect').createServer( | |
connect.static(__dirname + '/videos', { maxAge: 0 }), | |
function(req, res) { | |
res.setHeader('Content-Type', 'text/html'); | |
res.end('<video width="300px" src="/OLD_BOY.mp4" controls="controls" autoplay="autoplay"></video>'); | |
} | |
).listen(process.env.PORT || 4000); |
var http = require("http"), | |
util = require("util") | |
http.createServer(function(req, rsp){ | |
var regex = /^\/(v1|v2)/g | |
var matches = req.url.match(regex) | |
if((matches && matches[0] === "/v1") || (req.headers["x-api-version"] === "v1")) | |
var port = 8001 |
var http = require("http") | |
// expensive call | |
// takes 2 sec | |
function name(cb){ | |
setTimeout(function(){ cb("Brock") }, 2000) | |
} | |
// expensive call | |
// takes 2 sec |
var q= function(s){ return document.getElementById(s) } | |
function send(){ | |
var input = q('text'); | |
socket.send(input.value); | |
input.value = ''; | |
} | |
var socket = new io.Socket(null, { | |
port: 8001, |
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
var crypto = require('crypto'); | |
var SaltLength = 9; | |
function createHash(password) { | |
var salt = generateSalt(SaltLength); | |
var hash = md5(password + salt); | |
return salt + hash; | |
} |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
With the introduction of Google Plus. Managing multiple gmail accounts has become a big pain in the ass. What I have done is consolidated all my email accounts into my main gmail account that I use for G+, analytics, etc. This process expects that you have one main gmail account such as "[email protected]" and one or more Google App accounts "[email protected]". This solution may not work for you but it has helped me a lot.
The end result of this setup is that all your email goes to one inbox but it is
#!/bin/bash | |
# <UDF name="ssh_key" Label="Paste in your public SSH key" default="" example="" optional="false" /> | |
# root ssh keys | |
mkdir /root/.ssh | |
echo $SSH_KEY >> /root/.ssh/authorized_keys | |
chmod 0700 /root/.ssh | |
# update to latest |
var memLeaker = [ | |
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + | |
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + | |
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + | |
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + | |
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + | |
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + | |
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + | |
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + | |
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + |