{"label":"root","blocks":[{"label":"","type":"exponential","id":7,"inputs":[{"name":"rate","value":{"data":1},"type":"number"}],"outputs":[{"name":"draw","type":"number"}],"source":null,"position":{"x":18,"y":143}},{"label":"","type":"toString","id":8,"inputs":[{"name":"in","value":null,"type":"any"}],"outputs":[{"name":"out","type":"string"}],"source":null,"position":{"x":141,"y":143}},{"label":"","type":"concat","id":9,"inputs":[{"name":"a","value":null,"type":"string"},{"name":"b","value":{"data":"ms"},"type":"string"}],"outputs":[{"name":"a+b","type":"string"}],"source":null,"position":{"x":240,"y":143}},{"label":"","type":"delay","id":10,"inputs":[{"name":"in","value":{"data":1},"type":"any"},{"name":"duration","value":null,"type":"string"}],"outputs":[{"name":"out","type":"any"}],"source":null,"position":{"x":332,"y":128}},{"label":"","type":"*","id":11,"inputs":[{"name":"x","value":{"data":2},"type":"number"},{"name":"y","value":null,"type":"number"}],"outputs":[{"name":"x*y","type":"number"}],"sou
{"label":"root","blocks":[{"label":"","type":"exponential","id":71,"inputs":[{"name":"rate","value":{"data":1},"type":"number"}],"outputs":[{"name":"draw","type":"number"}],"source":null,"position":{"x":18,"y":143}},{"label":"","type":"toString","id":73,"inputs":[{"name":"in","value":null,"type":"any"}],"outputs":[{"name":"out","type":"string"}],"source":null,"position":{"x":141,"y":143}},{"label":"","type":"concat","id":74,"inputs":[{"name":"a","value":null,"type":"string"},{"name":"b","value":{"data":"ms"},"type":"string"}],"outputs":[{"name":"a+b","type":"string"}],"source":null,"position":{"x":240,"y":143}},{"label":"","type":"delay","id":72,"inputs":[{"name":"in","value":{"data":1},"type":"any"},{"name":"duration","value":null,"type":"string"}],"outputs":[{"name":"out","type":"any"}],"source":null,"position":{"x":332,"y":128}},{"label":"","type":"*","id":311,"inputs":[{"name":"x","value":{"data":2},"type":"number"},{"name":"y","value":null,"type":"number"}],"outputs":[{"name":"x*y","type":"number"}],
{"label":"root","blocks":[{"label":"","type":"exponential","id":71,"inputs":[{"name":"rate","value":{"data":1},"type":"number"}],"outputs":[{"name":"draw","type":"number"}],"source":null,"position":{"x":18,"y":143}},{"label":"","type":"toString","id":73,"inputs":[{"name":"in","value":null,"type":"any"}],"outputs":[{"name":"out","type":"string"}],"source":null,"position":{"x":141,"y":143}},{"label":"","type":"concat","id":74,"inputs":[{"name":"a","value":null,"type":"string"},{"name":"b","value":{"data":"s"},"type":"string"}],"outputs":[{"name":"a+b","type":"string"}],"source":null,"position":{"x":240,"y":143}},{"label":"","type":"delay","id":72,"inputs":[{"name":"in","value":{"data":1},"type":"any"},{"name":"duration","value":null,"type":"string"}],"outputs":[{"name":"out","type":"any"}],"source":null,"position":{"x":332,"y":128}},{"label":"","type":"pqLen","id":62,"inputs":[{"name":"trigger","value":null,"type":"any"}],"outputs":[{"name":"length","type":"number"}],"source":"priority-queue","position":{"x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// send whatever message you want over Google Tone | |
// as far as I can tell, profile images must live on googleusercontent.com | |
// data.url must look like a url | |
// setting AUDIBLE_DURATION to 1 will generate no audible sound but result in a successful transmission. | |
// | |
// to use: | |
// 0. install Google Tone https://chrome.google.com/webstore/detail/google-tone/nnckehldicaciogcbchegobnafnjkcne | |
// 1. open settings > extentions | |
// 2. click "options" under Google Tone | |
// 3. In the Google Tone options, open the developer console and paste the following |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you need a recurisve dot clean and your folders have spaces in them: | |
find . -type d | sed 's/^/"/g' | sed 's/$/"/g' | xargs dot_clean -m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl localhost:7071/sources -d '{"type":"value"}' | |
curl -X PUT localhost:7071/sources/1/value -d '"Hello world"' | |
curl localhost:7071/blocks -d '{"type":"pusher"}' | |
curl localhost:7071/blocks -d '{"type":"log"}' | |
curl localhost:7071/blocks -d '{"type":"valueGet"}' | |
curl localhost:7071/links -d '{"source":1}' | |
curl localhost:7071/links -d '{"source":1,"block":4}' | |
curl localhost:7071/connections -d '{"source":{"id":2,"route":0},"target":{"id":4,"route":0}}' | |
curl localhost:7071/connections -d '{"source":{"id":4,"route":0},"target":{"id":3,"route":0}}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl localhost:7071/blocks -d '{"type":"+"}' #1 | |
curl localhost:7071/blocks -d '{"type":"first"}' #2 | |
curl localhost:7071/blocks -d '{"type":"sink"}' #3 | |
curl localhost:7071/blocks -d '{"type":"latch"}' #4 | |
curl localhost:7071/blocks -d '{"type":"log"}' #5 | |
curl localhost:7071/blocks -d '{"type":"identity"}' #6 | |
curl -X PUT localhost:7071/blocks/2/routes/0 -d '{"type":"const","value":true}' | |
curl -X PUT localhost:7071/blocks/4/routes/0 -d '{"type":"const","value":0}' | |
curl -X PUT localhost:7071/blocks/1/routes/1 -d '{"type":"const","value":1}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl localhost:7071/blocks -d '{"type":"delay"}' #1 | |
curl localhost:7071/blocks -d '{"type":"log"}' #2 | |
curl localhost:7071/blocks -d '{"type":"kvGet"}' #3 | |
curl localhost:7071/sources -d '{"type":"key-value"}' #4 | |
curl localhost:7071/blocks -d '{"type":"isError"}' #5 | |
curl localhost:7071/blocks -d '{"type":"latch"}' #6 | |
curl localhost:7071/blocks -d '{"type":"kvSet"}' #7 | |
curl localhost:7071/blocks -d '{"type":"gate"}' #8 | |
curl localhost:7071/blocks -d '{"type":"+"}' #9 | |
curl localhost:7071/blocks -d '{"type":"sink"}' #10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"time" | |
"fmt" | |
) | |
type Task func(interface{}) interface{} | |
type Sink func(interface{}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"github.com/gorilla/mux" | |
"github.com/gorilla/websocket" | |
"log" | |
"net/http" | |
"sync" |