Skip to content

Instantly share code, notes, and snippets.

@clehner
clehner / hyperboria.sh
Last active December 10, 2015 15:28 — forked from waaghals/hyperboria.sh
#!/bin/sh -e
### BEGIN INIT INFO
# hyperboria.sh - An init script (/etc/init.d/) for cjdns
# Provides: cjdroute
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Cjdns router
# Description: A routing engine designed for security, scalability, speed and ease of use.
@clehner
clehner / update.coffee
Created November 28, 2012 03:24 — forked from comboy/update.rb
update all your namecoin domains
#!/usr/bin/env coffee
# put this file in the same dir as namecoind executable
child_process = require 'child_process'
child_process.exec './namecoind name_list', (err, stdout, stderr) ->
(JSON.parse stdout).forEach (domain) ->
if domain.expires_in < 5000
command = "./namecoind name_update #{JSON.stringify domain.name} #{JSON.stringify domain.value}"
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
// one way
foo ? bar.doSomething(el) : bar.doSomethingElse(el);
<head>
<title>swarm!</title>
<script type="text/javascript" language=JavaScript src="buzzWorker.js"></script>
<style>
.thing {
position:absolute;
}
.dying {
color:#ff0000;
font-weight:bold;