minikube stop; minikube delete && docker stop $(docker ps -aq) && rm -rf ~/.kube ~/.minikube && sudo rm -rf /usr/local/bin/localkube /usr/local/bin/minikube && launchctl stop 'kubelet.mount' && launchctl stop localkube.service && launchctl disable localkube.service && sudo rm -rf /etc/kubernetes/ && docker system prune -af --volumes
| package adnetwork | |
| import ( | |
| "fmt" | |
| "math" | |
| "strings" | |
| ) | |
| func SplitBids(bids []*Bid, size int) (chunks [][]*Bid) { | |
| if len(bids) <= size { |
Stage this hunk [y, n, q, a, d, /, j, J, g, s, e, ?]?
Here is a description of each option:
y stage this hunk for the next commit
n do not stage this hunk for the next commit
q quit; do not stage this hunk or any of the remaining hunks
a stage this hunk and all later hunks in the file
d do not stage this hunk or any of the later hunks in the file
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "strconv" | |
| "strings" | |
| ) |
| package main | |
| import ( | |
| "fmt" | |
| "strings" | |
| "sync" | |
| "time" | |
| ) | |
| func main() { |
https://dave.cheney.net/resources-for-new-go-programmers Varios recursos para empezar
https://github.com/golang/go/wiki LA wiki de go
https://github.com/EbookFoundation/free-programming-books/blob/master/free-programming-books.md#go Textos gratuitos
https://medium.com/@benbjohnson/standard-package-layout-7cdbc8391fc1 Una manera de organizar los paquetes
https://peter.bourgon.org/go-best-practices-2016/ Tips y experiencias de uso
https://github.com/tmrts/go-patterns Listado de patrones con algunas implementaciones
https://github.com/miguellgt/books/blob/master/go/go-design-patterns.pdf Libro sobre patrones
https://github.com/jbuberel/go-patterns Ejemplos de patrones (puede estar desactualizado)
https://talks.golang.org/2014/names.slide#1 Consejos sobre naming
https://blog.golang.org/slices Sobre slices y arrays
| //General Formatting | |
| #define GEN_FORMAT_RESET "0" | |
| #define GEN_FORMAT_BRIGHT "1" | |
| #define GEN_FORMAT_DIM "2" | |
| #define GEN_FORMAT_UNDERSCORE "3" | |
| #define GEN_FORMAT_BLINK "4" | |
| #define GEN_FORMAT_REVERSE "5" | |
| #define GEN_FORMAT_HIDDEN "6" | |
| //Foreground Colors |
Install iTerm 2
Download, unzip and drag to your Applications directory.
https://www.iterm2.com/downloads.html
Install Fish
| mkdir ~/vim | |
| cd ~/vim | |
| # Staically linked vim version compiled from https://github.com/ericpruitt/static-vim | |
| # Compiled on Jul 20 2017 | |
| curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz | |
| export VIMRUNTIME="$HOME/vim/runtime" | |
| export PATH="$HOME/vim:$PATH" | |
| cd - |
| function flatMyArr(arr) { | |
| return arr.reduce(function (acc, item) { | |
| /* console.log("item", item) | |
| console.log("acc", acc) */ | |
| if(Array.isArray(item)) flatMyArr(item) | |
| return acc.concat(item) | |
| }, []) | |
| } | |
| console.log(flatMyArr([1,2,[3],4])) |
