diff --git a/.bash_profile b/.bash_profile index 03c8f55..945bea9 100644 --- a/.bash_profile +++ b/.bash_profile @@ -85,7 +85,7 @@ import os, logging, numpy as np, pandas as pd from pathlib import Path here = Path(\".\").resolve() -from rich import pretty +from rich import pretty, print pretty.install() # set to WARNING by default @@ -133,12 +133,13 @@ PS1="⨊ 𝕯𝓭𝓵:\[\033[36m\]\w\[\033[m\]$ " # ⚛ ⨊ 𝓓𝔇𝒟ℓℒ # functions # https://stackoverflow.com/a/73108928/5511061 -dockersize() { docker manifest inspect -v "$1" | jq -c 'if type == "array" then .[] else . end' | jq -r '[ ( .Descriptor.platform | [ .os, .architecture, .variant, ."os.version" ] | del(..|nulls) | join("/") ), ( [ .SchemaV2Manifest.layers[].size ] | add ) ] | join(" ")' | numfmt --to iec --format '%.2f' --field 2 | column -t ; } +dockersize() { docker manifest inspect -v "$1" | jq -c 'if type == "array" then .[] else . end' | jq -r '[ ( .Descriptor.platform | [ .os, .architecture, .variant, ."os.version" ] | del(..|nulls) | join("/") ), ( [ .SchemaV2Manifest.layers[].size ] | add ) ] | join(" ")' | numfmt --to iec --format '%.2f' --field 2 | sort | column -t ; } export -f dockersize clusterimages() { kubectl get po -A -o json | jq -cr '.items[].spec.containers[].image' | grep -o '^[^@]\+' | sort -u | xargs -I _ bash -c 'echo - _ && dockersize _' ; } export -f clusterimages -alias kubetop="watch -n4 python ~/git/kubetop.py" +export HIDESYS=1 +alias kubetop="python ~/git/kubetop.py" # https://gist.github.com/ddelange/24575a702a10c2cb6348c4c7f342e0eb kubelogs() { # View logs as they come in (like in Rancher) using mktemp and less -r +F. diff --git a/README.md b/README.md index ee4724a..cbea322 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ https://github.com/naokazuterada/MarkdownTOC#usage --> ``` # boot old Mac while holding `T` to go in Target Disk Mode # password prompt should pop up - rsync -au --progress=info2 ~/backup + rsync -au --progress ~/backup ``` - Don't forget to take with your whole `.gnupg` folder, `.gitconfig`, `.envrc` etc! - Chrome settings/bookmarks are not backed up and are assumed to come from its builtin Sync. @@ -210,6 +210,8 @@ brew install --cask authy brew install --cask jitsi-meet # Maccy - maccy.app brew install --cask maccy +# pdflatex - tug.org/mactex/ +brew install --cask mactex-no-gui ``` @@ -285,14 +287,14 @@ Note: first open Chrome for the first time # get your favourite python versions - github.com/momo-lab/pyenv-install-latest git clone https://github.com/momo-lab/pyenv-install-latest.git "$(pyenv root)"/plugins/pyenv-install-latest git clone git://github.com/concordusapps/pyenv-implict.git "$(pyenv root)"/plugins/pyenv-implict - # list all available python versions - pyenv install -l | grep '^\s*[0-9]' + pyenv install -l | grep '^\s*[0-9]' # list all available python versions pyenv install-latest 2 pyenv install-latest 3 pyenv versions # see currently installed versions - pyenv global $(pyenv install-latest --print 3.8) $(pyenv install-latest --print 2) # set default versions: prefer py3 over py2 - # install virtualenv 'vv' based latest pyenv Python version 3.7, inheriting installed packages - pyenv virtualenv $(pyenv install-latest --print 3.8) --system-site-packages vv + pyenv global $(pyenv install-latest --print 3) $(pyenv install-latest --print 2) # set default versions: prefer py3 over py2 + # install virtualenv 'vv' based latest pyenv Python version 3.x, inheriting installed packages + pyenv virtualenv $(pyenv install-latest --print 3) --system-site-packages vv + # same for 'vv27' with python 2.7.x pyenv virtualenv $(pyenv install-latest --print 2) --system-site-packages vv27 ``` - Manage envs @@ -404,9 +406,9 @@ git checkout $START; \ ###### Rewriting history ```bash # "commit all amend" last commit, adding all modified tracked files to the it without editing the commit message -git config --global alias.amend "commit --amend --no-edit -a" +git config --global alias.amend "commit --amend --reset-author --no-edit -a" # "commit all amend with message" - add all modified tracked files to the last commit with a new commit message -git config --global alias.camend "commit --amend -am" +git config --global alias.camend "commit --amend --reset-author -am" # "squash last" X commits - allowing to edit a pre-generated commit message before committing - known caveat: when trying to squash into an initial commit, the reset fails git config --global alias.squashlast '!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f' # "undo" whatever you did last, for instance an erroneous squashlast - ref https://megakemp.com/2016/08/25/git-undo/ diff --git a/com.googlecode.iterm2.plist b/com.googlecode.iterm2.plist index c430b2c..2aa88e7 100644 --- a/com.googlecode.iterm2.plist +++ b/com.googlecode.iterm2.plist @@ -727,7 +727,7 @@ Maximize Active Pane Non-ASCII Anti Aliased Normal Font - InconsolataLGCNerdFontComplete- 9 + InconsolataLGCNerdFontComplete-Regular 9 Option Key Sends 0 Prompt Before Closing 2 diff --git a/htoprc b/htoprc index 28cc30d..f4f3b27 100644 --- a/htoprc +++ b/htoprc @@ -22,7 +22,7 @@ find_comm_in_cmdline=1 strip_exe_from_cmdline=1 show_merged_command=0 tree_view=0 -tree_view_always_by_pid=0 +tree_view_always_by_pid=1 all_branches_collapsed=1 header_margin=1 detailed_cpu_time=0