Live data from Hacker News

Ask HN: Small scripts, hacks and automations you're proud of?

news.ycombinator.com

251–260 of 340 posts

Re: Ask HN: Small scripts, hacks and automations you're proud of?

#251

Recently developed a small embedded device (using a nRF52840 microcontroller) that allows me to open my front gate remotely using my phone. I no longer have to carry around a gate remote. And my friends/guests can now open the gate from their phone as well. I couldn't find anything on the market for doing that so I'm glad I managed to do it (and it was a good opportunity to learn some embbedded programming and electr…

I have an app to open the gate of my parking garage. However, apps are not that convenient while driving.

Reverse engineered it and created an Android Auto app instead.

https://daanmiddendorp.com/tech/2022/10/13/reverse-engineeri...

Re: Ask HN: Small scripts, hacks and automations you're proud of?

#252

I don't have the script anymore but when I was an intern at a regional hospital system ~10 years ago they were running into problems with an old wireless system where after a certain global client count and AP uptime APs would stop registering clients or roams. At the start of the day everything was fine, by night some random wireless tickets were coming in, and by next morning everything was on fire and thousands of…

I love stories like this that directly result in quality of life improvment.

Re: Ask HN: Small scripts, hacks and automations you're proud of?

#254
One thing I really like doing, is commenting my bash commands. Its not an obvious thing, but it really helps ..

    $ some_cmd | another_cmd -d doing -some complex -thing # somecmd to do something complex
Some time later, I don't have to remember the long string of commands - just the comment .. CTRL-R "somecmd" .. and I'm back again!

Another small personal hack that has had a big impact, is that I print-to-PDF any web page I find interesting, instead of bookmarking it. I have done this since 1999 and now have over 70,000 PDF's of everything interesting I've ever read online, safely in a local cache of readable PDF's for offline use.

The next big life hack will be to put myself on a boat in the middle of a vast ocean with 70,000 PDF's to read .. joking aside, its also pretty interesting to harvest this data and see what my interests have been over the years, and see the bread-crumb trails of sites I've visited related to those interests .. kind of like having my own personal Internet ..

Re: Ask HN: Small scripts, hacks and automations you're proud of?

#255
1. When I was in high school I didn't have a computer, so I used my Symbian Nokia device (Nokia N70, it had a python interpreter) to write a Python script, that would keep a location database (using cell tower data) and it would show using on the screen my current location (if it's in the database). The UI was a static image, with the location/coordinates drawn on top of that image. 2. Automated a web browser game, to farm stuff for me when I wasn't on the PC, saved me a ton of time. The script was extremely customisable, with protections against bot detection. 3. I was planning on visiting London, and tried booking a Harry Potter tour on the WB website, but the tickets were sold out for months. I noticed that sometimes when you would enter the ticketing site some random slots on the calendar would be briefly open. I wrote a script kept trying to catch a slot for the day I would be in London and after about 12h it caught one and I was able to buy the tickets.

Re: Ask HN: Small scripts, hacks and automations you're proud of?

#256
post #196

I use the following tiny script to make PDFs look like they have been scanned. There are still entities that require you to physically sign a document and scan it. So far, everyone accepted PDFs like these: #!/bin/sh ROTATION=$(shuf -n 1 -e '-' '')$(shuf -n 1 -e $(seq 0.05 .5)) convert -density 150 $1 \ -linear-stretch '1.5%x2%' \ -rotate ${ROTATION} \ -attenuate '0.01' \ +noise Multiplicative \ -colorspace 'gray' $2

Do you have a before and after of a sample pdf? Sounds great.

How do you use it? I don't see any PDF file paths?

Re: Ask HN: Small scripts, hacks and automations you're proud of?

#258

I've mapped the extra buttons on my mouse to macros for the software I use, mainly Solidworks. The most useful one is control, it allows me to select multiple items wile only using the mouse hand.

Oh yes, my mouse macros are probably up there aswell.

On my mouse I have Alt+Tab, Alt+F4, Win+M (Minimize all), CTRL+Tab (alt+tab for browser tabs), CTRL+W (close browser tab), CTRL+Shift+T (open last closed tab), CTRL+Shift+LMB (open link in new tab and switch to it), CTRL+C, CTRL+X, CTRL+V, CTRL+V;Enter, and CTRL+"+/-" for pagezoom on mousewheel when mouse is tilted sideways. Regular back/forth buttons ofc and still got two unused buttons for games.

That way I can use PC very comfortably without needing a hand on my keyboard, its a blessing, and I would suggest everyone to try at least some of those bindings out. I use Swiftpoint Z for this.

Re: Ask HN: Small scripts, hacks and automations you're proud of?

#259

Honestly, the script/hack/automation I'm still most proud of is from around 1983, when I was 12 years old, for my Commodore 64. Back then, all computer communications were over the phone line, and in my house, we only had one line, so I spent a lot of late nights, dialing into BBSs, often not going to sleep until the sun came up. Then, I would get in trouble at school for falling asleep in class. So I came up with a…

Do tell us more. I suppose you downloaded the games to a floppy; did you have to worry about running out of space?

Re: Ask HN: Small scripts, hacks and automations you're proud of?

#260
post #196

I use the following tiny script to make PDFs look like they have been scanned. There are still entities that require you to physically sign a document and scan it. So far, everyone accepted PDFs like these: #!/bin/sh ROTATION=$(shuf -n 1 -e '-' '')$(shuf -n 1 -e $(seq 0.05 .5)) convert -density 150 $1 \ -linear-stretch '1.5%x2%' \ -rotate ${ROTATION} \ -attenuate '0.01' \ +noise Multiplicative \ -colorspace 'gray' $2

So awesome! Just tried and it worked great.
Post reply on HN