This file contains 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 ( | |
"log" | |
"math/rand" | |
"sync" | |
"time" | |
"github.com/dgraph-io/badger/v2" | |
) |
This file contains 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
@import url('https://fonts.googleapis.com/css?family=Montserrat'); | |
@import url('https://fonts.googleapis.com/css?family=Inconsolata'); | |
@media screen { | |
/* Framework */ | |
html { | |
height: 100%; | |
} |
This file contains 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 merge(cs ...<-chan int) <-chan int { | |
out := make(chan int) | |
var wg sync.WaitGroup | |
wg.Add(len(cs)) | |
for _, c := range cs { | |
go func(c <-chan int) { | |
for v := range c { | |
out <- v | |
} | |
wg.Done() |
This file contains 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" | |
"strings" | |
"time" | |
"gopkg.in/src-d/go-billy.v4/memfs" | |
git "gopkg.in/src-d/go-git.v4" |
This file contains 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 ( | |
"flag" | |
"image" | |
"image/color" | |
"image/png" | |
"log" | |
"os" | |
) |
This file contains 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 ( | |
"flag" | |
"image" | |
"image/color" | |
"image/png" | |
"log" | |
"os" | |
) |
This file contains 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
// Copyright 2016 Google Inc. All rights reserved. | |
// Use of this source code is governed by the Apache 2.0 | |
// license that can be found in the LICENSE file. | |
// Sample endpoints demonstrates a Cloud Endpoints API. | |
package main | |
import ( | |
"encoding/json" | |
"fmt" |
This file contains 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 ( | |
"log" | |
"net/http" | |
) | |
func main() { | |
http.HandleFunc("/", handler) | |
log.Fatal(http.ListenAndServe(":8080", nil)) |
This file contains 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
function sum(row, emit) { | |
const memory = new WebAssembly.Memory({ initial: 256, maximum: 256 }); | |
const env = { | |
'abortStackOverflow': _ => { throw new Error('overflow'); }, | |
'table': new WebAssembly.Table({ initial: 0, maximum: 0, element: 'anyfunc' }), | |
'tableBase': 0, | |
'memory': memory, | |
'memoryBase': 1024, | |
'STACKTOP': 0, | |
'STACK_MAX': memory.buffer.byteLength, |
This file contains 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
const memory = new WebAssembly.Memory({ initial: 256, maximum: 256 }); | |
const env = { | |
'abortStackOverflow': _ => { throw new Error('overflow'); }, | |
'table': new WebAssembly.Table({ initial: 0, maximum: 0, element: 'anyfunc' }), | |
'tableBase': 0, | |
'memory': memory, | |
'memoryBase': 1024, | |
'STACKTOP': 0, | |
'STACK_MAX': memory.buffer.byteLength, | |
}; |