Skip to content

Instantly share code, notes, and snippets.

@appinsanity
appinsanity / ssh-keygen.js
Created November 26, 2011 19:21
node.js ssh-keygen
var spawn = require('child_process').spawn,
sys = require('sys');
function createSSH(passphrase, path, name) {
var ssh = spawn('ssh-keygen', ['-trsa', '-N \''+ passphrase +'\'', '-f ' + name], { cwd:path, env: process.env, customFds: [-1, -1, -1]})
ssh.on('exit', function (code, signal) {
process.exit();
});
@appinsanity
appinsanity / gist:1364192
Created November 14, 2011 15:38
FlatIron/Plates Attribute Binding Suggestion
<a data-href="url" data-bind="title"></a>
<script>
var data = {
'url': 'http://github.com/',
'title': 'github'
}
</script>
@appinsanity
appinsanity / 500 SH
Created November 11, 2011 22:14
500 socket hang up / malformed HTML
<!DOCTYPE html>
<html lang="en">
<div id="container">
<header>
</header>
<div id="main">
<h1 id="code">500</h1>
<h3 id="message">socket hang up</h3>
</div>