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 ( | |
| "fmt" | |
| v8 "rogchap.com/v8go" | |
| ) | |
| func main() { | |
| iso := v8.NewIsolate() |
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
| func main() { | |
| m := map[string]int{ | |
| "one": 1, | |
| } | |
| defer func() { | |
| fmt.Println("deferred first", m) | |
| }() | |
| // a function will evaluate upon defer | |
| // an expression evaluates immediately | |
| defer fmt.Println("deferred second", 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
| package main | |
| import "fmt" | |
| func f(x, y, z chan string) { | |
| defer close(x) | |
| a := make(chan bool) | |
| go func() { | |
| for i := 0; i < 3; i++ { | |
| x <- "hi" |
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 ( | |
| "fmt" | |
| "strconv" | |
| "time" | |
| v8 "rogchap.com/v8go" | |
| ) |
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 bigint | |
| import ( | |
| "encoding/json" | |
| "errors" | |
| "strconv" | |
| "gopkg.in/guregu/null.v4" | |
| ) |
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
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| map $http_accept $accept { | |
| default app; | |
| ~text/html web; | |
| } |
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 ( | |
| "fmt" | |
| "log" | |
| "math/rand" | |
| "time" | |
| v8 "rogchap.com/v8go" | |
| ) |
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 ( | |
| "fmt" | |
| "time" | |
| "github.com/ry/v8worker2" | |
| ) | |
| var script string = ` |
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
| echo "{\"filename\": \"main.py\", \"code\": \"from raven import Client\n\nclient = Client('https://c3a66f7b59044173b7f0e7cf8367a6a5:a9b80f66c31d476db3ae2cd4fd8279ab@sentry.io/1257305')\n\ntry:\n 1 / 0\nexcept ZeroDivisionError:\n client.captureException()\n\nprint('testing print')\n\"}" | http POST https://us-central1-hackweek-fastrack.cloudfunctions.net/python-eval |
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
| {"code": "var Raven = require('raven');\nRaven.config('https://c3a66f7b59044173b7f0e7cf8367a6a5@sentry.io/1257305').install();\ntry {\n doAnotherThing(a[0]);\n} catch (e) {\n Raven.captureException(e);\n}"} |