As configured in my dotfiles.
start new:
tmux
start new with session name:
<?xml version="1.0" encoding="UTF-8"?> | |
<configs xsi:noNamespaceSchemaLocation="../schemas/metadata.xsd" xmlns:cache="uri:akamai.com/metadata/cache/5.0" xmlns:edgeservices="uri:akamai.com/metadata/edgeservices/5.0" xmlns:xalan="http://xml.apache.org/xslt" xmlns:config="uri:akamai.com/metadata/config/5.0" xmlns:network="uri:akamai.com/metadata/network/5.0" xmlns:auth="uri:akamai.com/metadata/auth/5.0" xmlns:match="uri:akamai.com/metadata/match/5.0" xmlns:forward="uri:akamai.com/metadata/forward/5.0" xmlns:comment="uri:akamai.com/metadata/comment/5.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:akamai="uri:akamai.com/metadata/akamai/5.0" xmlns:security="uri:akamai.com/metadata/security/5.0" xmlns:reporting="uri:akamai.com/metadata/reporting/5.0" xmlns:edgecomputing="uri:akamai.com/metadata/edgecomputing/5.0" xmlns:assign="uri:akamai.com/metadata/assign/5.0"> | |
<akamai:edge-config version="5.0"> | |
<comment:advanced_defaults.begin/> | |
<comment:advanced_defaults.end/> | |
<comment:quickstart_sec |
As configured in my dotfiles.
start new:
tmux
start new with session name:
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, cluster = require('cluster'); | |
var app = module.exports = express.createServer() | |
, io = require('./socket')(app); |
function nestCollection(model, attributeName, nestedCollection) { | |
//setup nested references | |
for (var i = 0; i < nestedCollection.length; i++) { | |
model.attributes[attributeName][i] = nestedCollection.at(i).attributes; | |
} | |
//create empty arrays if none | |
nestedCollection.bind('add', function (initiative) { | |
if (!model.get(attributeName)) { | |
model.attributes[attributeName] = []; |
var cluster = require('cluster'), | |
app = require('./app'); | |
var workers = {}, | |
count = require('os').cpus().length; | |
function spawn(){ | |
var worker = cluster.fork(); | |
workers[worker.pid] = worker; | |
return worker; |
<?php | |
/* | |
* Converts CSV to JSON | |
* Example uses Google Spreadsheet CSV feed | |
* csvToArray function I think I found on php.net | |
*/ | |
header('Content-type: application/json'); | |
// Set your CSV feed |
#!/usr/bin/env python | |
# Ported to Python from http://www.vim.org/scripts/script.php?script_id=1349 | |
print "Color indexes should be drawn in bold text of the same color." | |
colored = [0] + [0x5f + 40 * n for n in range(0, 5)] | |
colored_palette = [ | |
"%02x/%02x/%02x" % (r, g, b) | |
for r in colored |
// Two ways to serve transparent GIF | |
var buf = new Buffer([ | |
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, | |
0x80, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x2c, | |
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, | |
0x02, 0x44, 0x01, 0x00, 0x3b]); | |
res.send(buf, { 'Content-Type': 'image/gif' }, 200); |
/* | |
* Mclarens Bar: Redis based Instant Messaging | |
* Nikhil Marathe - 22/04/2010 | |
* A simple example of an IM client implemented using | |
* Redis PUB/SUB commands so that all the communication | |
* is offloaded to Redis, and the node.js code only | |
* handles command interpretation,presentation and subscribing. | |
* | |
* Requires redis-node-client and a recent version of Redis |