Skip to content

Instantly share code, notes, and snippets.

View myitcv's full-sized avatar

Paul Jolly myitcv

View GitHub Profile
vgo: finding github.com/moby/moby v17.03.2-ce
vgo: finding github.com/RackSec/srslog 456df3a81436d29ba874f3590eeeee25d666f8a5
vgo: finding github.com/vdemeester/shakers 24d7f1d6a71aa5d9cbe7390e4afb66b7eef9e1b3
vgo: finding github.com/vishvananda/netns 604eaf189ee867d8c147fafc28def2394e878d25
vgo: finding github.com/aws/aws-sdk-go v1.4.22
vgo: finding github.com/docker/docker-credential-helpers f72c04f1d8e71959a6d103f808c50ccbad79b9fd
vgo: finding github.com/docker/go-connections ecb4cb2dd420ada7df7f2593d6c25441f65f69f2
vgo: finding github.com/docker/distribution 28602af35aceda2f8d571bad7ca37a54cf0250bc
vgo: finding github.com/fsnotify/fsnotify v1.2.11
vgo: finding golang.org/x/time a4bde12657593d5e90d0533a3e4fd95e635124cb
@myitcv
myitcv / main.go
Created June 14, 2018 11:44
Timed go get -u -v g golang.org/x/vgo
package main
import (
"bufio"
"fmt"
"io"
"os"
"os/exec"
"time"
)
@myitcv
myitcv / README.md
Created June 11, 2018 20:11
Go 1.10.3 accessing a /v2 module

Use Go 1.10.3 which includes minimal module support for vgo transition:

$ cd /tmp
$ curl -s https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz | tar -zx
$ export PATH=/tmp/go/bin:$PATH
$ which go
/tmp/go/bin/go
$ go version
@myitcv
myitcv / main.go
Created June 6, 2018 08:32
GopherJS "leaking" repro
// this program demonstrates how fetches through gopherjs seem to be memory leaking.
package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
@myitcv
myitcv / pragmas.sh
Created April 21, 2018 19:31
Go pragmas
$ cd $GOROOT/src
$ grep -h -r '^[ \t]*//go:' | sort | uniq
//go:a
//go:b
//go:c1
//go:c2
//go:cgo_dynamic_linker "<path>"
//go:cgo_export_dynamic _cgo_panic
//go:cgo_export_dynamic _cgo_topofstack
//go:cgo_export_dynamic crosscall2
@myitcv
myitcv / 0 instructions.sh
Last active April 17, 2018 18:02
stderr stdout demo
go build -o main -tags main && go build -o main2 -tags main2
# run main2 by itself
./main2
# exits with a non-zero exit code and gives:
#
# 1st line to stdout
# 2nd line to stderr
# 3rd line to stdout
#!/usr/bin/env bash
set -eu
cd `mktemp -d`
export GOPATH=$PWD
pwd
root="github.com/myitcv"
v1="v1.2.0"
@myitcv
myitcv / 01_ReactTeamProposal.ts
Last active September 18, 2019 15:32
Typescript example comparing various signatures for getDerivedStateFromProps
interface MyCompProps {
model: Model;
modParams: ModParams;
}
interface MyCompState {
derived1?: Derived1;
derived2?: Derived2;
initialized: boolean;
@myitcv
myitcv / 0. Summary.md
Last active November 7, 2017 15:34
Chrome Canary issues report 2017-11-07

Summary: 90-95% of the time absolutely fine. Good speed, responsiveness etc.

See issues listed below, giving details of when things go wrong 5-10% of the time. These issues seem to correspond to when I've opened WhatsApp web. Indeed I'm yet to experience any issues if I don't launch a tab with WhatsApp web in a Chrome session.

See also the errors list of unique errors seen in the terminal (from which I launched Chrome)

@myitcv
myitcv / gdb_output.txt
Created August 1, 2017 13:03
core_dump.node.45621.myitcv-virtual-machine.1501592095
(gdb) where
#0 0x000039709bb9f1c5 in ?? ()
#1 0x00001c675bd1e739 in ?? ()
#2 0x00007ffe2916c1c8 in ?? ()
#3 0x000039709c30c411 in ?? ()
#4 0x00000c2944473521 in ?? ()
#5 0x00001c675bd3fb69 in ?? ()
#6 0x0000000000000000 in ?? ()
(gdb) bt full
#0 0x000039709bb9f1c5 in ?? ()