-
Inject profiling code
At the beginning of your .zshrc add following:
zmodload zsh/zprof
and at the end add:
zprof
This will load zprof mod and display what your shell was doing durung your initialization.
/** | |
* 使用步驟: | |
* 瀏覽器新增書籤,並在網址欄位放入以下程式碼 | |
* 後續只要在 risu 播放影片的頁面點擊書籤即可自動下載 | |
* 若有密碼,須先自行輸入密碼後,進入播放影片的頁面方可有效 | |
*/ | |
javascript: function downloadBlobs(blob){const blobUrl=new URL(blob);const url=new URL(blobUrl.pathname);const fileName=url.pathname.replace(/^\//g,"")||"video";const a=document.createElement("a");a.href=blob;a.download=`${fileName}.mp4`;a.click()}downloadBlobs(document.getElementsByTagName("video")[0].src); |
# Thanks to https://www.growingwiththeweb.com/2018/01/slow-nvm-init.html, modified | |
# for zsh as "type -t" works in bash but not zsh | |
# Add this to your .zshrc ... | |
# Defer initialization of nvm until nvm, node or a node-dependent command is | |
# run. Ensure this block is only run once if .bashrc gets sourced multiple times | |
# by checking whether __init_nvm is a function. | |
if [ -s "$HOME/.nvm/nvm.sh" ] && [ ! "$(type -w __init_nvm | awk '{print $2}')" = function ]; then |
*update: TBC, but this new might affect how easy it is to use this technique past August 2024: Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August
This gist, based in part on a gist by Brian Hartvigsen, allows you to export from Authy your TOTP tokens you have stored there.
Those can be "standard" 6-digits / 30 secs tokens, or Authy's own version, the 7-digits / 10 secs tokens.
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
- Create a bare clone of the repository.
(This is temporary and will be removed so just do it wherever.)
git clone --bare git@github.com:usi-systems/easytrace.git
We can get list of changed files between 2 branches/commits by
$ tar --ignore-failed-read -vczf archive.tgz $(git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT master develop)
Let's see important part:
git diff-tree -r $commit_id
:
Take a diff of the given commit to its parent(s) (including all subdirectories, not just the top directory).