cookie("user", "flesch", { expires:(new Date(new Date() * 1 + 6E10)).toGMTString(), path:"/"});
cookie("user");
Based off work from https://gist.github.com/1058674
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2012 John Flesch <http://fles.ch/> | |
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 |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2012 John Flesch <http://fles.ch/> | |
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 |
cookie("user", "flesch", { expires:(new Date(new Date() * 1 + 6E10)).toGMTString(), path:"/"});
cookie("user");
Based off work from https://gist.github.com/1058674
if (typeof window.console === "undefined") { | |
window.console = { | |
log: function() { | |
alert(Array.prototype.slice.call(arguments).join(", ")); | |
} | |
} | |
} |
var express = require("express"); | |
var app = express(); | |
app.get("/restricted", function(req, res, next){ | |
// Grab the "Authorization" header. | |
var auth = req.get("authorization"); | |
// On the first request, the "Authorization" header won't exist, so we'll set a Response | |
// header that prompts the browser to ask for a username and password. |
var UpperCaseStream = function(){ | |
this.readable = true; | |
this.writable = true; | |
}; | |
require("util").inherits(UpperCaseStream, require("stream")); | |
UpperCaseStream.prototype._transform = function(data){ | |
data = data ? data.toString() : ""; | |
this.emit("data", data.toUpperCase()); |
$ git rm $(git ls-files --deleted) |
var cluster = require('cluster') | |
, express = require('express') | |
, app = express() | |
, cpus = require('os').cpus().length; | |
app.get('/', function(req, res, next){ | |
res.json({ "env":process.env.NODE_ENV || "development", "pid":cluster.worker.process.pid }); | |
}); | |
if (cluster.isMaster) { |
var deprecate = require('depd')('bunyan') | |
, bunyan = require('bunyan') | |
; | |
// Bunyan logger used by the app. | |
var logger = bunyan.createLogger({ name:'app', level:'debug' }); | |
// Bunyan logger to catch only the console. | |
var depdconsole = bunyan.createLogger({ name:'console', level:'warn' }); |
#!/bin/bash | |
# brew install libav | |
# curl -fsSL http://git.io/mkv2mp4sh | sh | |
for mkv in *.mkv; do | |
mp4="$(basename --suffix=.mkv "$mkv").mp4" | |
avconv -i "$mkv" -c:v copy -c:a aac -strict experimental -threads auto "$mp4" | |
done |