See also, http://libraryofalexandria.io/cgo/
cgo
has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src
. IDE's(vim) Goto command not works.
So, Here collect materials.
# Source: https://gist.github.com/a5870806ae6f21de271bf9214e523b53 | |
################## | |
# Create Cluster # | |
################## | |
minikube start --memory 6g --cpus 4 | |
################# | |
# Install Istio # |
See also, http://libraryofalexandria.io/cgo/
cgo
has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src
. IDE's(vim) Goto command not works.
So, Here collect materials.
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
# The command finds the most recent tag that is reachable from a commit. | |
# If the tag points to the commit, then only the tag is shown. | |
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
# and the abbreviated object name of the most recent commit. | |
git describe | |
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
git describe --abbrev=0 | |
# other examples |
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
import Foundation | |
/** | |
Extension to save/load a JSON object by filename. (".json" extension is assumed and automatically added.) | |
*/ | |
extension JSONSerialization { | |
static func loadJSON(withFilename filename: String) throws -> Any? { | |
let fm = FileManager.default |
/* | |
This is an example of a golang gzip writer program, | |
which appends data to a file. | |
*/ | |
package main |
package main | |
import ( | |
"bufio" | |
"compress/gzip" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
) |