This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
t := time.Now() | |
fmt.Printf("%s\n", t.Format("2006-01-02")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default editor | |
export EDITOR=/usr/bin/vim | |
# Add colors to the terminal | |
export CLICOLOR=2 | |
# Ignore CTRL-D for five times before exiting shell | |
export IGNOREEOF=5 | |
alias cp='cp -i' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Some json APIs tend to present list responses in | |
a single array not wrapped in the usual { "results" :[] } style. | |
Below is a simple way of parsing [ { ... }, { ... }, ... ] json responses. | |
*/ | |
package main | |
import ( |