This a collection of interesting links found in The Imposter's Handbook by Rob Conery.
Content:
| #!/usr/bin/env bash | |
| # show-args is a Python script that prints sys.argv[1:] | |
| echo '$@ =' "$@" | |
| echo 'no quotes: $@' | |
| show-args $@ | |
| echo 'quotes: "$@"' | |
| show-args "$@" | |
| AT="$@" | |
| echo 'quotes: "$AT" where AT="$@"' | |
| show-args "$AT" |
This a collection of interesting links found in The Imposter's Handbook by Rob Conery.
Content:
| [merge] | |
| tool = vimdiff | |
| [mergetool] | |
| prompt = true | |
| [mergetool "vimdiff"] | |
| cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J' | |
| [difftool] | |
| prompt = false | |
| [diff] | |
| tool = vimdiff |
| # GIT heart FZF | |
| # ------------- | |
| is_in_git_repo() { | |
| git rev-parse HEAD > /dev/null 2>&1 | |
| } | |
| fzf-down() { | |
| fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@" | |
| } |
| """ | |
| Results: | |
| multiple_update: 33 ms | |
| copy_and_update: 27 ms | |
| dict_constructor: 29 ms | |
| kwargs_hack: 33 ms | |
| dict_comprehension: 33 ms | |
| concatenate_items: 81 ms | |
| union_items: 81 ms |
| from __future__ import unicode_literals | |
| from prompt_toolkit.contrib.completers import WordCompleter | |
| ## Almost exact copy of prompt_toolkit.shortcuts | |
| from prompt_toolkit.buffer import Buffer | |
| from prompt_toolkit.enums import DEFAULT_BUFFER | |
| from prompt_toolkit.eventloop.base import EventLoop | |
| from prompt_toolkit.filters import IsDone, HasFocus, Always, Never, RendererHeightIsKnown | |
| from prompt_toolkit.history import History |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| nnoremap <silent> <leader>gm :tab split<CR>:Glistmod<CR> | |
| nnoremap <silent> <c-s-j> :call g:DiffNextLoc()<CR> | |
| nnoremap <silent> <c-s-k> :call g:DiffPrevLoc()<CR> | |
| command! Glistmod only | call g:ListModified() | Gdiff | |
| function! g:ListModified() | |
| let old_makeprg=&makeprg | |
| let old_errorformat=&errorformat | |
| let &makeprg = "git ls-files -m" | |
| let &errorformat="%f" |