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.
# 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 |
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
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 # |
GOCMD=go | |
GOTEST=$(GOCMD) test | |
GOVET=$(GOCMD) vet | |
BINARY_NAME=example | |
VERSION?=0.0.0 | |
SERVICE_PORT?=3000 | |
DOCKER_REGISTRY?= #if set it should finished by / | |
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true | |
GREEN := $(shell tput -Txterm setaf 2) |
Go has excellent build tools that mitigate the need for using make
.
For example, go install
won't update the target unless it's older
than the source files.
However, a Makefile can be convenient for wrapping Go commands with
specific build targets that simplify usage on the command line.
Since most of the targets are "phony", it's up to you to weigh the
pros and cons of having a dependency on make
versus using a shell
script. For the simplicity of being able to specify targets that
can be chained and can take advantage of make
's chained targets,
Three background things: | |
1. Stephen Krashen’s Theory of Second Language Acquisition: | |
https://www.sk.com.br/sk-krash-english.html | |
Pretty much boils down to: | |
- Excessive-self monitoring and learning via grammar-first (see: duolingo) makes language acquisition way harder. | |
- We learn language via comprehensible input, “i + 1”, you need to find input that is + 1 past what you already know | |
- Stress, doubt, and basically being afraid to fuck up also kill language acquisition. | |
Here’s a lecture on his theories if you are interested: https://www.youtube.com/watch?v=t3lv7ExApHM&t=101s | |
Edit: Actually, this may be a better video. I’m having trouble finding one where he succinctly goes through his theories: | |
https://www.youtube.com/watch?v=Xn2k8I8by8o |
Three background things: | |
1. Stephen Krashen’s Theory of Second Language Acquisition: | |
https://www.sk.com.br/sk-krash-english.html | |
Pretty much boils down to: | |
- Excessive-self monitoring and learning via grammar-first (see: duolingo) makes language acquisition way harder. | |
- We learn language via comprehensible input, “i + 1”, you need to find input that is + 1 past what you already know | |
- Stress, doubt, and basically being afraid to fuck up also kill language acquisition. | |
Here’s a lecture on his theories if you are interested: https://www.youtube.com/watch?v=t3lv7ExApHM&t=101s | |
Edit: Actually, this may be a better video. I’m having trouble finding one where he succinctly goes through his theories: | |
https://www.youtube.com/watch?v=Xn2k8I8by8o |
by Danny Quah Aug 2020
TL;DR: I write technical articles in LaTeX. But shorter, non-technical writings are easier to do in Markdown. How do I produce PDF from Markdown documents? Answer: provide YAML information in the Markdown; run Pandoc (typically through a Makefile or Atom's Markdown Preview Enhanced). To make all this work, some adjustment is needed in Pandoc options and template files.
Pandoc is a filter that takes a written document in its given format, and produces a version of that same document in yet a different format. I use Pandoc primarily to transform Markdown documents to PDF, but I also draw on Pandoc to convert Word or ODT documents to Markdown. Or vice versa.
// MNIST database reader | |
// http://yann.lecun.com/exdb/mnist/ | |
package mnist | |
import ( | |
"fmt" | |
"os" | |
"path/filepath" | |
) |