Skip to content

Instantly share code, notes, and snippets.


Oscar Zhou oscarzhou

View GitHub Profile
View golang-create-read-write-delete-file.go
package main
import (
var path = "/Users/novalagung/Documents/temp/test.txt"
Integralist / Long and Short Flag.go
Last active Jun 2, 2021
[Golang Long and Short Flags] #go #golang #flags
View Long and Short Flag.go
var myFlagType string
func init() {
const (
flagValue = "default value is foo"
flagUsage = "this is my flag explanation"
flag.StringVar(&myFlagType, "foo", flagValue, flagUsage)
flag.StringVar(&myFlagType, "f", flagValue, flagUsage+" (shorthand)")
sdorra / keys.go
Created Apr 17, 2016
Golang RSA Key Generation
View keys.go
* Genarate rsa keys.
package main
import (
mxlje / recursive.go
Created Jun 29, 2017
Golang html/template recursive rendering partial
View recursive.go
type Thing struct {
Text string
Things []Thing
func RootHandler(rw http.ResponseWriter, req *http.Request) {
tmpl, err := template.New("root").Parse(`
{{ define "message" }}
<li>{{ .Text }}
davfre /
Last active May 12, 2022
git commandline cheat-sheet
asukakenji /
Last active May 13, 2022
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
robert-claypool /
Created Jul 13, 2016
How To Make Debian Linux Fullscreen in Hyper-V
masklinn /
Last active May 20, 2022
launchctl/launchd cheat sheet

I've never had great understanding of launchctl but the deprecation of the old commands with launchctl 2 (10.10) has been terrible as all resources only cover the old commands, and documentation for Apple utilities is generally disgracefully bad, with launchctl not dissembling.

Mad props to which contains most details


Internally, launchd has several domains, but launchctl 1 would only ask for service names,

rxaviers / gist:7360908
Last active May 27, 2022
Complete list of github markdown emoji markup
View gist:7360908


:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: