Skip to content

Instantly share code, notes, and snippets.

View nictuku's full-sized avatar

Yves Junqueira nictuku

View GitHub Profile
@nictuku
nictuku / hello.go
Created February 6, 2018 01:22
Example Golang HTTP Server
package main
import (
"fmt"
"log"
"net/http"
)
type helloWorldHandler struct{}
@nictuku
nictuku / weird-error
Created February 6, 2018 04:33
disappeared after a `bazel clean`
ERROR: /private/var/tmp/_bazel_yves/c3e06ba6f17336f9b3516ab2697dfd1a/external/local_config_cc/BUILD:50:5: in apple_cc_toolchain rule @local_config_cc//:cc-compiler-ios_i386: Xcode version must be specified to use an Apple CROSSTOOL
ERROR: Analysis of target '//cli/zerospace:zerospace' failed; build aborted: Analysis of target '@local_config_cc//:cc-compiler-ios_i386' failed; build aborted
INFO: Elapsed time: 0.488s
FAILED: Build did NOT complete successfully (0 packages loaded)
func newRunner(creds) {
&ciRunner{
githubClient: newGithubClient(creds),
githubCredentials: creds,
// Note: buffered channel. Means that writes to `builds` will almost always return immediately,
// unless we accumulate 100 builds in the queue. We don't have a good failure mode if that happens.
// That's OK for now.
builds: make(chan *event, 100),
}
}
@nictuku
nictuku / yb.sh
Last active March 10, 2018 05:55
#!/bin/bash
test () {
bazel test :all
}
build () {
bazel build :all
}
[########################------------------------------------------------------------------------------------] 326/1458Error: ENFILE: file table overflow, open '/Users/yves/src/github.com/philipithomas/moonlight/frontend/package.json'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at onUnexpectedError (/usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:89324:104)
at /usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:89431:7
at <anonymous>
make: *** [deps] Error 1
-bash: cannot make pipe for command substitution: Too many open files in system
-bash: /Users/yves/.bash_eternal_history: Too many open files in system
#!/bin/bash
function clone() {
repo=$1 # https://github.com/fatih/vim-go.git
dest=$2 # ~/.vim/pack/plugins/start/vim-go
mkdir -p $dest
cd $dest
git init
if ! git config remote.origin.url &> /dev/null;then
git remote add origin $repo
@nictuku
nictuku / gist:c9858a4fe2c7b92a01da2e635b7c147c
Created July 3, 2018 23:56
All valid GOOS and GOARCH values
$ go tool dist list
android/386
android/amd64
android/arm
android/arm64
darwin/386
darwin/amd64
darwin/arm
darwin/arm64
dragonfly/amd64
package main
import (
"fmt"
"os"
hetzner "github.com/appscode/go-hetzner"
)
// Problem: this library and perhaps the underlying API don't seem to provide access to the server bidding stuff.
[dependencies]
build = [
"python:3.6.3",
"heroku:latest",
"homebrew:latest"
]
runtime = [
"python:3.6.3",
"heroku:latest",
"homebrew:latest"
dependencies:
build:
- python:3.6.3
- heroku:latest
- homebrew:latest
runtime:
- python:3.6.3
- heroku:latest
- homebrew:latest