Skip to content

Instantly share code, notes, and snippets.

View blt's full-sized avatar

Brian L. Troutwine blt

View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8/3r2cdr8mQBubErMCeUe61pj6/+pSStX842K/DBuw78bOAw5HuKCBLTRSGh8Mjz38hFWcmds5GvgqyOxukZmGJzdBPzahi62ED4kdVyHscjSLl2VVHvE++/JNeehl8FsRiVn96joCRYAe1aTpI+7nD8W9g1VuWfcKO1ycZAVp6xKlKurW7Hl5SKk5Eio8s09fDukj6ZTPfPQjgtGJPYBwlcKmvmzJuwTSu2YfqwpZk5ftKMUpY22XSqRd2hVmJMVL3d+ISff7lVWvqihskMJV5x1BmSW2N60jdzKd19hgTlLNmtvjzvdcy9NYh0V6V9HjNuLaZGKU1mzRzmlHXPb blt@doritos
@blt
blt / proxy.go
Created January 5, 2011 02:57
First-stab at a transparent HTTP proxy in Go; a "getting started" project.
package main
import (
"http"
"net"
"io/ioutil"
"os"
"fmt"
@blt
blt / wordy.hs
Created January 24, 2011 16:46
{-# LANGUAGE OverloadedStrings #-}
import Prelude hiding (words)
import Control.Applicative hiding (many)
import Data.Attoparsec as P
import Data.Attoparsec.Char8 as P8
import Data.ByteString as B
import Data.Word
civil :: B.ByteString
pkgname=libevent2
pkgver=2.0.10
pkgrel=1
pkgdesc="The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been re\
ached. Furthermore, libevent also support callbacks due to signals or regular timeouts."
url="http://monkey.org/~provos/libevent/"
arch=("i686" "x86_64")
license=("BSD")
depends=('bash')
makedepends=()
include ../../Makefile.inc
include ../Makefile.inc
SOURCES=dashboard.js filter-panel.js
.SUFFIXES: .js
all: $(SOURCES)
mkdir -p $(OUTDIR)
.js.js:
$ netstat -ant | grep 5556
tcp 0 0 0.0.0.0:5556 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:43914 127.0.0.1:5556 ESTABLISHED
tcp 0 0 127.0.0.1:5556 127.0.0.1:43914 ESTABLISHED
<project name="AgentBridge" basedir="." default="main">
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="main-class" value="com.fluentstream.agentbridge.Main"/>
import akka.actor.Actor._
$ sbt compile
[info] Building project Botty 0.0.1 against Scala 2.8.1
[info] using BottyProject with sbt 0.7.5 and Scala 2.7.7
[info]
[info] == compile ==
[info] Source analysis: 1 new/modified, 0 indirectly invalidated, 0 removed.
[info] Compiling main sources...
[error] /tmp/Botty/src/main/scala/Botty.scala:15: missing parameter type for expanded function ((x0$1) => x0$1 match {
[error] case Login((username @ _)) => log.info("Got login: ".$plus(username))
scala> import akka.actor.Actor.registry
import akka.actor.Actor.registry
scala> registry
res4: akka.actor.ActorRegistry = akka.actor.ActorRegistry@76800e
scala> registry.actorFor("blt")
<console>:9: error: overloaded method value actorFor with alternatives:
(uuid: akka.actor.package.Uuid)Option[akka.actor.ActorRef] <and>
[T <: akka.actor.Actor](implicit manifest: scala.reflect.Manifest[T])Option[akka.actor.ActorRef]