Skip to content

Instantly share code, notes, and snippets.

$ babel-node examples/matttest.es6
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender1) sending: 0
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender2) sending: 0
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender1) sending: 1
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender2) sending: 1
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender1) sending: 2
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender2) sending: 2
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender1) sending: 3
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender2) sending: 3
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender1) sending: 4
@tlrobinson
tlrobinson / reactive-example.go
Last active August 29, 2015 14:17
port of tlrobinson/sbp to GoLang
type OnDataCallback func(InPort, func(string))
type ReactiveComponent func(*Process, OnDataCallback)
func AdaptReactiveComponent(component ReactiveComponent) Component {
return func(proc *Process) {
var wg sync.WaitGroup
onData := func(port InPort, callback func(string)) {
wg.Add(1)
@tlrobinson
tlrobinson / gist:191e5023cd34666203b6
Created May 27, 2015 00:30
Almost certainly not what I meant...
$ git git push
WARNING: You called a Git command named 'git', which does not exist.
Continuing under the assumption that you meant 'init'
in 0.1 seconds automatically...
Initialized empty Git repository in /Users/tlrobinson/whatever/push/.git/
$ docker run --net=none -t -i jpetazzo/dind
/dev/mapper/control: open failed: Operation not permitted
Failure to communicate with kernel device-mapper driver.
Check that device-mapper is available in the kernel.
Command failed
mount: permission denied
Could not make a tmpfs mount. Did you use --privileged?
@tlrobinson
tlrobinson / test.sh
Last active August 29, 2015 14:25
codec2/freedv pipe test
rec -t raw -r 8000 -s -2 - | \
./src/c2enc 1400 - - | \
./src/c2dec 1400 - - | \
play -t raw -r 8000 -s -2 -
import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
CPTextField _field;
CPURLConnection _submitConnection;
CPURLConnection _loadConnection;
}
{
"type" : "git",
"path" : "ssh://user@path.com/to/git/repo.git",
"parts" : [
{
"src" : "MyApplication",
"dst" : "",
"build" : "steam -c Release -b BUILD_PATH",
"copyFrom" : "Release/MyApplication"
},
import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
var _testVar;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
var objj_debug_profile = { calls : [] }
function objj_msgSend_Profile(/*id*/ aReceiver, /*SEL*/ aSelector)
{
if (aReceiver == nil)
return nil;
// profiling book keeping
var profileRecord = {
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Name</key>
<string>YourApplication</string>
<key>Targets</key>
<array>
<dict>
<key>Name</key>