I got this idea from a Twitter discussion which eventually blew up a year later after its initial release.
Ask HN: Small scripts, hacks and automations you're proud of?
171–180 of 340 posts
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#172On Windows: - Created a folder called "shortcuts" - Copy the folder URL into the system path (Control Panel, Environment variables something something) - Create a shortcut of anything I want to hyperlink to and put in there, with descriptive names - In IE, I think the setting was to enable autocomplete. For some reason that was linked to the autocomplete of the run menu item in Windows. - For extra bonus points, add…
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#173Maybe this already exists somewhere and I don't know about it ... Anyway, when working on feature branches I wanted a quick way to switch to master, pull, switch back and finally rebase. So I made a little script ( https://gist.github.com/lelanthran/6c9bd1125f89e7621364878d1... ) that pushes the current branch name onto a stack before switching to a new branch, and allows me to switch back to the topmost branch on th…
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#174There is a specific small hotel that will remain unnamed, which my partner wanted to book for a long long time. At any given moment if you check the reservations page, it is most likely booked for two years solid. It is famous enough that people book it all the time, but it has lenient cancellation policy of 100% refund if cancelled before 2 weeks. This is not really a problem for them as these vacancies get booked i…
Was the hotel in NZ? And do you work on a three headed beast?
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#175I made a CLI tool for quickly starting new branches with draft PRs, asking for reviews, etc: https://github.com/dbalatero/work-cli Made a bunch of Hammerspoon plugins for macOS: - https://github.com/dbalatero/SkyRocket.spoon - mod+click to resize/drag windows - https://github.com/dbalatero/VimMode.spoon - Vim mode everywhere - https://github.com/dbalatero/HyperKey.spoon - pop-up menu for when you forget your keybinds…
you effort will just be null the second apple change the usability apis enabling hammerspoon, like they did countless times before. I don't even rename the name of the fallen apps before it.
instead now I contribute things as long lived proper features on KDE and hopefully advance humanity instead of apple profits.
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#176Maybe this already exists somewhere and I don't know about it ... Anyway, when working on feature branches I wanted a quick way to switch to master, pull, switch back and finally rebase. So I made a little script ( https://gist.github.com/lelanthran/6c9bd1125f89e7621364878d1... ) that pushes the current branch name onto a stack before switching to a new branch, and allows me to switch back to the topmost branch on th…
Or to move back N branches you can do: `git checkout @{-N}`
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#177 mkfifo f;echo \0>f&xargs -E, -aRe: Ask HN: Small scripts, hacks and automations you're proud of?
#178Re: Ask HN: Small scripts, hacks and automations you're proud of?
#179Re: Ask HN: Small scripts, hacks and automations you're proud of?
#180This is more in the "hack" category, but here is a solution for bookmarking directories[1] that I am quite fond of: mkdir ~/.marks/ export CDPATH=.:~/.marks/ function mark { ln -sr "$(pwd)" ~/.marks/"$1"; } Then: mark @name # add bookmark called @name for the current directory cd @name # jump to the bookmarked location cd @ # list all available bookmarks It can list bookmarks, auto-complete, jump to sub-directories w…