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 / sshtunnel.go
Created June 10, 2021 01:16 — forked from iamralch/sshtunnel.go
SSH tunnelling in Golang
package main
import (
"log"
"bufio"
"time"
"os"
"fmt"
"io"
"net"
@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 / Quah-D-2020.08-Pandoc-Workflow-Markdown-PDF.md
Created December 21, 2021 10:35 — forked from DannyQuah/2020.08-D.Quah-Pandoc-Workflow-Markdown-PDF.md
My Pandoc Markdown-PDF Workflow for Routine, Not Especially Technical Writing

My Pandoc Markdown-PDF Workflow for Routine, Not Especially Technical Writing

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.

@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)