Ask HN: Small scripts, hacks and automations you're proud of?
41–50 of 340 posts
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#42Using n8n I can parse those emails and put the data into a nice Airtable base (and a csv for backup). Next step, is to add GPS co-ordinates to each transaction.
Does anyone know if there is a way to run a secure and private location tracking service to my iPhone, or is my only hope to pay Apple the annual fee and do it myself?
(Yes: I wrote "secure and private location tracking" with a straight face - I'm hoping there's a solution out there)
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#43All of my favorite things are little AutoHotkey shortcuts. I have several that basically just execute a Regex replace on whatever text is currently highlighted. It's ridiculously convenient to just have those functions ready to go any time. But I started accumulating so many of them, it got to be a problem just remembering all the ones I had and how to trigger them. I had to start finding new ways of keeping them all…
; ahk v1 code
CapsLock::
KeyWait, CapsLock
If (A_PriorKey="CapsLock")
SetCapsLockState, % GetKeyState("CapsLock","T") ? "Off" : "On"
Return
#If, GetKeyState("CapsLock", "P")
u:: ; convert selection to code in markdown by pressing CapsLock+u
SendRaw, ````
SendInput {Left}
Return
; ...
#If
I also find myself with way too many obscure Mouse button {1|2}, Ctrl, Alt, Capslock, F{1|12}, etc. incantations I never remember and end up opening the script to search them. I thought about adding pie menus based on context but never got to it. Would you mind sharing a minimal example of your right click menu? Sounds much simpler and accessible. The keyboard hook à la vscode chords also seems pretty useful, will definitely implement thatRe: Ask HN: Small scripts, hacks and automations you're proud of?
#44Re: Ask HN: Small scripts, hacks and automations you're proud of?
#45The corp in question: Begins with V and ends with z and likes to screw customers.
All above board, approved by several levels of various teams/depts. The head of a specific dept sent me several strongly worded texts/voicemails. He was rather expressive to say the least over something that cost $0.
I could go in more detail but there are a few NDAs I signed.
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#46A couple of PowerShell scripts that moves multi-gigabyte files from the computer that generates it to an intermediate server, and then another computer picks those up and puts them on to whatever storage space is available, squeezing them in via a naive backpack algorithm. It shaved about two hours per day off my workload, instead of manually copying files around the network and then monitoring them to make sure they got where they meant to go.
A couple of Python scripts that tell a number of SONY video cameras to wake up, pull in the video and audio over USB, verify the files transferred correctly, then erase them from the camera to make space on the SD card.
A simple voice-controlled personal assistant that can start & stop multiple video cameras, perform the "mechanical clapper" effect for each scene and take, label the video files, and read out the prompt for the scene about to be shot.
A simple C# stopwatch timer for Windows that logs my daily walks via a touch screen computer located near the front door, calculating speed & distance for that walk, total daily time, etc. Hooks in to a couple of security cameras to track me as I walk past the house on my laps, recognize that it is me, and time stamp my passing (by the camera).
A simple Python script that pulled a whole bunch of data out of PDFs for a research project. It saved the small research team multiple thousands of dollars that they couldn't get a research grant for, and was able to then save the department multiple tens of thousands of dollars each year from that point onward. I got paid a large pizza (toppings of my choice). And made a couple of friends of some librarians.
A home point touch off position script for my CNC.
There are dozens more I'm proud of that I am forgetting. These are the kinds of interesting little projects that take an afternoon or an evening and often have a huge impact on quality-of-life.
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#47I have a script listed in package.json for my site. Often I don't really care about commit messages here, not because I don't find them valuable, but because so often its from editing and publishing articles. I don't really want to think of messages all the time so often end up typing random crap. I use this now: import { execSync } from 'child_process'; execSync('git add -A'); const modifiedFiles = execSync('git sta…
Much better than "Changes", "Update" or "WIP".
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#48Getting transaction data from banks is hard. Especially timely data. Luckily both my banks have the option for a notification email being sent immediately after each Visa or checking account transaction. Using n8n I can parse those emails and put the data into a nice Airtable base (and a csv for backup). Next step, is to add GPS co-ordinates to each transaction. Does anyone know if there is a way to run a secure and…
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#49I inadvertently caused a VERY VERY large corporation that is a household name to change its TOS through one of my little automation scripts. By little, I mean a few dozen lines of code and some ingenuity. The corp in question: Begins with V and ends with z and likes to screw customers. All above board, approved by several levels of various teams/depts. The head of a specific dept sent me several strongly worded texts…
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#50Earlier quoted context omitted.
This seems really nice! Makes me want to build my own with Gum filters, TBH.
is it this? https://github.com/charmbracelet/gum If so, you just introduced me to an incredible looking project ahah.