curl -iH "Host: delaymaster.local" http://127.0.0.1\?delay\=70s
returns
HTTP/1.1 504 Gateway Time-out
Server: nginx/1.14.1
Date: Mon, 12 Nov 2018 21:03:37 GMT
curl -iH "Host: delaymaster.local" http://127.0.0.1\?delay\=70s
returns
HTTP/1.1 504 Gateway Time-out
Server: nginx/1.14.1
Date: Mon, 12 Nov 2018 21:03:37 GMT
{ | |
"editor.wordWrap": "bounded", | |
"editor.wordWrapColumn": 160, | |
"editor.fontSize": 14, | |
"workbench.editor.enablePreview": false, | |
"workbench.editor.enablePreviewFromQuickOpen": false, | |
"editor.smoothScrolling": true, | |
"editor.minimap.enabled": false, | |
"editor.rulers": [ | |
80, |
This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL
#!/bin/bash | |
############################################### | |
# To use: | |
# https://raw.github.com/gist/2776351/??? | |
# chmod 777 install_postgresql.sh | |
# ./install_postgresql.sh | |
############################################### | |
echo "*****************************************" | |
echo " Installing PostgreSQL" | |
echo "*****************************************" |
FILENAME=$(basename $(pwd)) | |
go test -run=. -bench=. -cpuprofile=cpu.out -benchmem -memprofile=mem.out -trace trace.out | |
go tool pprof -pdf $FILENAME.test cpu.out > cpu.pdf && open cpu.pdf | |
go tool pprof -pdf --alloc_space $FILENAME.test mem.out > alloc_space.pdf && open alloc_space.pdf | |
go tool pprof -pdf --alloc_objects $FILENAME.test mem.out > alloc_objects.pdf && open alloc_objects.pdf | |
go tool pprof -pdf --inuse_space $FILENAME.test mem.out > inuse_space.pdf && open inuse_space.pdf | |
go tool pprof -pdf --inuse_objects $FILENAME.test mem.out > inuse_objects.pdf && open inuse_objects.pdf | |
go tool trace trace.out | |
go-torch $FILENAME.test cpu.out -f ${FILENAME}_cpu.svg && open ${FILENAME}_cpu.svg |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
func (logger Logger) Print(values ...interface{}) { | |
if len(values) > 1 { | |
level := values[0] | |
currentTime := "\n\033[33m[" + NowFunc().Format("2006-01-02 15:04:05") + "]\033[0m" | |
source := fmt.Sprintf("\033[35m(%v)\033[0m", values[1]) | |
messages := []interface{}{source, currentTime} | |
if level == "sql" { | |
// duration | |
messages = append(messages, fmt.Sprintf(" \033[36;1m[%.2fms]\033[0m ", float64(values[2].(time.Duration).Nanoseconds()/1e4)/100.0)) |