Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am lordnynex on github.
  • I am nynex (https://keybase.io/nynex) on keybase.
  • I have a public key ASCOaQTRUH1CBA2H-EnkNNgeFImEm-VNBkNZvRmIvYz9cAo

To claim this, I am signing this object:

#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
error_log logs/error.log debug;
#pid logs/nginx.pid;
daemon off;
@lordnynex
lordnynex / Makefile
Created April 23, 2016 03:04 — forked from nl5887/Makefile
grapviz tcpdump
LAYOUT=circo
SOURCES = $(wildcard *.dot)
TARGETS = $(SOURCES:.dot=.svg)
%.svg:%.dot
dot -Tsvg -K${LAYOUT} "$^" -o "$@"
all: $(TARGETS)
clean:
@lordnynex
lordnynex / Makefile
Created July 30, 2016 23:47 — forked from smagch/Makefile
Makefile for Golang project that has multiple packages
GO_LINT = ${GOPATH}/bin/golint
GO_VET = ${GOPATH}/bin/vet
# set your packages.
TARGETS = foo bar hoge
TARGETS_TEST = $(patsubst %,test-%, $(TARGETS))
TARGETS_LINT = $(patsubst %,lint-%, $(TARGETS))
TARGETS_VET = $(patsubst %,vet-%, $(TARGETS))
.PHONY: test lint vet $(TARGETS_TEST) $(TARGETS_LINT)
package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@lordnynex
lordnynex / template.html
Created August 8, 2016 03:26
A slightly better godoc2md template. Attempts to mimic godoc.org template by adding in anchor links, and index/files sections
{{with .PDoc}}
{{if $.IsMain}}
> {{ base .ImportPath }}
{{comment_md .Doc}}
{{else}}
# {{ .Name }}
` + "`" + `import "{{.ImportPath}}"` + "`" + `
* [Overview](#pkg-overview)
* [Index](#pkg-index){{if $.Examples}}
@lordnynex
lordnynex / negroniGorillaMux.go
Created August 9, 2016 08:50 — forked from pagreczner/negroniGorillaMux.go
Negroni and Gorilla Mux with Middleware example - golang
package main
import (
"github.com/codegangsta/negroni"
"github.com/gorilla/mux"
)
func main() {
router := mux.NewRouter()
apiV1 := router.PathPrefix("/api/v1").Subrouter()
@lordnynex
lordnynex / packer-config
Created August 10, 2016 20:08 — forked from jjongsma/packer-config
Process YAML and write Packer JSON to STDOUT
#!/usr/bin/python
#
# Usage: packer-config my-template.yaml | packer build -
#
# Constructs a Packer JSON configuration file from the specified YAML
# template file and writes it to STDOUT.
#
# The YAML template format adds some flexibility and readability by
# adding comments and an !include directive, allowing for the
# following template syntax:
@lordnynex
lordnynex / 1_Dockerised_JMeter.md
Created August 11, 2016 07:43 — forked from hhcordero/1_Dockerised_JMeter.md
Dockerized JMeter - A Distributed Load Testing Workflow