363 comments

[ 2.4 ms ] story [ 289 ms ] thread
Tiny projects like these are fun and rewarding. I just wish I were as good as Julia at keeping track of them. After reading this, I think I'll start keeping track of them in one place :)
That Covid vaccine project gives me chills. That’s not saying it’s wrong to use an advantage like coding skill or anything else to increase your odds of surviving a pandemic— but it’s a new world we live in for sure.

Edit: I guess I need to clarify I’m not asserting anything was right or wrong.

I did the same.

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.

“This didn’t turn out to be necessary (more appointments opened up pretty soon anyway), but it was fun.”
Have done the same but using a scrapper, not for COVID, but for an impossible to schedule appointment I had to do in a government website.

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.

It's always been this way.

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.

We had a similar governmentally organized system in our country during the first vaccination round where people could book an appointment. The website fell over and the devs introduced a queuing system and had you waiting in line. Except that it was badly implemented and only enforced client-side (through JavaScript) and hence very easy to circumpass. It also had a similar API which could be polled to see when a slot freed up.

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.

I can relate to the document scanning issue. In my case, I digitize all documents I get on paper. For this, I've written this wrapper around scanimage and ocrmypdf: https://github.com/dbrgn/pydigitize

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!

Cool project!

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.

I prefer not to upload all my potentially private documents into a cloud service :)

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.

Well yeah, that's legit. My point was that for those of us who already choose to rely on Dropbox, it's a great little feature to be aware of.
I use the "Files" application from Apple, and it works pretty well too.

I was surprised, and have largely made it my ingress for receipts/paperwork.

I wrote a keypress-driven graphical utility that's basically a wrapper around scanadf, that allows me to call scanadf repeatedly, preview, delete pages, etc. For instance if a page misfeeds, I pull the remaining stack out, delete the bad scan, and restart from where it went wrong. When finished, the graphical window disappears, and it writes all the current pages out as an archive - the masters are checksummed, compressed with FLIF, converted to some low quality JPGs, and the whole thing is stuck in a ZIP archive with extension .cbz (viewable with evince).

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!

her script reminded me that i never did get my scansnap working properly under linux :( will have to give it another go sometime.
I'll try your version out.

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.

Funny, I also wrote some code to solve one of my printer problems. It doesn't do double-sided scanning so the script waits for two recently PDFs in a folder (while trying to be smart about not picking incompatible PDFs) and merge them in the right way: https://github.com/RomainGehrig/PDFCollate

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 ?

What a nice read. Motivates me to make a list of these small apps I have all over the place; Raspberry Pis, DO servers, Netlify, etc.

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.

A friend wrote a script for his phone so that when he got to work (GPS location) it messaged his partner a "sweet nothing" text.

Partner was happy with the thoughtfulness. Until it was found out there was no thoughtfulness...

Nice article! Here are a couple of my recent personal projects..

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.

For a command like media player, did you try cmus?
Yeah, I didn't like it. :)
What didn’t you like?

What does your app do that is better?

I use cmus daily but sad that it’s no longer improving.

Interesting to read the "dice rolling" part.

> 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.

Julia writes so nicely, something about the way she talks about projects and things is so earnest. I have a brag document because of her and it’s helped quite a bit. I have my own list of toy projects and I think it’s good to track them especially to find code examples later!

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.

It's fun to build simple stuff that work, but it's even more rewarding to build stuff you actually use every day. I made a simple expense tracker that will parse the SMS messages I get from the bank when paying for stuff, categorise based on merchant categories and push it to a google spreadsheet for traceability and visual charts. Good opportunity to play with building native images (it's done in java) in order to minimise resource usage as it's deployed in a 5$ digital ocean droplet. 10 years ago I've built a Swing app to generate invoices in a local compliant format. It was great to flexibility to customise everything.
I did the same thing. I use a twilio number that calls a GCP cloud function. Super handy utility, and I haven't had to pay a dime for it.
Yes! Tiny programs! And from one of my favorite zine makers and big inspirations for switching careers / getting a programming job. I need to make more of these at work. API team too busy to build an endpoint my team needs literally every day? No shame in making a mini webscraper and never wasting another minute asking them :^)
Can anyone elaborate on "secret undocumented APIs where you need to copy your cookies out of the browser to get access to them"? That sounds fascinating
So as a part of my daily activities, I have to use a portal that has an absolutely terrible interface, with text reflowing on every click, parsing and loading a 1 MB JSON file from an internal API taking about 5 minutes (of course, its a janky SPA with developers filling it with useless JS).

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.

[1]: https://curlconverter.com/

If you look at the `network` tab in developer tools, you'll see every http request made by your browser, and the headers that are sent along with the request.

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 wrote a tiny program to help me buy a puppy :)

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

To those thinking about getting a dog: please consider a shelter first.
This is very good advice, but I wish it wasn't presented without qualifiers. There are good reasons to get a shelter dog:

- 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.

Wall of text on point. I got a shelter dog 5~ years ago and it is a relatively difficult breed. I knew nothing about dogs. But I love it and take care of it (because I take ownership of my decisions, particularly where they involve the life of another creature), and it's gotten better over time. I also exercise caution where necessary.

If I had to do it again, I'd get an easier breed.

> There may be long-term behavioral problems..

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

Right, but when you don't know the dog's breed (i.e. it's 17 types of cross-breeds) nor its history (if it's gonna have PTSD from being abused or fighting for its life in the streets), it's a much safer bet to get a purebred or simple/common cross of 2 breeds where you can Google the general behaviours of those types of dogs, and you know its entire history of life up to that point: being born, then laying around with its siblings and mom
You really want a common cross that has been breed from that same cross for generations. Otherwise what you get is an unpredictable grab bag of behaviors from the original breeds.
I'm not saying this to judge the dogs' original owners. In many cases, the dog was feral and there is no original owner.

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.

I've rescued several greyhounds from the racing industry. One time, after our old greyhound "Pasha" died, we decided to take on a challenge: a greyhound who was rehomed several times, and even abandoned by a shelter (run by a bleeding heart who had no idea how to handle dogs). Lily was a crazy black greyhound who hated all dogs and was afraid of most people. Her name wasn't Lily - she was 6 years old and didn't have a name that she responded to. For the next 2 months we basically had these rules:

* 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)

We have a new dog since a month (podenco mix) that had about 5 previous owners and is 4-5 years old. Lovely but very rough edges. Even a few scars on his nose and head so our guess is that he was at least in one tough fight.

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?

Not the person you asked but I’d guess it has to do with managing the emotions or anxiety that lead to the bad behavior. The way I think of it is I don’t want to teach the dog to overcome negative emotions, I want to help them not have negative emotions in the first place. If possible.
This, exactly. I think that the idea is to teach to dog how to interrupt the negative emotion with something positive. It gets to the point where they interrupt it themselves without your intervention. With Lily, it got to the point where she'd see a small dog or a cat, and she'd look straight up at me (good girl!)

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.

I think you're approaching it from an operant conditioning model where the treat must come after as a consequence of good behavior. But what they describe sounds like reciprocal inhibition:

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.

With Lily we didn't take the risk of bad behaviour during an encounter. We would just ply her with treats and tell her she was a good girl as we walked by a small yappy dog. I think she started associating those encounters with positive emotions.
Thank you! I'm not very experienced with dogs (my partner is) and I'm still too much in my head instead of with the dog. I think I might be trying a bit too hard (or rather too often) to train him instead of just managing situations in a nice way if that makes sense.
Anyone getting a shelter dog should pay for a dog behaviorist to either help them select a dog or evaluate the dog they have selected. They should also have a trainer lined up to help them teach the dog how to live with them. This goes 20x for first time dog owners.
I was ineligible to adopt a Daschund from a shelter because my property doesn't have 1 acre of fenced in yard. Other places required 2 veterinarian references (we had 1 reference due to owning a cat). It can be a lot harder than people think to adopt a dog from a shelter
One acre of fenced yard for a dachshund? I’ve seen onerous dog ownership requirements before but never that much land for that small of a canine.
To adopt my cat during covid i had to do a Facetime interview with the shelter and show them around my place.

It felt like i was applying for a job.

I was recently having a conversation with a married couple I had just met through a mutual friend. They were detailing their recent difficulties trying to get a dog. They were looking at both shelters and breeders, and both had their own difficulties, costs, red tape, waiting periods, etc. The woman was also pregnant with their first child. I asked, and the irony was not lost on them.
This really varies. I got this kind of treatment from a group of ladies fostering Shi Tzus. I think they really just wanted an excuse to keep those dogs or give them to new potential old-lady friends.

At the next place I tried they basically threw the dog at me.

If you're set on a particular breed also consider a rescue that specializes in that breed if there is one.
This is most excellent advice, and certainly did not state “you should not get a puppy from a reputable breeder”, which seems to be what a lot of the replies to it assume it said.
Such a cute story :)
I did something similar not long ago.. lol
For anybody considering getting a dog - please consider adopting rather than buying.

• 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/

Except every dog adoption place around here has requirements like "Must be an experienced dog owner, have a 5 acre yard, own your home, and be able to do 50 push-ups without getting out of breath. Expert sword-swallowers preferred."
Ok, so the above recommendation doesn't work for you, just ignore it then.

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.

I got my current dog from simply showing and saying "I want that one" and then signing a paper saying I won't abuse him.
I have long ago learned that most care about environment as long as it doesn't impact their life and what they like.

Makes people feel uneasy.

I mean... should people not be able to like things?
Have you considered the environmental impact of using this site? It’s certainly not free.
that's what I'm thinking if you want to suck all the joy out of life just move to the woods and live off the land, have the least environment impact possible
Spend 50k on a Tesla and you get to enhance you lifestyle, signal your eco-solidarity and to some extent, affluence. Bang for buck, if you really care about the environment, don't have children. There is nothing that comes close to impact.
As I've said elsewhere, I do not drive, fly, eat meat or have kids. My laptop is a 8 years, my phone is a repairable FP3 which has had several parts replaced over the last 3 years. And yes, I rescued two greyhounds from a cruel fate, and I feed them kibble (reconstituted / recovered meat). I have zero problem with the latter, and still call myself am environmentalist.
> The idea that we grow food to feed cattle or fish to feed pets is among the biggest environmental stupidity I can think of.

The meats that dogs and cats eat are essentially the waste products from meat production aimed at human consumption. You can certainly find some exceptions (especially on Instragram), but the vast, vast majority of people, even those feeding raw diets to their pets, use either meat not meant for human consumption or offal that most Americans don't consume.

Also, if you care about the environment, don't have children. And, really, best to off yourself as well. Might want to take down a few less enlightened folks with you when you go.
What an odd response. Did the prior post upset you in some way? Not having dogs and children are both reasonable and moral responses to the climate crisis. Suicide and murder are not.
Why are they not ? This is more of an ethical dilemma. I agree with @ munificient. I could probably list a lot of things that do a lot of bad for the environment.

But making everything hyper-efficient and reducing on EVERYTHING we almost possibly do just takes away our basic freedoms. I'm not saying you're wrong about not having dogs. I have one myself but yeah, you're right. It's like having a child. But I like being able to choose having it or not.

> Did the prior post upset you in some way?

There is a perspective I see sometimes where some people have elevated environmentalism so high in their value system relative to all else that they end up in a moral position where consuming any resources at all which all living things do is somehow morally unconscionable.

My comment sounds like a joke, but it's not far off: https://en.wikipedia.org/wiki/Voluntary_Human_Extinction_Mov...

Reasonable environmentalists think humans have as much right to exist and seek joy as any other living being as long as it's done in a sustainable way. We just want people to, you know, maybe walk to work instead of driving sometimes. Don't litter. Push your government to pass laws against pollution.

There are lobbyists and well-funded organizations pushing against any progress on the environment and the existence of extreme views like "you're a horrible person if you —checks notes—have a fucking dog" makes it too easy for those groups to paint all environmentalists as out of touch kooks. That's the last thing we need.

The parent comment described pet ownership as "is among the biggest environmental stupidity I can think of". Call me crazy, but a couple of meaty snacks for Fido is pretty far down the list after, I don't know, carbon emissions, greenhouse gases, coral bleaching, acid rain, deforestation, fuel oil, fracking, chemical dumping, nuclear weapons, water table draining, etc.

> Reasonable environmentalists think humans have as much right to exist

There is a right to exist, but not a right to be created. Saying someone should kill themselves and kill some other along the way, is just not acceptable in a normal discussion.

> Call me crazy, but a couple of meaty snacks for Fido is pretty far down the list after

Those meaty snacks make 20% of worldwide meat-consumption. As a country, pets would be the 60th biggest CO2-emitter in the world. Just because there are bigger culprits, doesn't mean that the smaller ones are excused. Moving pets to more friendly foods would have a huge impact on the world.

> There is a right to exist, but not a right to be created.

But the top-level post is advocating adopting shelter animals and the reply was that keeping pets is bad for the environment. Those shelter animals already exist and if they aren't adopted, they will likely be killed. It's the same thing modulo different species.

> The idea that we grow food to feed cattle or fish to feed pets is among the biggest environmental stupidity I can think of.

That is the wildest exaggeration I can think of.

I’m also vegetarian, though I am because I’d rather not kill things when I don’t need to. The environmental benefit is an appreciable side effect, and confirms to me I’ve made the right choice for myself. I like to try to share my views with as many people as I can, but I think expecting everyone to ‘just get it’ is setting yourself up for failure, and ultimately unhelpful in the long run.

The choice is: "Not rescuing a dog from the pound" vs what? ..."leaving them there to wait a few more weeks/months in a cage before being put to sleep"?

Nah. Have you ever bonded with a dog? Nah. I'll take dogs over people any day.

I'm all for closing puppy mills/farms, neutering etc but I draw the line at "don't rescue a dog that already exists"

Even premium dog kibble is made out of the lowest quality junk meat left over from what people eat. I too am a vegetarian (and I don't have kids, and have never owned a car and gave up flying years ago). But I do not begrudge my two hounds their bag of kibble. I'm fact I'd be willing to bet that my household CO² footprint is lower than yours, even with my two greyhounds.

If you're adopting a rescue animal, there is no environmental argument. My dog was bred for racing, a cruel and violent industry that throws the dogs away like garbage when they are no longer used. I don't think there's any ethical argument to be made against adopting a dog like that.

If people giving their cats cat food is enough to make you question your commitment to vegetarianism, maybe you're not really that committed? You should do things for yourself, and base their value on the decisions of others

(comment deleted)
I had a 200 line python script running on a junker PC that pulled a not insignificant amount of cash in. It was an arbitrage system that looked for poorly listed items in a couple of eBay niches. I'd literally buy the items it identified and then list them properly and reship. Average margin was 60%. On one occasion I managed to nab something for £15 and resell for £675 with a 4 day turnaround.

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.

Can you tell what the niche was? Collectible items or not?
Not collectible. Specialist portable industrial equipment is all I'm saying :)

The script was almost irrelevant compared to the discovery of the niche.

> When the second COVID vaccine doses opened up, all of the slots were full. It turned out that the website’s backend had an API, so I wrote a script to poll the API every 60 seconds or so and watch for cancellations and notify me so that I could get an earlier appointment.

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!

I run a badly written monolith (my home automation system), and tend to make tiny personal programs some weird offshoot growth of it.

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.

These resonate a lot! Tiny projects are very rewarding, because you get something that works pretty quickly, this works well with my short attention span. Couple of ones I did in the last two weeks:

- 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.

A lot of the music I like is on YouTube, including many obscure remixes and covers. Now, I'm not a fan of forgetting things and YouTube can be pretty volatile, with videos getting removed.

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.

I've build the same thing for the same reason! Except in Ruby on Rails =)

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!

This sounds useful.

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.

If any of you know don't know what LaTeX is, it's a way to write documents, it's usually used to write Math and Science research paper's because the of the formatting and symbols LaTex allows for. It has a lot of flexibility, but everything in LaTex requires a lot more effort to type then in something like MS Word. I have to use it for a class I'm currently taking where you have to do super long proofs, I created a short 50 line script where I can enter a mathematical expression using plain text and shorthand's for special symbols and the function returns a string I can copy and paste into LaTex. Saved me and my groupmates multiple hours, I also posted on my class forum so I can save my classmates the pain as well.
I don't think there are any engineers (people who have gone to engineering school) that haven't used LaTeX. [Editing based on replies]: Apparently I am wrong. Maybe it's just at the grad school level that one can expect to use LaTeX frequently; I made the assumption because I took a Master's.
You're very optimistic. I doubt anywhere near the majority of engineers have used LaTeX directly. I've seen a lot more (of all ages) who used Word for their technical writing. If they used LaTeX or TeX it was a one-off, not something they became skilled with.
Checking in as a BSEE: never used LaTeX.
It’s more common in CS than engineering in my experience, when CS is part of the math department.
If you put it on GitHub, or anyone linked me to a similar tool, I'd be interested. Thanks.
This is not exactly the same thing, as it just renders the output, but the following uses markdown and asciimath for quick math notetaking.

https://vedthiru.com/tools/notetaker

Disclaimer: I wrote it.

This is pretty cool, similar note taking service called Obsidian I use to take notes in Markdown
I have to disagree with you about LaTex being slower than word for equations. In fact, one of the big reasons I started using it was faster equation typing. And when word2003 was upgraded to 2007 or whatever came next, they actually changed the equation editor to allow latex style entry so you didnt have to click through the menus to get symbols.

What kind of shorthand do you use with your script? I honestly find latex's shorthand already short.

The course I'm currently taking makes me uses symbols like the biconditional, xor, and quantifiers. Each symbol requires an entire word to type out but I also frequency have to look at a reference sheet to find the command for each symbol. I just use short hands like "-" for not, "and" for $\land$, etc. I'm sure if I used LaTex more often, I would have most of the commands memorized but I use it infrequency so I almost never remember.
I'm pretty sure you can create macros in LaTeX, not sure If this would solve your problem.
Back in high school I used OneNote and had a pretty good MS equation editor setup. Most things can be done in a similar way to LaTeX, e.g. writing \theta for greek letters, writing a slash for fractions. With a few "replace with" "macros" I could write quite fast, probably faster than I can in LaTeX these days after about the same amount of practice, and almost never had to use the GUI.

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.

I wonder if you could make a few minor tweaks so it's a latex plugin and you can skip the copy and paste process.
Might be worth looking into Lyx also. It's a sort of WYSIWYG for latex.
Here, have an upvote for sharing it with your classmates.
> It has a lot of flexibility, but everything in LaTex requires a lot more effort to type then in something like MS Word.

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.

One fun one is I was playing a game with friends and it felt super random to me. So I wrote a simulator and some simple strategies to see how effective these strategies were vs randomness. If the game is mostly strategy you would expect to see clear difference in all of the strategies. If the game is mostly random the good strategies would have a hard time differentiating them from each other consistently.

https://gitlab.com/kevincox/red7-sim

I did something similar to the vaccine appointment bot but to get my passport appointment, I'm Venezuelan, and let me tell you getting a passport is almost impossible due to all the corruption and mismanagement, so years ago the webpage to schedule the passport appointment was down for 99.9% of the times, I am not joking the page was only functional for a 10~15 minutes per week at random intervals of the day, there were facebooks groups of people doing watch reloading the page every few minutes ALL DAY LONG to catch it when it was working and then inform the rest when it was up, It was insane I decided to do a simple(not really tho) bot that did the polling and fill my data to the form, I was very happy to result and event more because I didn't have to bribe anyone(This is the "normal" method to get the passport and the sky is the limit of how much are they going to charge you)

here is the code if someone is curious about it https://gitlab.com/wolfgang000/saime-bot/

I love to put simple web apps like this on Glitch.com.

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

I love Glitch, I wrote a number of Twitter bots. But then they changed some things in the free tier (understandably), so I moved my bots to a local server that runs Docker, with each container running a bot, and I'm really happy it's chugging along.
I'm dying for Glitch to get native Deno support.
My dream in life, seriously, is to get waaaay more people doing this sort of thing than they do now. If STEM is worth anything, it would be worth things like this*

*(I run a STEM non-profit, so I feel pretty qualified to criticize it this harshly)

I write tiny programs with pyautogui to automate parts of my job. It’s like having an assistant.
One I did when I was much younger was after a trip to a Cracker Barrel restaurant. They have these golf tee peg games (triangle shaped board with holes and golf tees inserted). There are rules for doing jumps and removing pegs, with the goal of getting down to 1 peg remaining.

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.

I did the same thing (only under Linux, not MS-DOS). I also found out that leaving 8 pegs is way harder than just 1 peg (2 ways, excluding reflections and rotations). And for 10 pegs, only 1 way.

Edit: Update number of ways to leave 8 pegs, and added number of ways to leave 10 pegs left.

Back in the days of Windows 3.0 / 3.1, a friend and I hung out in the computer labs with faaar too much time on our hands... We figured out how to beat all four levels of Windows "Reversi" (Othello) 64-0.

Manually, no programming involved.

I made a html js + google apps script timesheet thing, its at https://spa.bydav.in/tsDMV/

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.