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
| # ----------------------------------------------------------------------------- | |
| # AI-powered Git Commit Function | |
| # Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It: | |
| # 1) gets the current staged changed diff | |
| # 2) sends them to an LLM to write the git commit message | |
| # 3) allows you to easily accept, edit, regenerate, cancel | |
| # But - just read and edit the code however you like | |
| # the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/ | |
| gcm() { |
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
| // Original reference: | |
| // https://github.com/eschnett/zotero-citationcounts/issues/2#issuecomment-765117249 | |
| // To run this, open Tools > Developer > Run JavaScript in Zotero, paste the JavaScript below and then press run. | |
| // To make sure this code won't delete too much, by default it will just rehearse what will happen if you run it. | |
| // Press cancel on any dialog to stop the rehearsal. | |
| // If you are happy with the rehearsal, change 'rehearse' in the next line to 'false' and run again. | |
| const rehearse = true; // Set this to false to actually make changes | |
| const moveToTop = false; // Set this to true to move to top instead of deleting. This can help make "extra" sortable. |