/bin
binaries, basic Linux commands are here
/boot
boot code, leave it be
/dev
all devices/hardware, all treated as a stream
http = require('http') | |
Redis = require("redis") | |
c = Redis.createClient(@port, @host) | |
marshal = (req) -> | |
JSON.stringify | |
method: req.method | |
url: req.url | |
headers: req.headers | |
body: req.body | |
// Based heavily on https://bitbucket.org/zombiezen/spdy, adapted for | |
// recent Go releases. | |
package main | |
import ( | |
"crypto/tls" | |
"fmt" | |
"go.net/spdy" | |
"io" |
package main | |
import ( | |
"errors" | |
"fmt" | |
"net" | |
"net/http" | |
"os" | |
"time" | |
) |
# A base skeleton to simplify decorator implementations. | |
# | |
# All decorator classes needs only to extend this class by implementing the | |
# _init() and _call() methods and do not have to worry about the inconsistency | |
# of python decorators. | |
# | |
# _init: The method is called once when the decorator is created. The decorator | |
# arguments, if any, will be passed on to this method. | |
# _call: Implements the function call, all arguments to the function will be | |
# passed on to this method. |
def output name=((default=true); "caius") | |
puts "name: #{name.inspect}" | |
puts "default: #{default.inspect}" | |
end | |
output | |
# >> name: "caius" | |
# >> default: true | |
output "avdi" |
package main | |
import ( | |
"bytes" | |
"exec" | |
"log" | |
"os" | |
) | |
// Pipeline strings together the given exec.Cmd commands in a similar fashion |
(ns my.ns | |
(:use [korma.db]) | |
(:use [korma.core]) | |
(:require [clojure.java.jdbc :as sql])) | |
(def dbspec {:classname "org.h2.Driver" | |
:subprotocol "h2" | |
:subname "~/db/myapp" | |
:user "sa" | |
:password ""}) |
source "http://rubygems.org" | |
gem "highline" | |
gem "twitter" | |
gem "escape_utils" |
require 'camping' | |
Camping.goes :Async | |
module Async | |
def service(*a) | |
return super unless respond_to?(:async?) | |
EM.next_tick do | |
send(@method, *a) |