I ran an e-commerce business that used Australia Post for shipping. A few years ago, I was responsible for 90% of Australia Post's lost parcel/SLA refund customer service volume in one day. Before COVID, Australia Post had a "Next Day Guarantee" for parcels sent through their Express Post network. If the parcels didn't arrive the next day, customers could choose to get a prepaid satchel or their money back. To take a…
Ask HN: Small scripts, hacks and automations you're proud of?
211–220 of 340 posts
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#212Earlier quoted context omitted.
Since you have used several backup tools, I wonder which one you recommend.
Definitely Kopia. I was skeptical at first, it's a relatively new tool and not much is known about it (at least on HN) but it's uber-fast and compresses extremely well. Detection of duplicate blocks seems both more aggressive and faster compared to Borg and Restic. It's honestly a win on all fronts. It can sync to remote places -- which I don't care about as I have a local directory where it does its stuff and I then…
I have been very happy with restic. It has worked flawlessly. The only thing missing from what I rather to have is error correction and asymmetric encryption.
I might look into Kopia when I have time. I was a bit worried that it’s newer and might be less reliable.
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#213 motd() {
date +%D > /tmp/motd_seed
sort -R --random-source=/tmp/motd_seed ~/Dropbox/motd.txt | head -n 1
}
motd
```Re: Ask HN: Small scripts, hacks and automations you're proud of?
#214I haven't updated it in a few years because it just works
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#215Built a microcontroller driving a normally-closed relay to interrupt the power for 1 minute out of every 120. No more cold mornings. I later added temperature sensing, smarter resetting based on temperature (to prevent power cycling a working boiler), and a webserver to it: https://imgur.io/a/VM7nD74 (the graph is an SVG; everything was generated on the local ESP8266)
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#216Finding an appointment is notoriously difficult, and people often depend on the results of those appointments to start their life here. So I built a UI for the script and put it online. Not just code on GitHub but a live website everyone can use. It uses websockets to wait for appointments from the script running on a server.
It's been live for almost a year now. Thousands of people got an appointment that way. I got the city's blessing to keep it online, albeit with a restrictive poll rate.
It's really cool to see people recommend the tool to each other, and to work directly with the city.
When I return from vacation, I want to ask the city to extend the tool, and also translate it to other languages.
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#217One is a RSS feed reader (GORSS) for the terminal that I use to always be up to date with stuff that interests me. The other is a simple todo-list that I use for work, shopping etc (DoIT).
https://github.com/lallassu/gorss https://github.com/lallassu/doit
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#218`diary` opens the entry for today
`diary -1` opens the entry for yesterday
`diary -365` opens the entry for a year ago
https://gist.github.com/bspammer/12d6b4a8049c69c832df7c4fd1d...
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#219my favorite is a little command line helper called “o”. it’s a helper for copy and rename commands. If I want to edit a misspelled filename I can just type o mv mispelled.txt and it will make an interactive prompt that looks like: mv mispelled.txt mispelled.txt_ but the last word is editable, so I can use the arrow keys to alter it in place https://github.com/jes5199/o
btw there is a bash feature that you can use for this touch a_tset_file.txt mv a_t{se,es}t_file.txt it works for changing file extensions: touch foo.txt mv foo.{txt,json} or for adding or removing characters, just leave the other side of the comma empty touch foo.txt mv foo{,bar}.txt mv foo{bar,}.txt
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#220Honestly, 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…