Skip to content

Instantly share code, notes, and snippets.

🏦

Shi Han NG shihanng

🏦
Block or report user

Report or block shihanng

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View function.tmpl
{{define "function"}}
{{- $f := .}}
func {{.TestName}}(t *testing.T) {
{{- with .Receiver}}
{{- if .IsStruct}}
{{- if .Fields}}
type fields struct {
{{- range .Fields}}
{{Field .}} {{.Type}}
View cVimrc
set autoupdategist
set typelinkhints
let searchlimit = 30
let scrollstep = 70
let barposition = "bottom"
View keybase.md

Keybase proof

I hereby claim:

  • I am shihanng on github.
  • I am shihanng (https://keybase.io/shihanng) on keybase.
  • I have a public key ASCxoZQPsLAc5oZF20Qagmsb6zPTM1HBBckyazPsvGWGMwo

To claim this, I am signing this object:

@shihanng
shihanng / service_svc.go.patch
Last active Jun 16, 2018
c3c4ab8bfbb5/svc/servicea/cmd/servicea_svc/service_svc.go.patch
View service_svc.go.patch
diff --git svc/servicea/cmd/servicea_svc/servicea_svc.go svc/servicea/cmd/servicea_svc/servicea_svc.go
index 57f2486..8d2e583 100644
--- svc/servicea/cmd/servicea_svc/servicea_svc.go
+++ svc/servicea/cmd/servicea_svc/servicea_svc.go
@@ -1,31 +1,20 @@
-package main
+package servicea_svc
import (
"context"
@shihanng
shihanng / main.go
Created Jun 16, 2018
c3c4ab8bfbb5/servicea/main.go
View main.go
package main
import (
"google.golang.org/appengine"
_ "github.com/shihanng/gaegoasample/svc/servicea/cmd/servicea_svc"
)
func main() {
appengine.Main()
@shihanng
shihanng / app.yaml
Created Jun 16, 2018
c3c4ab8bfbb5/servicea/app.yaml
View app.yaml
runtime: go
api_version: go1.9
service: default
handlers:
- url: /.*
script: _go_app
@shihanng
shihanng / api.go.patch
Created Jun 15, 2018
c3c4ab8bfbb5/svc/servicea/api.go.patch
View api.go.patch
diff --git svc/servicea/api.go svc/servicea/api.go
index 99370e4..a974b63 100644
--- svc/servicea/api.go
+++ svc/servicea/api.go
@@ -5,6 +5,7 @@ import (
"log"
api "github.com/shihanng/gaegoasample/svc/servicea/gen/api"
+ "google.golang.org/appengine"
)
@shihanng
shihanng / design.go
Created Jun 14, 2018
c3c4ab8bfbb5/svc/servicea/design/design.go
View design.go
package design
import . "goa.design/goa/http/design"
import . "goa.design/goa/http/dsl"
import _ "goa.design/goa/codegen/generator"
var _ = API("servicea", func() {
Title("The service a")
})
@shihanng
shihanng / README.md
Last active May 3, 2018
Auto-mount CIFS on Solus (or any other Linux OS)
View README.md

Append something like below into /etc/fstab

# /etc/fstab: static file system information.
#
# <fs>      <mountpoint> <type> <opts>      <dump/pass>
...
//192.168.0.10/path/to/source /path/to/target cifs user,uid=1000,_netdev,noauto,x-systemd.automount,credentials=/path/to/cred 0 0
  • The value for uid can be obtained via
@shihanng
shihanng / .chunkwmrc
Last active Apr 27, 2020
chunkwm + skhd
View .chunkwmrc
#!/bin/bash
#
# NOTE: specify the absolutepath to the directory to use when
# loading a plugin. '~' expansion is supported.
#
chunkc core::plugin_dir /usr/local/opt/chunkwm/share/chunkwm/plugins
#
You can’t perform that action at this time.