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…
Ask HN: Small scripts, hacks and automations you're proud of?
191–200 of 340 posts
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#192I looked for a way to do that. Browser cookies seemed like a possibility, until I learned that one site couldn't read another site's cookies. When I asked people if there was any workaround I was told that there wasn't. But then I figured out how to use them to track people anyway. That hack is my answer to the OP.
I filed a patent in 1995 that showed how to do it. The patent tied that technique to my specific mathematical technique for selecting the ads the user would most likely be interested in, so it could not be used to restrict other people from using cookies that way as long as they didn't also use my specific math. The patent also contained a lot of features about how to give users complete control over their information and that protected their privacy. (That part didn't get implemented much!)
I eventually sold the patent to DoubleClick, and DoubleClick was eventually sold to Google for an amount I recall to be in excess of $1 billion. By then I'd seen a marketing site recommend that Google buy DoubleClick, with my patent listed as one of the reasons they should. DoubleClick had their own patent describing the tracking cookie, but their priority date was a couple months later than mine. And it didn't have the privacy features mine did, or the same degree of tech about how to actually select ads.
In defending against a patent troll in 2021, Google and Twitter together filed a joint brief calling the tracking cookie "Robinson's Cookie". My name is Gary Robinson. (In case anyone is curious there's more info at https://www.garyrobinson.net/2021/07/did-i-invent-browser-co....)
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#193Re: Ask HN: Small scripts, hacks and automations you're proud of?
#194Another one was a password rotation script for my university. There was an idiotic password policy that required you to change your password every 6 months via a web form, and if you tried to change it to a password you had used before you would get an error saying that the new password couldn't match the last 24 passwords you had used. This information was very useful as it allowed me to write a script that simply changed my password 24 times and then changed it back to the one I wanted.
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#195Re: Ask HN: Small scripts, hacks and automations you're proud of?
#196 #!/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' $2Re: Ask HN: Small scripts, hacks and automations you're proud of?
#197Re: Ask HN: Small scripts, hacks and automations you're proud of?
#198I write a ton of CSS and could not find a command line stylesheet checker. I did find the NuHTML checker from W3C, which also checks the file’s CSS: https://github.com/validator/validator/releases/tag/20.6.30 AFAIK it doesn’t have an option to check a standalone CSS file. I wrote a script to insert a CSS file into a dummy one-line HTML file, so that I can pass a CSS file to the script, and when errors are generated f…
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#199There 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…
Re: Ask HN: Small scripts, hacks and automations you're proud of?
#200in 1995, I thought that it would be good if advertisements could be served from hubs to large numbers of web sites. That would mean that advertisers wouldn't have to hire ad space salespeople, which was far too expensive for most sites. But then there was the problem of how to decide which ads to show to which visitors to those sites. To do that, it seemed like it would be a good idea to base that decision on the sit…