# uses https://github.com/embano1/tw, JSON output stored in file for faster processing
$ tw -f tw.json likes >Downloads/twout.json
# filter only youtube videos and print tweet text
$ cat twout.json | jq '.[]|select( .entities.urls[].expanded_url | contains ("yout"))|.full_text,"----"'
This file contains hidden or 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
| # Get latest release for PWD | |
| https://github.com/franela/docker-machine-driver-pwd | |
| # Unzip, and make sure the PWD driver for the OS is in $PATH | |
| # Start a PWD session | |
| http://labs.play-with-docker.com/ | |
| # Note the PWD ID (full http string) |
This file contains hidden or 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
| **Install Theme** | |
| Powerlevel 9k | |
| git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k (make sure to have Powerline fonts installed first, this method works for oh-my-zsh only) | |
| Details and other installation options: https://github.com/bhilburn/powerlevel9k#installation | |
| **Edit .zshrc** | |
| ZSH_THEME="powerlevel9k/powerlevel9k" | |
| DEFAULT_USER=$USER | |
| POWERLEVEL9K_PROMPT_ON_NEWLINE=true | |
| POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=" --" |
This file contains hidden or 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
| man zshexpn | |
| # echo hellow world | |
| ^hellow^hello | |
| > echo hello world | |
| (only works on last command) | |
| # replace first arg string in a history command | |
| !353:1:s^hello^hi |
This file contains hidden or 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
| close VSCode and gocode close | |
| go get -u github.com/rogpeppe/godef | |
| go get -u github.com/nsf/gocode |
This file contains hidden or 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" | |
| ) | |
| func main() { | |
| s := string("\xF0\x9F\x98\x85") | |
| b := []byte("\xF0\x9F\x8D\xBB") | |
| fmt.Println(s,string(b)) |
This file contains hidden or 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
| # Asuming prefix is C-b and change to C-a | |
| C-b + : | |
| set-option -g prefix C-a |
Example for Kubernetes DebugContainers
$ git clone https://github.com/kubernetes/kubernetes# Increase search limit and only print commit IDs
$ git -c diff.renameLimit=99999 log -SDebugContainers --pretty=format:"%h"
This file contains hidden or 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
| https://github.com/ashleyschuett/kubeconfig-cleanup/issues/5 |
$ kubectl -n pubsub get ev --sort-by count -o custom-columns='NAME:.metadata.name,KIND:involvedObject.kind,MSG:.message,FIRST:firstTimestamp,COUNT:.count'$ kubectl get events --sort-by='.metadata.creationTimestamp' -o 'go-template={{range .items}}{{.involvedObject.name}}{{"\t"}}{{.involvedObject.kind}}{{"\t"}}{{.message}}{{"\t"}}{{.reason}}{{"\t"}}{{.type}}{{"\t"}}{{.firstTimestamp}}{{"\n"}}{{end}}'OlderNewer