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
| # Fuzzymove | |
| fmv() { | |
| local file=$(fd -t f | fzf --preview 'bat --style=numbers --color=always {}' --prompt="📁 File to move: ") | |
| local dest=$(printf ".\n%s" "$(fd -t d)" | fzf --preview 'eza -l --icons --color=always {}' --prompt="📂 Move to: ") | |
| if [[ -n "$file" && -n "$dest" ]]; then | |
| local filename=$(basename "$file") | |
| if [[ -e "$dest/$filename" ]]; then | |
| echo "⚠️ File already exists in $dest. Move aborted." | |
| return 1 |
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
| git log --date=format:%H --pretty=format:%ad | \ | |
| awk ' | |
| { h = int($0); cnt[h]++; total++ } # collect counts & grand total | |
| END { | |
| # find max bucket to rescale bars | |
| for (i = 0; i < 24; i++) if (cnt[i] > max) max = cnt[i] | |
| barWidth = 50 # chars for the widest bar | |
| for (i = 0; i < 24; i++) { | |
| ampm = (i < 12) ? "AM" : "PM" |
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
| // Quick rust matrix math benchmark, written by GPT | |
| use nalgebra::{DMatrix, DVector}; // Make sure to add nalgebra to your Cargo.toml file under [dependencies] | |
| use std::time::Instant; | |
| fn main() { | |
| // Matrix size for the benchmarks | |
| let rows = 500; | |
| let cols = 500; |
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
| let finalConversationCount = 0; | |
| async function scrollAndCountConversations() { | |
| let conversationContainer = document.querySelector('nav[aria-label="Chat history"]'); | |
| let previousCount = 0; | |
| let currentCount = 0; | |
| let maxElements = 100; // Limit to 100 elements for testing, increase as needed | |
| while (currentCount < maxElements) { | |
| let conversationList = document.querySelectorAll('li[data-testid^="history-item"]'); |