Some tiny personal programs I've written
jvns.ca
jvns.ca
We had been looking for a new build for some time and had settled on a development and specific house we wanted to buy, but it was still months away from being released. We were told they released houses in person first, then listed them online later that day, but I was bored and wanted to see when new houses were listed, so I wrote a scraper to alert me whenever a new house became available.
One day, we got a call from the property developer telling us the house we were interested in would be available in person from 10am the next day. Because we wanted to be certain to get it, we appeared at 8am, only to find that 3 other people were already waiting. Houses are released in batches of 2 or 3, so whilst we weren't hopeful, we joined the queue and waited.
At 9am, while waiting in line, I got an alert telling me that the house had been released online, so I open their website on my phone and paid the deposit.
At 10am, when the sales office opened, all hell broke loose as the person first in line (waiting since 5am...) discovered the house they wanted had already been reserved online. I'd effectively stolen his house. It was awkward to say the least as all of us were crammed into a tiny portacabin while this unfolded.
In truth, I felt awful for depriving him of the house he and his family wanted, but relieved that we had reserved the house we wanted after a 5 month wait. A few weeks later the developer got in touch to say that they had changed their policy nationwide and would only be releasing houses online in the future because of "the incident"...
Whilst I wasn't willing to give up our reservation, I worked with the person who had wanted our house so that they were alerted whenever a similar house in the same development became available. He got one, there's no hard feelings, and him and his family are now my next door neighbours.
Our garages actually share a wall.
When I was looking for a new apartment one of my friends told me about his startup that was basically scraping databases of realestate companies and I signed up with them and to my surprise I was alerted for an apartment in the location I wanted and it was up just a few minutes so I was able to contact the agent before they even started their advertisements.
I got the apartment but sadly the startup was bought and shut down operations soon aferwards
The bigger story here is what this means for the divide between tech-literate people and the rest of the population. I don't think the parent commenter was wrong to write their script, and I don't think I was wrong to write mine, and if you wrote something similar I think it was a reasonable move as well. But we have to recognize the advantage this gives us, as people who are able to spot these opportunities and act on them.
I don't have any answers, but I think this story brings up a good discussion. I'm curious to hear other people's thoughts on this.
Where I live the good deals from private sellers (mostly older people) pretty much never get posted online, thus you would have to socially integrate somehow offline in the region you would like to buy a house :). It looks like I still have to wait for some cultural development to benefit from your proposed divide.
COVID vaccination slots were put online and would disappear the second they went up. Vulnerable people, like the elderly, had trouble booking the appointments they needed.
What ended up happening is a few developers got together and put together an alert system that scraped for appointment slots and automated alerts about when they were available publicly on social media. Quite a few people were able to get slots they wouldn't have got by just manually trying to get a slot.
And the people who played fair didn't get those slots. Obviously there's nothing illegal about this (or the articles similar solution) but it rubs me the wrong way morally. Similar to people getting appointments because they knew someone working in a vaccine centre. If there is a clear order and booking system (e.g. oldest + most vulnerable to youngest/national booking system) and you skip the line or 'hack' the system to give yourself a better chance at getting a slot I'd find it hard not to think you're a dick. NB: this depends a lot on how things work in your specific country so I'm not judging your specific situation but just generally, 'hacking' systems to give yourself an unfair chance at getting something in high demand feels wrong to me.
You could probably poke holes in that system I just described, but it seems more fair than one that is prone to someone writing up a script to scoop it up. I don't want to live in a world of script wars where every desirable entity is quickly snatched by one of several competing computer programs.
The problem is that typically the person selling the item doesn’t care who gets it, so there’s literally zero incentive to spend any effort making a fairer distribution system.
Auctions are a great way to see that the item ends up in the hands of the person who “values” it most, where value is measured in currency. It does have the problem that in a system of high inequality the people at the bottom have essentially zero chance of winning.
Stocks should be traded this way, too. Having an arms race for fiber latency makes a mockery of the idea that they are for efficient allocation of capital. Queue up all the trades requested in each second/minute, then execute them in random order.
The person selling the house wants to see offers as soon as possible and can accept one at any time--the sooner the better--or hold out for a better one if they're not satisfied. Any system that changes that dynamic to the seller's detriment is not "more fair" to the seller.
we expect that an auto mechanic gets a good deal getting his own car fixed, that real estate brokers have an edge getting their own properties, doctors with medical care, etc.
You spent years becoming tech savvy to save you a little time scanning real estate ads... I'm not sure what problem you're trying to fix?
Serious major events use a lottery system, which is vastly more fair and means you don't need the server infrastructure to deal with this huge flood of requests. I'm not really sure why everything doesn't work like that: let people submit their requests/applications/whatever, and if you truly have zero other criteria, just process them in random order after a cutoff.
I have to imagine some sort of regulatory thing was going on here, like they have to provide X% of units at Y% of market rate in order to get some tax concession or something.
I know there's not going to be a lot of sympathy for higher housing prices here, but it does feel like something went wrong in this specific case.
Homo economicus would understand that the seller is simply being efficient. Homo sapiens gets all emotional about it.
There's also a goodwill aspect in other cases: Sony kept selling PS5s at MSRP even when scalpers were getting $800+, because better for them that people are pissed at the scalpers than dealing with the bad PR of such a huge price hike over previous generations.
It seems possible that a large housing developer has similar incentives.
Sadly after two weeks they banned my IP for the rest of the year and I was no longer able to make reservations without going through a proxy.
And it's not obvious how to fix it in a way that doesn't screw up the system for someone else:
- exorbitant cancellation fees would punish people whose plans change, and a lot of people would just swallow the extra cost anyway.
- insisting that the entire timeframe be in scope at time of booking would make it hard or impossible to book longer vacations at popular spots (which at this point is basically anything within 4h of Toronto).
- making the whole season available at once would create an ultra high stakes feeding frenzy, with the servers probably ending up crashing.
- some kind of bidding or lottery setup would be extra complexity, and would end up rewarding people with the time, money, and schedule flexibility to "play" whatever the system is.
I suppose the Ontario Parks mandate is to just maximize utilization, so from their point of view it doesn't really matter as long as weekends are booked solid and at least some proportion of the canceled midweek days end up being scooped up later by retirees or whoever.
If it’s a place you frequent, pay close attention. The checker is usually a stronger indicator of line speed than the number of items in peoples’ baskets.
Whole Foods near me does this awful thing where the lines are in the aisles. You can’t even see how long the line is without walking the entire length of the store.
On a personal note I found the practice irritating for not really clear reasons. One might be that it’s a chore to traverse the whole queue cordoning when it happens to be empty. In any case, over time being the one skipping the line when a new register opens averages out. Also, there’s the lucky draw feeling when you get to skip that otherwise gets lost.
I think the main thing that's maybe a bit annoying is just that it's easy for the single line to stall if the people at the front of it aren't paying attention or don't know what to look for. So the store often ends up having to have an extra attendant who just stands there and pokes people for when a till comes available.
Subverting a small aspect of the Hostile Environment[1] took a little bit of the edge of the general bastardry of the whole process. Still a bloody expensive and emotionally draining experience though: if it has to be done again, I won't be putting a loved one though that again and we'll both be leaving.
[1] https://en.wikipedia.org/wiki/Home_Office_hostile_environmen...
When I got such a notification I would quickly check photos of the place etc. and then call the seller. The guy selling the place I ended buying, said it felt like I called him up instantly after he posted it online.
I was calling within 1 minute of post time sometimes.
Being first pretty much gets you anything you want in that section.
However, many students would snag a spot in a course only to drop it as they shuffled courses around. There existed a "queue" for the overflow, but it appeared to work as a CRON job or otherwise involved a human in the loop as one would routinely see:
Spanish 102 (Registered: (29/30), Queued:(60))
While in this state, one could simply click on the course and register, completely bypassing this poorly designed queue. So, naturally, I wrote a script to scrape the site on once a minute (hammering it, and so Project Thor) and alert me once a slot had opened up. Eventually provided this service to my friends as well.
My script constantly looks for open/canceled spots and reserves them (some need email/phone confirmation, which makes it a bit harder). Pretty standard stuff.
That's how I got my appointment in 3 days instead of a month.
So, I'm thinking of making money from this, but I'm not sure about the legality of it all.
Sometimes you can just show up (and wait in a queue) but most often you make an appointment beforehand. In many states/cities, the waiting times are weeks and months long (even in my home city everything's booked a month ahead and you can see the big queues if you go in person).
People can indeed just refresh the page themselves and hope a spot opens up, but that's pretty annoying.
The system was pretty smart, except for the part that you could bid negative amount of points on an elective that wasn't particularly popular and increase your total. That was a pretty major flaw.
[edit: I should say that I didn't use my extra points for anything. I wasn't particularly interested in the popular electives anyway. I did make sure to end the year with 10,001 points, hoping they would fix the bug, but I don't think they did.]
I wrote it in 2012 to automatically buy bitcoin once a week.
We're in Beta so stability is still a goal we're pursuing, but for many happy paths Monitoro is a huge timesaver.
[0]: https://monitoro.co
Somewhat similar story for me. I live in a big European city where young people/students predominantly live in flatshares. One website which pretty much has a monopoly on room ads here also allows room seekers to post an inquiry themselves. So many people do it that after less than half an hour, your ad will already be somewhere at the end of page 2. I wrote a script to automatically update my ad every few minutes to push it back to the top. I ended up getting a lot of responses I probably wouldn't have gotten otherwise.
I found this very unfair. Better would have been to let all the kids list there preferences and then fairly distribute the kids over the activities. However, I could see why the school wouldn't want to bother with this.
I ended up creating a tool (1) for them to do this easily. It's quite ugly, but it's open source (2) and it works. The tool is in dutch because it's a dutch school.
(1) https://eerlijke-indeling.nl/ (2) https://github.com/deliriouspenguin/eerlijke-indeling
I read the operators guide to the device cover-to-cover and found a way to store the program such that the teacher's method of "clearing" the device would not remove my program.
On the day of the test I realized I had accidentally taught myself geometry, as I didn't need the calculator at all and could do the calculations in my head. I did, however, use the TI-83 to verify my answers before handing in the test. According to my teacher I not only had a perfect score but did so in record time, and suspiciously so did my two best friends.
Nothing ever came of it, but I enjoy the fact that I accidentally learned a course to such proficiency by trying to cheat.
https://en.wikipedia.org/wiki/Danny_Dunn_and_the_Homework_Ma...
I asked the teacher if I could use it on the test, and she was like "If you can write a program that doesn't just solve it, but shows the work, then obviously you know the material incredibly well, so there's no need to make the test tedious. Go for it, just don't share the program with any of your friend."
The last bit was easy because I didn't have any friends. :-(
We didn't use it to cheat -- literally just to chat.
Similarly, we'd been writing programs to solve our problems all year so we already knew all the formulas (because we'd been re-entering the programs as needed on fresh calculators).
The teacher knew, which is why I think she allowed it.
The smartass students who don't want to study find ways to cram an incredible amount of information onto these sheets... and through this they end up actually learning much more than if the cheat sheet wasn't an option.
So I went home, fired up basica on my PCjr, and wrote a brute-force solver for it. Turns out there something like tens of thousands of possible solutions.
Then it became a challenge, to filter out duplicates (each solution appears 3 times if you apply it to the board with each 120 degree rotation, plus you have mirrors of these, etc). Was an amazing feeling for a youngster getting into computers.
Edit: Update number of ways to leave 8 pegs, and added number of ways to leave 10 pegs left.
Manually, no programming involved.
When I was a University Professor, I taught Theory of Computing (among other classes). I did not want to maintain two sets of slides (fill-in-the-blank style), and I didn't want the students to have to write non-stop during the lecture, so I wrote a couple of programs to distribute the slides in real time during the lecture.
Part 1: C++. A program ran on my computer. When I pressed a button, it took a screen shot of my chosen monitor and sent it to my server. Communication via websockets.
Part 2: Browser. Students connected to my server at the start of class. As I lectured, the slides appeared in their browser automatically. Of course, they could click through all previous slides (for that day as well as previous lectures), but if they were not actively browsing the slides, then the newest slide presented itself to them automatically. (Technically, it was always one slide behind, because I would not release a slide until I was done talking about it.) Communication via websockets. It worked in lectures attended by 100+ students.
Part 3: NodeJS. My server received screenshots from me (as well as some metadata), kept a small database of all past lectures/screenshots, and served a browsable interface to the students. It routed all the websocket connections so that everything "just worked"TM.
I thought it was cool. The students complained that the slides were not searchable like a PDF. I directed them to the index of the textbook.
> I did not want to maintain two sets of slides
This confusion is causing another confusion as to why you couldn't publish the PDF before the lecture.
In short, the students needed to be able to review the slides during the lecture, so I couldn't wait until the end. My only options were then to distribute slides ahead of time, fill-in-the-blank style, or create a live delivery system. Honestly, the live delivery system was easier and cooler.
The place I wanted to get a puppy from said that they didn't take reservations for the upcoming puppies until they were born. The only way to know when they were born was to check their website and then give them a call.
So the tiny program I wrote kept checking a webpage and whenever it changed content, it would sende a text message "PUPPY ALERT!".
A few hours after I deployed the program, I got message so I thought it had a bug, but no, the puppies had just been born <3
- You are potentially saving a dog's life that would otherwise be put down.
- They are often initially cheaper than buying a dog from a breeder.
People rightly focus on the strong moral argument of the first point and they even emphasize the second to imply that it's a good self-interested choice too. But they advocate so strongly that they often omit the real downsides:
- The long-term cost may be higher. There are breeds that are known for significant health problems, but many breeds don't have them and if you buy a puppy of those breeds, their health is closer to being a known quantity. With a shelter dog, you are rolling the dice. There is maybe an argument that hybrid vigor makes shelter mutts statistically more healthy, but that has to be balanced against the facts that (1) the dog may have ended up in the shelter because of health problems or (2) the dog's life pre-shelter may have caused health problems.
- There may be long-term behavioral problems. Dogs in shelters may have been feral, living on the streets, abused, or relinquished because of behavioral problems. If they were feral and weren't potty trained well as a puppy, you may never train them out of marking. Even if the dog was homed, the kind of people who don't spay and neuter their animals (thus leading to puppies that end up in the shelter) are often the kind of people who don't train them well either. There also seems to be a correlation with shelter dogs coming from dog fighting communities. You see a ton of pitbulls, which are wonderful sweethearts when raised right but are not when they aren't. Even non-pit breeds may have been abused as bait dogs.
I love the dog I got from a breeder, and I love my shelter dog (who is snoring next to me as I write this), but the latter was not the pure win that shelter advocates often make it out to be.
The right way to think of it is sort of like getting a used car: it can save you money and be a morally good choice (in the case of a car, less waste and better for the environment), but it's also an unknown quantity where you need to do more due diligence to know what you're getting into, or accept that you are taking a risk with higher variance.
But, unlike with a car, you're signing up for the dog for life.
So, yes, please consider a shelter first. Any future dogs I get will likely be shelter dogs. But consider it cautiously and take your time finding the dog that is right for you.
If I had to do it again, I'd get an easier breed.
I know this is right - but I feel obliged to point out that this is true with a new puppy too.
Training dogs properly is work, and inconsistent or incomplete training only gets harder and harder to fix. Plenty of dogs in shelters are there because owners could not rectify their own mistakes. Not from malice, or lack of caring. Simple unknowing incompetence.
Don't be too quick to judge those who give dogs up
The important point is that dogs go through developmental milestones just like people and when you get a dog that has already finished its puppyhood, you have lost the opportunity to be present during those milestones and train the dog. Dogs can learn as adults, of course, but correcting bad behaviors is a lot harder. When you get a younger dog (shelter or not), they are more plastic and easier to train.
Yes, of course, it's on you to actually do that training well, but at least you have the chance. When you buy an adult dog, which is what most shelter dogs are, you're kind of stuck with what you get.
* Always have treats in your pocket
* Avoid triggers (dogs) but whenever Lily sees one at a distance, give her a treat
* If she acts aggressively, don't yank the leash or shout, put a treat at her nose and call her name
That's it, in a nutshell. It works for basically any behavioural problem in any dog. (Of course, the breed will have its own personality type - they all do). 6 months later Lily would go nose-to-nose with a rabid chihuahua and remain calm. She was one of the best dogs I've ever had. Still miss the old thing.
She died last year, and we rescued 2 greyhounds (brother/sister). Dorrie is fine but Merlin was, for reasons unknown, afraid of certain types of street light. Which is a massive pain in the ass of you live in a city. We followed the exact same rules, and within a few weeks he was ignoring them. (Still gets spooked at random stuff, like the moon, or light reflected from a kitchen knife onto the ceiling)
Similarly he has problems with other dogs (not with our other podenco, who he loves). He is insecure, stares, starts to go full aggro if they stare back etc. We try to be as careful and consequent as we can. The good thing is he is a very fast learner, not as stubborn.
We give him praise and treats typically after he did well on an encounter (which we keep at fair distance as well). It wouldn't occur to me to give it to him beforehand.
Your method seems simple and I get why it would work, but it's counterintuitive. Can you elaborate? It is something that worked specifically for her for some reason? Or do you think the simple conditioning thing just works. My intuition would be that he has to show the desired behavior and then gets praise/treats. What do you think?
To begin with, practice randomly when there is no trigger. Have a sneaky treat ready and say the dog's name. If it's difficult to begin with (because they don't know their name), try putting the treats into a small plastic container and shaking it, or taking the plastic packaging of their treats. They learn to respond to that noise very quickly. Words are more complex, but if you say their name when you make the noise they'll start responding to that too. Always carry accessible treats.
5 months since we adopted untrained (pretty wild) greyhounds, I can get either of them to sprint to me by calling their name, sit, high-five, lie down... no matter what's going on around them. That response makes it easier to discourage cat-chasing and to reduce their prey drive.
https://en.wikipedia.org/wiki/Desensitization_(psychology)#R...
The idea is that you can't feel opposing emotions simultaneously. So if you can make the dog feel relaxed (by giving a treat beforehand), it interferes with their ability to feel anxiety.
They aren't earning the treat for choosing not the be anxious. The positive emotional feeling from the treat prevents the anxiety from occurring.
It felt like i was applying for a job.
At the next place I tried they basically threw the dog at me.
• You’re Saving A Life
Adopting a dog from a shelter not only means that you’re giving him a happy life, but you also free up a spot at the rescue or shelter to save another dog’s life.
• Helps Fight Puppy Mills
Approximately 90% of puppies you can buy in pet stores or online are from puppy mills. Adopting a dog from a shelter takes business away from mills. The more people who adopt, the more puppy mills have a hard time staying in business.
More reasons: https://www.caninejournal.com/adopt-dont-shop/
What you are saying doesn't apply everywhere, and I doubt it applies in most places around the world, since shelters usually have way too many dogs and would love to be able to find anyone to care for them before they have to effectively execute them.
Everyone has something in their life that is very specific to them that they would be much happier if it were 'just so'. Writing tiny scripts or being able to dive into the config/settings of something is a good way to get rid of some pain points.
We have folders for clients at work and everything older than a couple of years should be archived, aside from certain legal documents. Building a script to check if any file is older than a certain date and checking that it does not contain certain words in the filename, was really easy, and useful, and gave me a good feeling of satisfaction seeing it actually work.
Computer Illiteracy is still very high, even today lots of people can not tell the difference between their computer monitor, and their computer.
I wonder if coding classes will be the new "shop class" . https://www.lexico.com/en/definition/shop_class
In 8th grade, I took a compulsory wood working class. I guess it was a skill that adults thought children should learn.
By that point, I had already been coding for 6 years. My school had a computer lab, but no coding was taught .... just typing. Also we played networked Oregon Trail Deluxe once or twice.
The basic premise was simple: get 10-20 people into a hip restaurant or bar, set up tables, have women pick the tables they sit at, then have the men go from table to table having five-minute conversations. After everything was said and done, everyone would write the names of people they wanted to see again on a form and hand them to me.
I would manually go through each form and send emails to matches after the event was over. I also had a 24-hour soft SLO and a hard 72-hour SLO. This usually took me a whole 2-3 hours to do per event. I also mismatched people several times because humans gonna human.
I was very fluent in PowerShell at the time, so upon realizing that this can be automated with a matrix solver, I wrote a script that took the names of everyone that submitted a form, then, name by name, asked for everyone's matches, and sent everyone their match emails from a template I wrote. It took me about six hours to write and run through manual tests. (I know better now and use TDD for everything!)
My 2-3 hour error prone process went down to five minutes, tops, with no errors. It was beautiful. Towards the end of my stint doing this job, I was able to run this script _as people gave me back their forms_ and have emails queued up to send out once everyone was gone. I spent the remaining 2.95 hours I got back walking to my favorite izakaya and eating their amazing pork belly rice bowl.
Thanks, Julia, for making me miss my twenties for the first time in a while!
(I've written several small utility apps over the ages. It's a shame when I hear people say that they actively don't program outside of work; the ability to write code to bend the world to your will is an amazing superpower!)
It does the following steps:
1. Scan a document with any scanner that supports SANE (ADF supported), 2. straightening and cleaning of scanned documents, 3. run OCR on PDF so that it becomes searchable, 4. generate PDF/A file for archival, 5. add keywords to the PDF file
I've probably saved many hours with this script, even when taking into account the time it took me to write it.
Tiny projects don't always save time, but they sure are gratifying when they work as intended!
Related tangent: I haven't looked into OCR, but for a simple "iPhone camera to 'scanned' PDF", the Dropbox iOS app has a surprisingly good implementation.
OCRmyPDF (https://ocrmypdf.readthedocs.io/) actually does a pretty good job! It also handles deskewing and all other stuff that's necessary for good OCR results.
I was surprised, and have largely made it my ingress for receipts/paperwork.
The eventual goal is to transcode all these masters into nicer OCRed PDFs, but I've been making do with the low quality JPGs just fine. Your script seems like a great starting point to actually get this done!
I went through this pain when I bought a document scanner some years ago - there was no good solution on Linux that would let me from the command line scan, clean, OCR, and output a PDF. I found lots of scripts like yours, but none that was complete. I finally took an existing Perl script and hacked it to my needs.
Features one should have:
1. Output to PDF.
2. Option to OCR (optional)
3. Clean up (e.g. skip blank pages, straighten pages, etc)
4. Allow one to specify quality/dpi
5. Select grayscale vs color
6. Duplex vs single page
7. Dynamically recognize the size of the page.
The last one is the one I'm missing - if I scan something long, it trims it to fit a Letter size page.
I could have worked the same amount of hours for a client and use the money to buy a duplex scanner, but where's the fun in that ?
put the data in python and I calculated the "flip" ratio, average and liquidity of the items.
Now that was all profitable, but around this time there was a phase where everyone discovered that you could do pump and dumps and make obscene profits. They worked exactly how normal pump and dumps work, a select few insiders buy a bunch of the random item and then after a few days they annouce it to the clan and start selling their item. I could see a surge in abnormal buys for items with low liqidity and effectively have a birds eye view of all the pump and dumps before they aree 'Public".
I never had to have a job through high school as i could sell the GP and make around $50-60 a day!
I sold these account lists to botters who would then go on to to their thing. Made a decent amount of money from this too!
Plus i can use any web assembly language? My dreams of a rustacean based empire are about to be realized. Bye Bye productive work for the day.
You can sell an item instantly for X and can buy an item instantly for Y. You determine which items have the highest difference between X and Y. You buy for X and sell for Y.
At the time, I was thinking “Only in Portland…”
https://vedthiru.com/tools/notetaker
Disclaimer: I wrote it.
[1] https://www.etsy.com/listing/1099735271/the-codex-a-zine-abo...
[2] https://i.etsystatic.com/9756188/r/il/09766b/3387078510/il_1...
What kind of shorthand do you use with your script? I honestly find latex's shorthand already short.
These days my notes are all Markdown with inline LaTeX for math. I haven't yet found an editor that support "global" LaTeX macros/shorthand. Things like matrices can be bit of a pain, but then I haven't written any since linear algebra.
It's not just super-flexible in the output but also in the input. It takes one short line in your preamble to define a new command or math operator, redefining long commands you use often - with parameters and/or optional parameters, if you like - to be whatever you want them to be. It sounds like you don't know that. Everything is redefinable, and it's easy enough to also make a short command name for a combination of symbols, or a new symbol, or anything you like. Commands can even draw pictures inline, e.g. with TikZ.
A whole industry has grown up around scraping the website so that kids now are forced to pay sniping companies £20 a time to grab cancellations as they appear on the system if they want an earlier test date.
In my view private companies are camping on a government-run system and extracting their own tax on new drivers.
This is the dark side of clever sniping systems, it starts out as a way for an individual to get ahead but quickly gets industrialized so that those who can't afford to pay for the service are left out in the cold.
fwf -- "Filter With Feedback". It lets you write sed/awk/jq/grep etc things interactively. You type in a UNIX filter, and on every keystroke it renders the result in a column on the right, which you can compare to the original on the left (watch the video demonstration on the link if that description is confusing). I wrote it to make the feedback loop for text-processing as quick as possible. I use it all the time now. It makes the "activation energy" for writing shell pipelines a lot lower, if that makes sense.
Alas I collapsed the whole niche in the end.
Edit: all it did was every 10 minutes scrape some carefully crafted eBay searches with beautiful soup 4, do some custom filtering, remove any duplicate items it had already seen (stored in redis), then send me an email via SES with the links in it where I would make a decision.
The script was almost irrelevant compared to the discovery of the niche.
So I wrote a script to scrape the lottery site archive and check retrospectively the success rate [0]. Well.. the result is what you would have expected.
[0] https://ggerganov.github.io/lottery-check
Bonus - clicking the "Random" button helps you really understand how futile playing the lottery actually is.
A Romanian Economist did this in the 90's: https://thehustle.co/the-man-who-won-the-lottery-14-times/
Currently working about 4 days a week with no commute and pulling in 2-3x as much as I was back when I was an SWE. This is only going up as things get more automated and optimised. I think a lot of young people obsess with the high-status fields (AI, Robotics etc.) but there are plenty of ways to make a good living doing low-status work extremely efficiently (I'm in used video games, for example).
A lot of very labour-intensive work (pricing, writing listings, getting images) is all done by machine now, and I've recently made some semi-automated flows for shipping (think stage 1 of Manna[1], where a script tells you the optimal way to do a manual job). The next thing is to automatically decay the prices with a cron job to get rid of stale listings.
I think the important thing to point out is that we're not a software business! We're a retail business that happens to use software to increase productivity and competitiveness in certain areas. The value doesn't come from the fact that the software is particularly technically impressive, but that it allows us to achieve in 50 man-hours per week what takes others 200.
As a side note, I think the whole "I'm a software engineer, therefore I should focus on making software" way of thinking is an incredibly common trap that leads many people towards creating worthless startups.
Ultimately, good software solves some kind of real-world problem, and your understanding of the problem that you're solving is in many cases more important than your programming skill.
(this gets more true when you pick up devops and have a codebase that contains both, say, the server code and infra)
Days Until - Create a URL to countdown to any date: https://glitch.com/edit/#!/days-until
Flexible Fetcher - scrape/fetch contents of a page based on HTTP query params: https://glitch.com/edit/#!/flexible-fetcher
Scrape HTML <table> return JSON: https://query-page-table-to-json.glitch.me/?url=https%3A%2F%...
USPS Zipcode Lookup + offline JSON - easily add city,state autocomplete from zipcode: https://glitch.com/edit/#!/usps-zipcodes-demo
Create Data URIs - 100% client side: https://glitch.com/edit/#!/data-uri-pwa
Frame Counter - great for testing latency across displays or remote links (e.g. Parsec) using a camera: https://glitch.com/edit/#!/frame-count
NBA Team Standings in JSON: https://glitch.com/edit/#!/nba-standings
Read/render markdown files on your HTTP server: https://glitch.com/edit/#!/markdown-html-remix
Create map links that open in Apple Maps on iOS and Google Maps everywhere else: https://glitch.com/edit/#!/apple-maps-link
Clean your Amazon URLs: https://glitch.com/edit/#!/clean-amazon-url
Now it runs every night and I get notifications if it runs into errors.
I want an easy way for them to watch their favorite channels, without seeing the suggestions from youtube. It often suggests similar content, but not child appropriate. Specifically, Minecraft content.
I think a local cache of videos served to a HTPC client would work well.
ECHO Checking Your Favorite Channel...
cd "\path\goes\between\the\quotes"
.\yt-dlp.exe -U
.\yt-dlp.exe --download-archive ./playlist.txt -iw -o "%%(title)s-%%(release_date)s.%%(ext)s" -o "thumbnail:%%(title)s\%%(title)s.%%(ext)s" -v https://www.youtube.com/channel/UCpil30eNi37bPLwKp4g4kUA
cd \
ECHO Your Favorite Channel updatedI use a script to clean out the playlists occasionally.
youtube.com##ytd-watch-next-secondary-results-renderer
youtube.com##ytd-comments
youtube.com##ytd-two-column-browse-results-rendererI like my idea for a local cache with HTPC client because there are plenty of clients to choose from for Fire TV, and my kids are more comfortable with a 10ft interface.
There is an added benefit. I have one channel I follow that does a LOT of q&a type videos from the audience. Because I download the subtitles as well, I can throw those into a database with the video titles and make a searchable database if I want to see what the host has said about a particular topic. I don't have to rely on my memory or go hunting. I can just query my database and know exactly which video/timestamp has the topic I'm looking for.
Not long ago they nuked old unlisted videos, too.
A few of my examples are:
1. A PyQt GUI for redshift. I use this every day, and have been for a few years.
2. Userstyle for horizontally flipping a video. Sometimes a video or stream is mirrored, for some reason, and it's just nice to be able to fix it.
3. Userstyle for scaling videos that originally had an aspect ratio of 4:3, but have been stretched out into 16:9 back to the original 4:3 aspect ratio. It's surprising how often you come across those.
4. Userscript for improving the functionality of the investment portal of my bank.
5. Bookmarklet for opening all videos on the page in new tabs, but there are some problems with iframes yet.
6. Bookmarklet for setting playback speed of videos on the current page. I use this several times per day.
[1]: https://github.com/Markussss/redshift-gui
[2,3,4]: https://github.com/Markussss/userscripts
[5,6]: https://markussss.github.io/
The whole thing was over in 45 mins, and his mind was blown. He had been doing this manually about once a month for decades ;-)
I have moved on from that job, but have given him an executable on his laptop that will read an excel file of a specific name and print out the PDF the same way. It is his treasure now :-)
I played around with visual studio C# and created an application that would continuously monitor running applications (every X ms), detect when a specified .exe was found, and either (1) constantly kill it, (2) display a message, or (3) run a different .exe.
Never quite got to s1mple's level, but I did play a good amount of CS after that!
Here's a couple of mine:
* During COVID lockdowns, the local grocery chain delivery slots were reserved a week or more in advance, but they were opening up a few slots each day; I wrote a scraper that would detect a newly opened slot and ping me on Slack, saving me a few days' wait on each delivery.
* When I was buying a house, I wrote a scraper that would email me daily with what was new on the market; didn't end up buying through that, but I later repurposed it to check for used car classifieds and snatched a pretty nice deal.
Was watching a movie with a group of friends which someone had ... acquired from the internet, but it didn't have any subtitles. Someone found an SRT file, but the subtitles were offset by quite a bit - enough that you would be seeing dialogue in the subtitles for what had been onscreen 10+ seconds ago, which kind of defeated the point of getting the subtitles. So I wrote a program in a few minutes to specify an offset and rewrite all of the timestamps in the file. We timed the offset, ran the script and got to watch the movie with working subtitles less than 20 minutes later.
It used to be a regular thing for me since I already have subtitles on (ESL spouse). The worst is when you have a time shift and a different frame rate, as it'll slowly get worse over time, but seem ok for the first few minutes.
Recently, Plex's "agents" seem to be good enough at figuring it out and auto-downloading subtitles that it's not often a problem.
It's nice when people share their cool tools free online like this. :-)
Hear hear! I love stories where computers help relieve human misery.
I got into programming because my parents had a business that required them to mail their clients a legally required notice every year. They originally were copying the letter, changing the address and a few other pieces of data, and then printing it out and mailing it.
While I couldn't help with the latter, the former seemed like a great job for a database and mail merge. I set up WordPerfect to mail merge, and got started entering data (one month's clients at a time). Whenever the day to send out the mail came, it was a simple matter to merge in the data, generate a long WordPerfect doc, and print it out. Once the first year went by, it got even quicker. I ended up porting the dataset a couple of times to more advanced databases (eventually PostgreSQL).
The first time they saw how easy it was going to make this onerous task, they were pretty happy.
And I was hooked on software as a way to lessen such tedium.
Edit: Of course now, I'd use a tool like lob to actually send the mail too.
It uses the ironically-named “Let’s Go Digital” training set for the Tesseract OCR program. It works somewhat poorly, but good enough to read my hydronic-heat boiler’s display to let me know that it didn’t fire up in the middle of the night, so that I can get up and clean the flame probe.
` [ ] \ / { }
very easily available is a blessing. The German QWERTZ keyboard has triple occupation on some keys, which is not ergonomic and harder to type fast with.Anyway, both Linux and Windows offer fast switching between installed keyboard layouts/languages using SUPER+SPACE. This is needed in e.g. emails, where I still need Umlauts. It's just much easier to read that way. However, switching back and forth constantly is completely overwhelming and not viable. However, in German, there are perfectly and officially (?) acceptable alternative spellings for our special "Unicode"-characters. They can be typed using plain ASCII, aka a QWERTY keyboard.
So, I wrote a script to read in any text, combined it with AutoHotkey on Windows and now have a tool that, at the touch of a button, replaces selected text using alternative spellings (gruen, Duebel, Faehre) with their correct versions (grün, Dübel, Fähre). The tool could be extended for other languages rather easily. I've been using it for over a year now and recently got to release it properly on the cheese shop:
pip install betterletter
(https://pypi.org/project/betterletter/)Before putting this together, I had looked around for an existing tool. To my surprise (there's always something!), I found nothing. I guess this scratches a too specific itch: using QWERTY but wanting proper spelling quickly, while remaining on QWERTY as to not have a mental breakdown and stay at full typing speed.
After writing, select everything (CTRL+SHIFT+HOME works well), hit shortcut, text will be replaced. This takes about 2 seconds, much faster than switching keyboard layouts back and forth. If this ran as a daemon with the dictionary loaded into RAM already, the script could run almost instantaneously (most of the 2 seconds is IO, reading from disk), in linear time according to the text input size.
Looking through the repo I wondered why you would commit the complete German dictionary weighing in at over 30 MB, whereas you only need a small fraction, the words containing the umlauts (or their false matches). Surely this would be a huge performance boost?
Turns out: a whopping 30% of that dictionary are words containing "ae|oe|ue|ss|ä|ö|ü|ß". Crazy. I would not have guessed that, at all.
Yeah, I had looked into these but for some reason that didn't work. Don't remember why.
> Looking through the repo I wondered why you would commit the complete German dictionary weighing in at over 30 MB, whereas you only need a small fraction, the words containing the umlauts (or their false matches). Surely this would be a huge performance boost?
Yes! It would be performance boost. In fact, I had a "caching" sort of functionality in the tool before. The whole dictionary is shipped (because that makes it much easier and there's almost no risk of wrong-doing just copy-pasting a word list, plus it compresses well enough), but then a list containing only special characters will be generated on first use if it doesn't exist yet.
As you noted, a lot of words do contain special letters, so the "complexity" wasn't worth it to me and I removed that. Could be brought back anytime, but it's fine for now.
Rather than downloading all the audio, I made a playlist scraper for the names. Runs once a day on PythonAnywhwre, collects the names into a database, helps me sleep at night.
It also tells me the history of how the playlist has changed and posts to Slack whenever a song was added/removed from my playlists!
You can schedule "takeouts" from takeout.google.com to run every 2 months for a year - but as far as I can tell they NEVER fire off more than the initial time. Very weird yet so very Google too.
A program like this is not full automation, but it greatly reduces the cognitive overhead of doing this task. Now when I suspect a sensor is bad, I can just pull out the script without having to get back up to speed on how to orchestrate the component programs and interpret the results. It's like having a well-designed jig for a woodworking task, hanging on the wall for later use.
Writing tiny programs like this is really satisfying because the scope is small enough that I can carefully consider all decisions. I spent a lot of time reading through guides and code samples, considering dependencies vs pure bash, understanding shellcheck warnings, and making the code conform to a style guide. All not strictly necessary to achieve the goal, but I learned a lot and take satisfaction in a small, but refined result.
so far I have only tested it with Toyota sensors, so YMMV when used with other sensor types as I'm not sure if the rtl_433 output will be the same.
I also wrote a blog post when I first figured out how to test the sensors with rtl_433, before I wrote the script. probably useful for background information: https://www.r-c-y.net/posts/tpms/
https://github.com/jimlawless/cmdmp3
It doesn't work on all versions of Windows ... it depends on some configuration elements. This has been used in another developer's video game and I believe it's installed with an MP3 player library in node.js ( if you're running node.js under Windows. ) It also plays WAV files on Windows 10 (possibly 11) if you pass the name of a WAV file into the command-line.
I needed a command-line emailer that would send an email via Gmail with a very simple one-line body for my Mac. I also wanted to exercise Go's SMTP libraries while experimenting with trying to build a minimal emailer application.
https://github.com/jimlawless/gsend
I use this regularly. I used to use it on MacOS, but I use it more frequently on Windows.
[0] Native shuffle in my media player didn't feel random enough, with a poor play count distribution. Switching to programmatically shuffling means I can also weight things so that a specific show is more/less likely to show back-to-back.
[1] I actually only consider the smallest continuous run of unwatched episodes, starting from the end of the series, and interleave vs shuffling the episodes.
It also reminds me about that usenet story where in a company their lead developer left, and they discovered some fun scripts to automate excuses for his wife, or turning on the coffee machine through telnet. Can't remember the name.
Partner was happy with the thoughtfulness. Until it was found out there was no thoughtfulness...
The current version wraps exchangelib and, besides just running the straightforward Python code rules, checks whether the email is in a thread and files it away in the folder with the previous emails. (This is the slow part over the web API, with walking folders to find the location of any particular thread the first time it's encountered adding a few seconds to the run. If I find myself caring about the few extra seconds, I'll try one of a few ways it's occurred to me to speed it up.)
While at first I slightly minded having to run the script instead of Outlook silently tucking them away, I found I liked the chance to see what was in my inbox first.
[0]: https://gist.github.com/unforswearing/db73475f333809119ae3dd...
There's upsides and downsides to this. I'm aware it's basically guaranteed to be useless to anyone else because it's depending on software I'd never encourage someone else to run, for instance, and it locks me into certain coding choices.
However, I spend a lot less time doing boilerplate/framework stuff, because I've already got the basics running for other tasks: Stuff for logging, settings, data storage, and remote control and monitoring is already a given.
I love this too. It's always a nice surprise when you realize you won't be needing to write xpath/pyquery/et al. after all... It's like the scraping has already been done for you!
Are there better ways to do this? Undoubtedly. But I sure had a good time making it work.
I couldn't find a command line media player that was simple enough for my liking. So I wrote one for myself that uses gstreamer as the back-end. https://github.com/codabrink/aquinas/ It's hasty code. I plan to improve it in the future by adding features and switching the music library structure from an array to an iterator when I find time.
I also needed a daemon that would watch a folder for new files and upload them to Backblaze B2. https://github.com/codabrink/backblaze-upload/ I use this with Nginx on my vps to proxy requests to the bucket for nice looking vanity urls. (http://i.kota.is/5ruvD.png) The code is really bad; the focus was to build it in under 90 minutes or so, but the important thing is it works, so therefore I'm not going to spend anymore time on this one.
What does your app do that is better?
I use cmus daily but sad that it’s no longer improving.
*(I run a STEM non-profit, so I feel pretty qualified to criticize it this harshly)
It polls an API every 3 seconds, parses the match data and displays the score in HTML/CSS. The tricky part was finding a way to make it easy to add to OBS without a server, luckily OBS has a "browser source" so you can add any HTML page/URL, so the variables needed to select the match/player and are customizations are stored in the URL.
Would love more information about this one
A DDOS attack that relies on a malicious ad or web page directing user agents to poll your expensive API in a loop will no longer work as well, because those user agents will not have the correct security token cookie value, and the attacker is unable to figure out what the correct value is for any given user agent running their malicious code. More sophisticated/expensive attacks are still available, but anything is an improvement.
There are a few ways to skin this cat, so don't refer to the above as a how-to-guide - find a more authoritative voice on best practices than me, please, if you try to implement security like this.
Anyhow, if you want to use an API implementing security like this, you copy the cookies out of your browser and feed them to your program so it can add them to the calls.
Years ago I desperately tried to get an appointment for a marriage at my local registry office but as soon as their website listet possible appointments they were gone. So I wrote a web scraper that blocked an appointment as soon as it was offered, and sent me an sms (via Twilio) notifying me. My script was so eager that within an hour it blocked several appointments. I got a call from that office wondering how often I wanted to get married. So finally I got my appointment. Otherwise it was close to impossible to manually book an appointment.
here is the code if someone is curious about it https://gitlab.com/wolfgang000/saime-bot/
> investigating dice rolling patterns A friend showed me a dice rolling game where you roll a bunch of dice and add up the values. I mentioned that if you roll enough dice and add up all the values, at some point it gets a lot less “random”.
And result turned out "true"? Rolled a die for 2500 times and the sum is all around 8500! I wonder what would be the results for 25/250 times? So, this is sum(expectations).. and for rolling a die, it is 3.5 [(1+2+3+4+5+6)/6 => 21/6], so the answer was 3.5 x 2500 = 8750. Should hold good for all numbers relatively large.
[0] https://en.wikipedia.org/wiki/Central_limit_theorem#Applicat...
I always wondered how monetizable this sort of thing was. I've debated building a marketplace for these things. Let me know if you think this could work!
* A program to monitor a webcam aimed at a bird house to see if any bird occupies it
* A program to periodically send a 10 Hz tone to prevent my speakers from falling asleep, so that I don't miss the first part of a Teams call
* A program to monitor a MiFlora humidity sensor to alert me when my plants need watering
* A program to estimate number of cars and their speed in my street from a webcam
* A program to sync a subtitle with correct timing with a subtitle in the correct language
All hacked together Python scripts; I'm not a programmer
Irritated, one day, I fired up dev tools, opened the Networks tab and copied the relevant API request that was being fired as a bash command, converted it to Python [1]. After that, I merely parsed the JSON, dumped it into a HTML file, and saved it on my hard drive so I wouldn't need to login to the portal again.
e.g. when you hit the `reply` button in HN, it'll make some HTTP request, with a cookie in the header that identifies your user session.
You can right-click on the request and click "copy request as curl", and then paste it into a terminal to duplicate the request locally.
Fore example, Stripe has some API endpoints that are only available to logged-in dashboard.stripe.com users. They are not documented in the public API spec, and they have more powers than the public API. If you do the actions in the dashboard and record the requests, you can use those undocumented APIs: all you need it a session token!
This leads down an unstable path, where you write a browser-emulating script to login to $service, scrape the cookie, and then use the cookie to make requests against the $service's undocumented API. Not a good idea to build companies on this logic, but it's fine and fun for personal projects.
I found the formula for determining sunrise and sunset using latitude and longitude from NOAA's website. This allowed me to generate a sunrise/sunset table for my location by day.
I use VBA to update a clock every 10 seconds (I didn't need it to be more accurate than that) that feeds to a cell, and I use that to know when it is time for First Hour (sunrise), Third Hour (9 am, or 25% of the day), Sixth Hour (50% of the day), and Ninth Hour (75% of the day).
I have it all working and it runs in Excel on my work computer. My goal is to translate the logic into an app on my phone so that I can get notifications when it's time to pray. It's been a fun project, which included a side project of making a 9-LED display in Excel for the clock. I have a clock for normal world time, and a clock for sundial time.
It's been a fun project!
Excel & Emacs: two things starting with E which let anybody program anything.
I collected data for a while, then decided I wanted a different car. Still had fun writing that script though.
'turn [device-name] on'
in the terminal from my computer, and I feel like an super awesome hacker every time. Works great when I am at my computer but don't have my phone around to use the app. I had to use an android emulator to get the local network keys to make tinytuya work.
I'm currently in the process of changing careers from computer science to healthcare, but I'm glad my software development career has given me the tools, skills and knowledge to solve little problems like these.
>$ tm 8:30-12:30 12:40-
Time to leave: 16:40
so as to hit 8.0 hours for the day.
and
>$ tm 8.5 9.27 8.83 8.87 9:45-1:23 1:33-
14:11
54 minutes
is an example of when to leave (early!) on Friday to hit 40.0
Note how you don't have to tell it AM/PM or use 24 hour time. Nor give it any special flags to tell it which calculation to run. And it just handles the rollover at noon for you.
source: https://github.com/cynoclast/time (Java, because that's what I used at the time)
- My smaller blog is a (poorly) written CMS that makes a static site. Almost zero reason other than I wanted the experience of building my own CMS, could easily use another tool.
- I have a 'Pick'em' with friends for MLS soccer. It's a fully coded website, definitely my biggest ongoing project.
- I have a tool which looks at upcoming soccer games around the world and recommends the best ones to watch (looking at a number of variables such as relative ranking in the league, historic goals for and against, gambling odds, etc.)
- I have a weight and body fat tracker I use to enter my daily weigh in and see graphs and charts of my progress.
It became a tool that opens multiple links all at once. Once I had the basic foundation, I created a daily ProductHunt link, which opens all the links at once. You can subscribe to daily product hunt links here.
https://www.rockmelon.app/rc/Cg08Y06Vu9#/
Now my fingers are happy. Hopefully yours too.
You can create your own mega link with API as well.
A simple html js collects my time and date, and come fields, and ajax it to Apps Script running as web app.
Script logs it into a sheet, recent rows on top.
The html page has a link to get the timesheet. On click, it again asks the apps script to send back this month's time sheet data as json, shows it as a table.
Although no chance, but still all of these ajax expect a password.
====
Recently I got into telegram bot, a multi bot. It has a /help command. Help describe the expected command keywords. Backend is again Google apps script. A string split, an switch case.
Later on when I took a statistics class and learned about CLT and normal distributions it really helped to have this intuitive understanding of how multiple uniformly distributed variables combined result in a normal distribution. (and probably why the bell curve distribution shape is so common for real world data)
It worked really great, and we never ended up buying a property, but I couldn't help thinking this is a premium feature that Zillow could easily offer and charge for. If anybody at Zillow is interested, feel free to reach out.
I create this simple project to fulfill this need. It was just a weekend project that it's already valuable for me.
There's a way to put people in groups where they shouldn't buy presents for each other, which is useful for couples of families, where they will probably be buying presents for each other anyway.
- A little mac app that reads my calendar, grabs the next 2-4 events and sends them over to my Vestaboard.
- Setting up Cloudflare as a failover load balancer to reach my home network (I have two ISPs for redundancy), this involved writing a small script to get the WAN IPs out of my Omada router and using that as a custom command in ddclient to update the DNS entries for both uplinks.
In our country we got vouchers to take a holiday because of Covid, but I couldn't use Booking.com because not all landlords had the proper paperwork to be able to redeem the voucher.
I wrote a script to e-mail all the properly registered landlords from a government list in a particular region with my requirements and then manually selected the best offer. I had a really good time.
Always used append to file, but this is easier to debug/iterate. Thanks for the trick.
This seems like the central theme, and I can totally relate
But at the same time, I also feel like literally nobody is looking out for you personally in the pandemic. I got the impression that pharmacies flat out lied to the government about vaccine availability (city websites would be like "oh yeah your CVS has tons of extra capacity" but then they have no appointments, and when you do get an appointment and show up, they turn you away). In that case, you have no choice but to DoS them to meet your basic medical needs. (Insert rant about how I was first able to buy N95 masks and at-home COVID tests in January 2022, 2 years after the first case. Now I have them for next time, I guess.)
I wrote one to help me register for a college class that was full. I faced the same ethical question, but I decided that it was OK because it was a computer science class.
Missing close paren here btw
I imagine the hacked together COVID vaccination websites were already under quite a high load. If it's anything like unoptimized WordPress websites it's doing a database query each time and I really hope the API wasn't being shared by healthcare providers. The saving grace appears to be that the script isn't shared.
I guess this is a reminder to be careful when sharing scripts that rely on other's services (especially important services). Cache when possible, poll minimally, etc. Recently I found out that Ubuntu doesn't cache DNS queries by default, which I discovered when I got temporarily blocked from a DNS server. Good job I didn't share that script!
Yea, thank you modern front end developers. This is my favorite start for scraping as well.
https://github.com/svilendobrev/svd_bin (terminal + sh setup , version-control, lots of commands for this or that)
https://github.com/svilendobrev/svd_util (python stuff)
https://nivethan.dev/projects.html
I really liked writing a http server in bash because I started just to see if I could. I also really like my project to get the top reddit stories from each country.
* I have mostly automated my mailing list: I save the links in Raindrop, save to Notion, write a bit of text, and send through Buttondown. It’s still work in progress, but it works nicely.
* To fronting vaccine booking for my parents, I wrote a script that check if the vaccine was open for their age group.
* When I moved to my new house, there was some technical problems to activate my ADSL (the telecom company need to dig into the street and it was planned, but not scheduled). Then I wrote a scraper that every 2 hours check on the website if my address was available for a new ADSL line.
* My wife is working on property management. For law enforcement, at the end of the month, they need to send details about guests to police. It’s a tedious activity to make by hand because you need to fill up a form for every guest. So, my wife has prepared a form in Airtable that the guests must fill up with all the information needed; then I wrote a Lambda function that at the end of the month, get the data from Airtable, generate a file in the format for bulk upload and send it to my wife via email. I saved her hours.
There's precedent in the US for going to jail for doing this
Edit: I guess I need to clarify I’m not asserting anything was right or wrong.
When vaccinations opened up for the elderly, I wrote a script to check open slots and get my grandparents a vaccine appointment.
They patched it up, but similar to the author, I managed to get them one soon after through their website. I’m wondering if we’re even talking about the same website.
Wild days.
I still think it could be monetized but I don't feel like doing it. I heard a friend that there is a lot of people doing this manually and they charge you a considerable rate.
But advantages aren't always that obvious. In my case, it was just "don't reload the page while waiting for the server to respond" as the servers were DDOSed on the first day they opened the appointments. Obvious to many programmers, not so obvious to the general public that you might lose your position in the queue if you reload the page and not wait for a proper error page before reloading.
Another advantage was getting my PS5. I wrote a simple web scraper that just looked if the shops had any PS5 in stock and wrote that into a static RSS I uploaded to my webserver and stuck this into my regular RSS reader.
Over the last year, this way I could provide myself and 3 friends/acquaintances the opportunity to get a PS5.
Other people can build tables and shelves. I'm a programmer.
This actually happens quite often. As another example, there is a particular country visa centre which requires you to make an appointment and is typically fully booked for weeks on end. The calendar info is loaded in through an API call and the selected date then form POSTed with a hidden field's value set to an identifier representing the date and time. Not in plaintext, but easy enough so that it can be guessed. Once you spoof the value, no further server-side validation happens and no one at the centre will check it.
I wanted to book a restaurant a couple of weeks ago. As I was discussing options with a friend, the booking provider already forced a refresh and our desired time slot was gone. Again, taking a look in the Network tab of the browser and spoofing a value led to a confirmation at the desired time. I expected a call saying that they were overbooked, though strangely enough the place was not packed (I guess they kept some tables open for social distancing / walk-ins / phone reservations).
This is really security 101 on the same level as SQL injection. Strange how every dev seems to know how to hook up something to an API but still makes the same mistakes.
When I didn't have a problem of my own to solve I'd hang out on the Unity3D forums and write little time waster demos of questions that people had such as "how do I make a snowboard game?" or "how do I make a fishing line and have it sag in the middle?"
I wrote a space invaders game for my online resume.
I've made a number of interactive touch screen and motion controlled robots and laser pointers on robot arms as cat toys over the years. Made one that streamed video and let people control the laser pointer via a web browser.
I've made a litter box cleaner robot that outsourced each cleaning to Amazon's Mechanical Turk. Robot arm controlled via web browser, video feed, Mechanical Turk assigns a "cleaning job" to a worker (human).
I wrote a script that would take all the video from a bunch of cameras and process them, down rez the video, and properly label it for a bunch of tutorial videos I created.
A voice controlled "artificial intelligence" assistant producer to help me record tutorial videos "Hey producer, roll VT, and give me a close-up on camera 1."
I lost a bitcoin wallet address - it wasn't a lot, a few dozen at most. I knew which computer the wallet was originally on, and I snapshot a picture of my desktop every few seconds and store the images on a file server. So I wrote a script that would take all the images and batch process a text recognizer on Linux to look for when the wallet was open. Et voila, my seed phrase.
I wrote a script that monitors our street facing front door via video camera for packages and sends an alert if a package is detected on the front porch.
A PowerShell script to move Chia plots from the plotter to the farmer.
A MACH driver for my weird little NextWave Piranha desktop CNC. A script that will generate the g-code to cut dove tails on my CNC for me, but also the Ruby code to generate the dove tail view in SketchUp too before I perform the cut.
When doing some extensive travelling for work back in 2013/2014/2015 I created a small Android app that would count down the amount of time until my wife and I got to see each other again and show where we each were on a google map.
I run Timesnapper on my Windows machines to capture images of my active desktop usage, so I created a similar, though much simpler application for Linux and macOS to do the same thing.
A script to emulate a macOS Fusion drive, marrying a RAM drive and an SSD for super fast builds AKA fast tiering.
And a bcache kernel driver for ESXi that would put a RAM drive in front of the SSD array for VMs that were doing builds or lots of drive activity AKA fast tiering.
Back in 2016 I figured out a script for Linux that would spoof the OS identity so that Linux machines could connect to the corporate VPN, masquerading as an iPhone.
An NDI plugin for Unity3D.
And a bunch of bots to play or multibox various online MMORPGs and hack-n-slash games. Which lead to paying work with a couple of companies who wanted me to figure out ways to stop that sort of thing.
And a computer vision game playing bot for a few online games that I didn't want to grind on.
A parallel 3D printer partioning system to farm out jobs to 3D printers at our local makerspace.
An out-of-the-box VPN proxy running on OpenWRT so that any device connected to the OpenWRT router was automatically on the VPN.
A C# wrapper around the FFMPEG library.
A SenseCam application and associated hardware.
A chrome & firefox plugin (no longer maintained) for a People You May Know sorter for Linkedin.
I created a voice activated application that can open and close the garage door for me "open the pod bay doors hal" and also switch the dust extractor on and off when I am working, though I have since replaced the dust extractor power function with a dedicated device that detects power tool usage.
I created an application that will copy USB sticks en masse for my wife's technical conferences, and also update a USB stick with any appropriate updates such as new slides or presented papers as speakers submit them.
I wrote a script that would go through each of the conference papers and put the IEEE copyright footer on them before submission.
My mother-in-law was a research librarian and she and a few colleagues needed to run a study, and they had applied for a $10K or $20K grant to conduct the study to determine which journals a group of universities should continue to subscribe too. Grant application denied. $10K-$20K of research to save a few hundred thousand. I wrote a script in a couple of hours, and got paid a large gourmet pizza, that gathered all the results needed and dumped them into a spreadsheet, and so a group of universities saved a bunch of money on journals they didn't need.
I wrote a script that captures video of multiple in-office cameras that captures my activity in my office throughout the day, and wired it up to a button that lets me pause the recording, or erase the last 30 seconds, five minutes or hour. It is hooked up to an "on air" light so my wife is reminded not to walk in my office partially dressed when the camera is active. It gathers all the video feeds, and the depth sensor data and dumps it on a server.
I wrote a little in home dashboard that tracks our wallets, our phones, our cats, weather for the week, upcoming meal plan, appointments, and so forth.
A "Waterfull ring toss" game with a big button, just like you remember from your child hood, made from a 55" Samsung TV I found on the side of the road.
A bunch of time zone synchronized wall clocks in our upstairs hallway, with VFD displays showing location weather, financial headline to give you something to talk about with your client in that time zone, exchange rate, and so forth.
A neural network to pick horses in a race, that eventually turned in to a small side business.
I'm currently tinkering with a gesture controlled viewer dependent holographic display made from those spinny LCD fans with HDMI input you can buy through Aliexpress.
And dozens more over the years. I don't think I'll ever stop working on random ideas like this.