- Makes it easy to bounce around different GCP projects
gcloud config configurations activate- `gcloud config set <[section/]property>
- Configurations stored in
$XDG_CONFIG_HOME/gcloud/configurations- No way to clone a configuration with gcloud, so you can copy files to start.
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
| adns | |
| apr | |
| apr-util | |
| argon2 | |
| ark | |
| aspell | |
| autoconf | |
| automake | |
| awscli | |
| brotli |
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
| """ | |
| A simple exploration of implementing a GraphQL schema with | |
| https://graphene-python.org. | |
| """ | |
| import datetime | |
| import uuid | |
| import pprint | |
| import graphene |
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
| $ for f in main.go fooprinter.go foo/foo.go foo/v2/foo.go; do echo -e "\n======= $f ======="; cat $f; done | |
| ======= main.go ======= | |
| package main | |
| import "./foo" | |
| func main() { | |
| foo.Print() | |
| printFooV2() |
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 ( | |
| "errors" | |
| "fmt" | |
| ) | |
| func main() { | |
| errs := []error{ | |
| errors.New("errors.New error"), |
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 ( | |
| "log" | |
| "net/http" | |
| "os" | |
| "time" | |
| ) | |
| func main() { |
From Gopher Slack
I'm rough on the details but I think I can shed some light. When compiling for Linux, cgo is optional but desirable. So when you're building on Linux and have libc available, cgo will be enabled and the resulting binary will be dynamically linked to libc. When compiling for Darwin, linking to libSystem is mandatory -- there is no stable syscall interface, and so Go programs always have to link against libsystem or whatever it is. The runtime contains a copy of enough of the libsystem API that it can
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
| $ cat hello.go | |
| package main | |
| import "fmt" | |
| func main() { | |
| fmt.Println("Hello!") | |
| } | |
| $ go run -x hello.go | |
| WORK=/var/folders/zh/tm1rghjn6hxdzbh5j8bnrmp80000gn/T/go-build036837237 |
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
| TaskID 0999ab9e-b992-43a1-9690-fcda177f0243 | |
| TaskID 0999ab9e-b992-43a1-9690-fcda177f0243 | |
| yarn info @now/build-utils@latest... | |
| yarn info @now/go... | |
| yarn add @now/build-utils@0.9.11... | |
| yarn add v1.16.0 | |
| info No lockfile found. | |
| [1/4] Resolving packages... | |
| [2/4] Fetching packages... | |
| [3/4] Linking dependencies... |
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
| git-diff-branch-only () { | |
| local branch=${1:-$(git branch --show-current)} | |
| local base=${2:-master} | |
| git diff $(git merge-base $branch $base) $branch | |
| } |