Skip to content

Instantly share code, notes, and snippets.

@16892434
16892434 / SSL-certs-OSX.md
Created June 8, 2021 08:58 — forked from croxton/SSL-certs-OSX.md
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   = my-project.dev

Additional FQDNs can be added if required:

@16892434
16892434 / proxy.go
Created June 10, 2021 01:51 — forked from legendtkl/proxy.go
simple golang tcp proxy (forward request)
package main
import (
"fmt"
"net"
"io"
)
func main() {
//http.HandleFunc("/", handler)
@16892434
16892434 / go_port_forwarding.go
Created June 10, 2021 01:51 — forked from qhwa/go_port_forwarding.go
network port forwarding in go lang
package main
import (
"fmt"
"io"
"net"
)
func main() {
ln, err := net.Listen("tcp", ":8080")
@16892434
16892434 / mnist.go
Created June 29, 2021 07:07 — forked from higuma/mnist.go
MNIST database reader with Golang
// MNIST database reader
// http://yann.lecun.com/exdb/mnist/
package mnist
import (
"fmt"
"os"
"path/filepath"
)
@16892434
16892434 / language_acq.txt
Created January 28, 2022 01:08 — forked from jamfish/language_acq.txt
Language Acquisition
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
@16892434
16892434 / language_acq.txt
Created January 28, 2022 01:08 — forked from ianfitzpatrick/language_acq.txt
Language Acquisition
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
@16892434
16892434 / Makefile.md
Created July 20, 2022 01:14 — forked from subfuzion/Makefile.md
Makefile for Go projects

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,

@16892434
16892434 / Makefile
Created July 20, 2022 01:14 — forked from thomaspoignant/Makefile
My ultimate Makefile for Golang Projects
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)
# Source: https://gist.github.com/a5870806ae6f21de271bf9214e523b53
##################
# Create Cluster #
##################
minikube start --memory 6g --cpus 4
#################
# Install Istio #
@16892434
16892434 / cgo.md
Created July 29, 2022 01:54 — forked from zchee/cgo.md
cgo convert list

See also, http://libraryofalexandria.io/cgo/

Using Go 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.