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/ | |
| # ====== zxkxyz ====== |
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
| // It'll straight up compute permutations. Very inefficient time complexity wise. | |
| // Something like O(n^3)? Might be wrong on that, I just know it's inefficient haha! | |
| // This is one of the slowest ways to solve the problem because it has to computer | |
| // a possible solution for every single permutation. It's nested for loops so we | |
| // know it ought to be pretty slow. | |
| function largestProductOfThree (array) { | |
| var out; | |
| var permutation = function(arr) { | |
| var temp = 0; var first = true; |