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
| ##################################################### | |
| # git | |
| ##################################################### | |
| _fzf_complete_git() { | |
| ARGS="$@" | |
| local branches | |
| branches=$(git branch -vv --all) | |
| if [[ $ARGS == 'git co'* ]]; then | |
| _fzf_complete "--reverse --multi" "$@" < <( |
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
| [core] | |
| autocrlf = false | |
| editor = 'vim' | |
| pager = bat --paging=always | |
| [diff] | |
| tool = vimdiff | |
| [merge] | |
| tool = vimdiff |
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
| # zsh settings: some colors | |
| autoload -U colors && colors | |
| PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b" | |
| # zsh auto-completion | |
| if type brew &>/dev/null;then | |
| FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH # add brews autocomplete to the list of complete functions | |
| fi |
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
| " polyglot | |
| " csv adds lots of remaps, so its disabled for the moment.. | |
| let g:polyglot_disabled = ['csv'] | |
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " Plugins | |
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| call plug#begin('~/.vim/plugged') | |
| " robust syntax |
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
| # When your a programmer and you want to use US Layout but cannot stand that z and y are switched | |
| # create e.g. ~/.login_hook.sh and, in there use hdiutil to remap y to z and vice versa | |
| hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x70000001C,"HIDKeyboardModifierMappingDst":0x70000001D},{"HIDKeyboardModifierMappingSrc":0x70000001D,"HIDKe yboardModifierMappingDst":0x70000001C}]}' | |
| # add it to as a login script ( done once ) | |
| sudo defaults write com.apple.loginwindow LoginHook /some/path/to/login_hook.sh |
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
| ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' |cut -d "" -f2 | cut -d "-" -f1 |
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
| cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 16 ; echo '' |
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
| tshark -i eth1 -f "port 8080 and tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354 or tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420" -a filesize:100000 -w - | gzip -9 -f > trace_100mb.gzip |