26 ms·
Some tiny personal programs I've written
- jessetemp 5y agoCan 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
- mynameismon 5y agoSo 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/ https://curlconverter.com/
- gen220 5y agoIf 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.
- fmakunbound 5y ago> use secret undocumented APIs where you need to copy your cookies out of the browser to get access to them Yea, thank you modern front end developers. This is my favorite start for scraping as well.
- dhruval 5y agoThe dice roll thing reminded me I wrote a small multi dice roll visualization in flash that took (x) repetition of (y) dice rolls and added them together in bar charts for each repeated sum of values. I was stunned how it was flat when there was only one dice but started to look like a bell curve as the number of dice increased. 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)
- A_No_Name_Mouse 5y agoSome of mine: * 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
- julius_deane 5y agoyou wrote those programs, but somehow you're "not a programmer"?
- urbushey 5y agoI wrote a very simple script to automatically download desktop wallpapers from http://simpledesktops.com/ http://simpledesktops.com/. I then cron'd it to place wallpapers in a folder, and Mac OS automatically rotates through the wallpapers randomly every hour. I love the idea of small, simple projects that make your life better. https://github.com/urbushey/simple_grabber https://github.com/urbushey/simple_grabber
- edgartaor 5y agoI save articles into HTML files with TagSpaces or SingleFile to read them later but I could not find a way to serve them easily to a Kindle Paperwhite and read them there. I create this simple project to fulfill this need. It was just a weekend project that it's already valuable for me. https://news.ycombinator.com/item?id=30669487 https://news.ycombinator.com/item?id=30669487 https://github.com/edgartaor/kindleServer https://github.com/edgartaor/kindleServer
- amir 5y agoto disable retweets on Twitter you can add "RT @" to the list of muted words
- johnklos 5y agoTiny 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 :)
- throwthere 5y agoThat 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.
- sergiomattei 5y agoI 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.
- melling 5y ago“This didn’t turn out to be necessary (more appointments opened up pretty soon anyway), but it was fun.”
- kinduff 5y agoHave 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.
- mr_mitm 5y agoThis was done with a lot of collaborative effort in Germany: https://github.com/iamnotturner/vaccipy https://github.com/iamnotturner/vaccipy
- bhaak 5y agoIt'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.
- dbrgn 5y agoI 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 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!
- chrisweekly 5y agoCool 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.
- dbrgn 5y agoI prefer not to upload all my potentially private documents into a cloud service :) OCRmyPDF (https://ocrmypdf.readthedocs.io/ 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.
- chrisweekly 5y agoWell 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.
- jwong_ 5y agoI 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.
- mindslight 5y agoI 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!
- kinduff 5y agoWhat 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.
- _carbyau_ 5y agoA 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...
- nso95 5y agohttps://github.com/narkoz/hacker-scripts https://github.com/narkoz/hacker-scripts
- brink 5y agoNice 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/ 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/ 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 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.
- guruparan18 5y agoInteresting 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.
- matja 5y agohttps://en.wikipedia.org/wiki/Law_of_large_numbers https://en.wikipedia.org/wiki/Law_of_large_numbers
- alskdjflaskjdhf 5y agoThis is a classic illustration of the Central Limit Theorem--in fact, the example is even on the Wikipedia page [0]. The distribution tends towards a normal distribution as n increases (though to actually take the limit you need to rescale). [0] https://en.wikipedia.org/wiki/Central_limit_theorem#Applications_and_examples https://en.wikipedia.org/wiki/Central_limit_theorem#Applicat...
- nivethan 5y agoJulia 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 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.
- ludovicianul 5y agoIt'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.
- psalminen 5y agoI 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.
- pkdpic 5y agoYes! 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 :^)
- magamig 5y agoI did the same for the COVID vaccine https://magamig.github.io/posts/scraping-for-a-covid-19-vaccine/ https://magamig.github.io/posts/scraping-for-a-covid-19-vacc...
- somdax 5y agoI 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
- hereforphone 5y agoTo those thinking about getting a dog: please consider a shelter first.
- gcheong 5y agoIf you're set on a particular breed also consider a rescue that specializes in that breed if there is one.
- munificent 5y agoThis 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.
- hughrr 5y agoI 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.
- bArray 5y ago> 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!
- ocdtrekkie 5y agoI 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.
- friggeri 5y agoThese 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.
- LinasKo 5y agoA 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.
- hebron 5y agoI'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!
- staindk 5y agoThis 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.
- aghilann 5y agoIf 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.
- hereforphone 5y agoI 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.
- Jtsummers 5y agoYou'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.
- pitaj 5y agoChecking in as a BSEE: never used LaTeX.
- pushrax 5y agoIt’s more common in CS than engineering in my experience, when CS is part of the math department.
- avg_dev 5y agoIf you put it on GitHub, or anyone linked me to a similar tool, I'd be interested. Thanks.
- kevincox 5y agoOne 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 https://gitlab.com/kevincox/red7-sim
- wolfgang000 5y agoI 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/ https://gitlab.com/wolfgang000/saime-bot/
- pseudosavant 5y agoI 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 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 https://glitch.com/edit/#!/flexible-fetcher Scrape HTML <table> return JSON: https://query-page-table-to-json.glitch.me/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FLos_Angeles_Lakers&selector=table:nth-of-type(2) 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 https://glitch.com/edit/#!/usps-zipcodes-demo Create Data URIs - 100% client side: https://glitch.com/edit/#!/data-uri-pwa 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 https://glitch.com/edit/#!/frame-count NBA Team Standings in JSON: https://glitch.com/edit/#!/nba-standings https://glitch.com/edit/#!/nba-standings Read/render markdown files on your HTTP server: https://glitch.com/edit/#!/markdown-html-remix 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 https://glitch.com/edit/#!/apple-maps-link Clean your Amazon URLs: https://glitch.com/edit/#!/clean-amazon-url https://glitch.com/edit/#!/clean-amazon-url
- ciroduran 5y agoI 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.
- pseudosavant 5y agoI'm dying for Glitch to get native Deno support.
- stavros 5y agoMy small script is a thing that will run all these small Docker containers easily, it may be helpful to you. I love it: https://gitlab.com/stavros/harbormaster https://gitlab.com/stavros/harbormaster
- jrm4 5y agoMy 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)
- lhuser123 5y agoI write tiny programs with pyautogui to automate parts of my job. It’s like having an assistant.
- davchana 5y agoI made a html js + google apps script timesheet thing, its at https://spa.bydav.in/tsDMV/ 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.
- derekp7 5y agoOne 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.
- spc476 5y agoI 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.
- ectopod 5y agohttps://en.wikipedia.org/wiki/Peg_solitaire https://en.wikipedia.org/wiki/Peg_solitaire
- CRConrad 5y agoBack 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.
- Zhyl 5y agoI feel like 'tiny personal programs' is one of the bigger reasons to teach 'everyone' to code. 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.
- iak8god 5y agoFor this reason, I often recommend 'Automate the Boring Stuff with Python' (https://automatetheboringstuff.com/ https://automatetheboringstuff.com/) to beginners. It hits the basics and then moves pretty quickly to address: OK, what can I actually use this for?
- v0x 5y agoI am not a programmer, but it has been fun learning little bits of Python and making scripts to automate tasks. 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.
- HiroProtagonist 5y agoSounds like you’re a programmer to me!
- spikej 5y agoFor me it really hit home starting with autoit on windows years and years ago. I still have scripts I wrote that work almost 20 years later!
- syshum 5y agoI think we need to teach people the basics of computer operations before learnToCode... Computer Illiteracy is still very high, even today lots of people can not tell the difference between their computer monitor, and their computer.
- simlevesque 5y agoThank you for the Fringe calendar !
- frans 5y agoMy tiny program regularly scans a dropbox folder. If it finds a pdf, it prints it and moves it to an archive folder. That was just to avoid every family member emailing me documents so it is nicely printed by the time they get home to study.
- Zircom 5y agoThat's brilliant, my girlfriend and roommates refuse to install the printer driver onto their computers and print things themselves so it's an endless cycle of bugging me to print things. Going to get this going when I get home today.
- wwilim 5y ago> I don't think it actually helped but it was fun This seems like the central theme, and I can totally relate
- sanderjd 5y agoHere's mine: Back in like 2006 when I was in college and they first released games on facebook, there was a game my friends liked that was multiple choice, matching song lyrics to artists (if I remember correctly). It was always four choices, you would get points for a correct answer and not lose any for an incorrect answer, then there was a leaderboard amongst your friends. So I thought clearly the right way to win this game is to write a program that just chooses randomly (actually I think it just always chose the first choice), but as quickly as the server will allow. My poor friends woke up the next morning to find I had about 1000x their points. A fun hack, but I also regret it because it ruined a fun game for me and my friends; I couldn't figure out how to reset my score.
- JamesMcMinn 5y agoI own the house I currently live in because of a script I wrote. 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.
- zachwill 5y agoVery cool! Great story.
- jwong_ 5y agoDid you end up running the scraper longer for your new neighbour?
- JamesMcMinn 5y agoI did, yes. I set it up with some specific conditions that sent him an alert whenever a house similar to ours became available. In the end, he got the house directly next to ours and very similar in design. Our garages actually share a wall.
- jim_lawless 5y agoI wrote a command-line MP3 player in C for Windows. I just wanted to play with the media manger API's, but I've ended up using this to play MP3's in succession via a script. https://github.com/jimlawless/cmdmp3 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 https://github.com/jimlawless/gsend I use this regularly. I used to use it on MacOS, but I use it more frequently on Windows.
- vorvac 5y agoBack in high school I would try to play CS 1.6 on the library computers. The librarians had access to screen viewing software on all computers in the library and quickly caught me every time. 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!
- jgrahamc 5y agoI wrote a bunch of Lotus 1-2-3 code for a small business in 1991. Got paid cash which paid for an entire six week Amtrak adventure round the US.
- 75central 5y agoWhen I briefly returned to the Windows world, I wrote a quick-and-dirty application that would clean the shortcut links that installs would clutter my desktop with. https://github.com/MattGHarvey/ShortcutCleaner https://github.com/MattGHarvey/ShortcutCleaner
- TrapLord_Rhodo 5y ago>(“using the API of local services” seems to be an ongoing theme, one of my favourite things is to use secret undocumented APIs where you need to copy your cookies out of the browser to get access to them) Would love more information about this one
- jrkatz 5y agoA basic step for securing a resource intensive API from DDOS attacks and some user impersonation attacks is to rely on a security token in a cookie set in the response to an earlier request. For example, a user may land on a web page and receive a unique, encrypted, short-lived security token cookie that is marked http only (inaccessible to javascript), plus a copy of the token in cleartext. When the user agent later polls an expensive API, it must send the cleartext token as part of the request. Server-side, that's compared to the encrypted copy (received from the cookie) and the expensive call is terminated early if they do not match. 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.
- bloqs 5y agoThis is something I could never grasp. How on earth do you discover those things?
- ckp95 5y agoMay as well flog the little zsh thing I wrote: https://github.com/ckp95/fwf/ https://github.com/ckp95/fwf/ 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.
- belkarx 5y agoVery cool, thanks.
- merely-unlikely 5y agoI wrote a script to email me the top 10 Hacker News articles at lunchtime. And now I’m here :)
- 333c 5y agoI also wrote a script to get a vaccine appointment! I wonder how many other people did that.
- TrapLord_Rhodo 5y agoI used to play a game called runescape and there was this client called OS Buddy that had data dump of all 'buy' and 'sell' orders in the grand exchange. 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!
- audiometry 5y agoWhat is a ‘flip ratio’?
- TrapLord_Rhodo 5y agoDifference between the immediate sell price and immediate buy price. 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.
- audiometry 5y agoThat's an arbitrage, then, if both sides are immediately available. Then it's just a question of how much profit can you lock-in.
- TrapLord_Rhodo 5y agoyup but arbitrage is usually through other exchanges, or exploiting a triangle between assets. In runeescape there was downright no liquidity so it's more like day trading and using the liqudity gap as your margin.
- 5y ago
- creeble 5y agoIf anyone is interested in a little script that grabs an image from a webcam pointed at a 7-segment LED display and returns the numbers it finds, let me know. 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.
- tomcam 5y agoMad props. I never managed to finish a one night project in one night.
- Nouser76 5y agoI have a local media collection that I like to have as background noise/entertainment while I work. One thing I didn't like about self-managed libraries vs radio/television/etc. is that I still had the cognitive load of choosing what to watch, specifically. So I wrote a small program to take a list of shows and shuffle them[0] then interleave episodes. Depending on when you start this channel, it has a time offset so you're dropped in the middle of an episode (just like channel surfing!), and has support for showing a certain show only in sequential order[1], and even adding commercials between episodes. [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.
- alexpovel 5y agoA couple years ago, I switched from German QWERTZ to a UK QWERTY keyboard (wouldn't have minded US QWERTY but the differently shaped return key seemed too foreign). I am not looking back: for programming but also general tasks, having keys like ` [ ] \ / { } 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/ 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.
- w-m 5y agoNeat! I'm using QWERTY International layouts myself, where you can type umlauts and ß with special keys for modifiers (e.g. alt+u on Mac for ¨), but I still think this is a cool tool. 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.
- anthomtb 5y agoMy SO is not always reliable when it comes to handling home duties while I’m away for work. So I setup a little Python script to send a text message with a TODO list every day. Twilio handles SMS, reminders are store in sqlite3, and cron runs the script once a day. It lives on a DreamCompute instance so (hopefully) no worries of a local power outage eliminating crucial (ok, not really that crucial) reminders. Are there better ways to do this? Undoubtedly. But I sure had a good time making it work.
- eindiran 5y agoMy recent favorite small program I wrote: 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.
- adhesive_wombat 5y agoFYI, Aegisub can do that. 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.
- midasz 5y agoOtherwise you've got Bazarr which fits into the whole *arr stack
- Dyac 5y agoVLC allows you to specify a subtitle offset, fyi.
- selcuka 5y agoAlso it allows shifting them during playback using keyboard shortcuts (g and h).
- _mitterpach 5y agoEven more so, the subtitle offset can be set as needed with two key shortcuts - SHIFT+H when the sentence you want to sync to is said, SHIFT+J when the sentence shows up in subtitles and SHIFT+K to confirm the sync. (source at https://wiki.videolan.org/VLC_HowTo/Adjust_subtitle_delay/ https://wiki.videolan.org/VLC_HowTo/Adjust_subtitle_delay/ )
- jsdwarf 5y agoCreated a python script that scrapes the holding lists for each of my ETFs and outputs an aggregated list of all companies I am invested in through the ETFs. Can also compute how similar two ETFs are based on their holdings. Has saved me some order fees because it drastically reduced the ETFs I am investing in.
- eddieroger 5y agoThe stories on this page, as well as the other comments here, make me really happy because they're all examples of computers making life better, as opposed to being passive consumption devices. Pretty often, I think back to putting together a database to track invites to my bar mitzvah on a 386 running a program called MyDataBase - it created print jobs for envelopes, let me mark back RSVPs, track gifts and thank you notes, everything. We carry such powerful computers in our pockets these days, but there are so few apps that I know of that actually use the device to make our lives easier. I wish more people knew how to use these tools the way the audience here does, or that I knew enough to make something that others could then use to do the same.
- mooreds 5y ago> The stories on this page, as well as the other comments here, make me really happy because they're all examples of computers making life better, 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.
- eddieroger 5y agoWordPerfect mail merges! Did we grow up in the same house?! That really takes me back. It is really cool to see that others had early computer experiences similar to mine, since so many of my friends with computers were just interested in playing games and stuff. I never really took to computer games when also offered the opportunity to play with BASIC or mess around in a terminal and figure out how the computer was working. Necessity may be the mother of invention, but it also seems to be the mother of learning as well.
- svilen_dobrev 5y agoif anyone finds any of these useful... https://github.com/svilendobrev/svd_bin https://github.com/svilendobrev/svd_bin (terminal + sh setup , version-control, lots of commands for this or that) https://github.com/svilendobrev/svd_util https://github.com/svilendobrev/svd_util (python stuff)
- senko 5y agoLove these kinds of projects! To me they represent what's the most fun in programming. 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.
- belkarx 5y agoWhen I was first learning to code, I spent a few hours writing a python script to get Advent of Code files and prompts, then open them in an editor, and also eventually made a util to check the answers. Fun times.
- markussss 5y agoI absolutely love this, and I do the same. Small programs and scripts to solve problems I encountered in my daily life. When I make them for my own use, and for myself to enjoy making something, I don't care about whether it's the best solution or the most elegant solution, as long as it's a solution! And I really, really enjoy that. I don't care if it's one or one hundred lines, as long as it's enjoyable! 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 https://github.com/Markussss/redshift-gui [2,3,4]: https://github.com/Markussss/userscripts https://github.com/Markussss/userscripts [5,6]: https://markussss.github.io/ https://markussss.github.io/
- gjs278 5y agoI wrote a scraper that looked through substitute teacher jobs for a friend. she subbed 30 days in a row and got a full time job due to it.
- prometheus76 5y agoI haven't turned it into a standalone program yet, but I wanted a way to calculate praying the Orthodox Book of Hours according to a sundial instead of a normal clock, and I used excel to do it. 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!
- rauhl 5y agoHeh, I did that with Emacs! It already has sunrise & sunset, so the rest of the math was easy. Excel & Emacs: two things starting with E which let anybody program anything.
- prometheus76 5y agoThis is super basic, but I finally sat down and learned the syntax for yt-dl and built a script for checking all of my favorite channels on youtube for any new content and archiving them locally. I was doing it manually before and that turned into a huge pain as my list of channels I wanted to archive continued to grow. Now it runs every night and I get notifications if it runs into errors.
- DrBoring 5y agoThis script would be good for my kids. Would you be willing to share? 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.
- asdff 5y agoyou can get an rss feed from youtube channels then just open the links with mpv if you didn't want to bother caching locally too
- staindk 5y agoThis is a good idea too. Pretty sure VLC can do the same.
- prometheus76 5y agoSome notes on the batch file below. This is saved as a .bat file and runs in the middle of the night using task scheduler. I didn't include the error checking portion because it adds a bunch of complexity and dependencies. The batch file below can be copied and pasted in the same batch file for every channel you want to download. Just copy the block below and paste it below and modify it for the next channel. I also keep a copy of yt-dlp.exe in every folder I'm downloading to, and in the batch file, it runs an update of that file to make sure I always have the latest version before downloading. I also download the subtitles in English and I download the thumbnail for the video, so that it shows up nicely in Plex. The first time it runs, it will download all of the videos from the channel, and it will record the urls into a text file for all of the videos. The next time it runs, it will check the videos available from the channel against the list it recorded and only download new content. If you need help, consult the docs on yt-dlp github page. I don't really have time to help with tech support. I should also add that you'll need to replace the http string below with the url of your favorite youtube channel. 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 updated
- vermarish 5y agoMy friend invited me out to karaoke, but most of the songs I know aren't popular enough to be in karaoke systems. It turns out that the local karaoke place has a song database that serves queries formatted as a URL parameter, so I wrote a script to query it for every artist I've listened to on Last.FM. I found out that Black Sabbath and Iron Maiden are surprisingly good picks for karaoke! There were also a few singles I didn't expect from Children of Bodom and Arch Enemy. https://github.com/vermarish/karaoke-sign-in https://github.com/vermarish/karaoke-sign-in
- pianoraptor 5y agoVery cool. As a fan of metal with “extreme” vocals, I was blown away one night at a karaoke place when a guy went up and screamed the vocals to an Arch Enemy song! At the time, I was thinking “Only in Portland…”
- freeplay 5y agoCool project. Created a PR with some performance improvements if you're interested.
- vermarish 5y agoOh, wow! This is extremely cool, thank you for that. I've responded to your PR message.
- barbs 5y agoNice one! Although when I started reading your comment I was sort-of hoping you found a way to hack it and put your own songs in!
- recentrecruit 5y agoWrote a TI-83 program (TI Basic) for a geometry course in high school. About a month prior to the feared final exam, I combed through all of our coursework to catalogue all of the calculations needed then wrote a program that would solve for any query (length of side, angles, etc.) based on the shape and input data. 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.
- alana314 5y agoIn calculus I wrote a program that solved the last problem of the exam, during the exam. I wrote down the source code in the exam by hand. I got an A but the teacher wrote a letter to my parents saying he was concerned about my reliance on programming.
- twodave 5y agoI actually got into programming on my graphing calculator in high school in the early 2000s. Most of our tests from algebra up thru calculus were simply "apply the correct formula to the problem". I would simply program the calculator with the formulas, use it to calculate the answers and then work backwards to "show my work". I got 100% on every test for 4 years. I'm still not sure whether I feel guilty or not.
- Semiapies 5y agoYou might find it funny that a scaled-up version of this was the plot of a 1958 children's book, Danny Dunn and the Homework Machine. (Except the teacher figures it out and starts assigning the kids using the computer more advanced work that they have program the computer to perform.) https://en.wikipedia.org/wiki/Danny_Dunn_and_the_Homework_Machine https://en.wikipedia.org/wiki/Danny_Dunn_and_the_Homework_Ma...
- conroydave 5y agoI'd like to add that OP has some incredible easy to understand "zines" that help explain technical topics like http, dns, containers etc.
- jrockway 5y agoI thought about writing a program to get myself a vaccine appointment, but ultimately decided that we probably didn't want to vaccinate people in order of software engineering ability. I don't have to physically go to work, and can afford to have groceries dropped off in front of my apartment, so there was really no reason I should get the vaccine before everyone else. I can just self-quarantine with zero inconvenience or consequence, so probably a better use of limited resources to give it to someone else first. 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.)
- adrianmonk 5y ago> thought about writing a program to get myself a vaccine appointment, but ultimately decided that we probably didn't want to vaccinate people in order of software engineering ability 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.
- jrockway 5y agoWanted to say one other thing; I'm not criticizing the author of this blog post for writing such a script. Their risk factors/assessment may be much different than my own, and that's totally fine.
- prova_modena 5y agoI wrote a tiny program to help test the tire pressure sensors on my car. You can receive signals from these sensors using a cheap SDR dongle and a program called rtl_433. However, out of the box the process is bit messy and requires tweaking and interpretation. So I wrote a bash script that wraps rtl_433, guides you through the process in an easy-to-understand way and summarizes the results. 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.
- el_benhameen 5y agoDo you have the code for this living anywhere? I think I have a bad TPMS sensor in one of my tires and it sounds like your tool would be immensely helpful in figuring out which one.
- prova_modena 5y agohere's the code: https://github.com/rouyng/tpms-helper https://github.com/rouyng/tpms-helper 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://www.r-c-y.net/posts/tpms/
- pcthrowaway 5y agoThank you for sharing. I have a Prius and the tire pressure alert is on even though all the tires appear fully inflated. Is there a way to determine which sensor is detecting low pressure?
- deleted 5y ago[deleted]
- twic 5y agoI wrote a little web app (Python and CGI) to organise a secret santa ring. You put in a load of names with email addresses, then it shuffles them, and sends an email to each person telling them to buy a present for the next person on the list (wrapping round). It meant a group of friends could do a secret santa without one person having to know who was buying for who. 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.
- nunez 5y agoAges ago, I had a second job as a speed-dating host for a social events company. I did it partly for the (beer) money, partly to meet women at her other social events for free (she charged for them), and partly to get her brash-but-actually-quite-useful online dating advice (that helped me find my now-wife, now that I think about it!). 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!)
- Semiapies 5y agoSome years back at work, I actually hit the size limits of email rules in Outlook, just for filing emails into folders for my clients. So, I wrote the first of a few iterations of an email-filtering script in Python, connecting into the office's Exchange server in different ways as we upgraded. 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.
- trickjarrett 5y agoMost of mine are one-time use or limited use. I have a few ongoing dev projects for personal use: - 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.
- hegzploit 5y agoThese little quality of life scripts are life savers, I've made a script which I'm really proud of and still use to this day, in my university they usually release assignments every now and then and I had to check each course's page manually for any new deadline, so I made a python script that scraped the website and would print any new assignments since the last run of the script. I would later make a little telegram integration where new assignments were sent on a group chat for my class mates to get notified too and left the script running in crontab on some vps I had around. https://github.com/hegzploit/lazy-chicken https://github.com/hegzploit/lazy-chicken
- unforswearing 5y agoI am self-taught and little scripts like these were my entry into programming. Favorite programs of mine include a script to tell me when a boutique guitar pedal would be available from the maker to avoid paying +200% markup in the reseller market[0], and more recently I created a "todo focused markup language"[1]. [0]: https://gist.github.com/unforswearing/db73475f333809119ae3dd684f84f39f https://gist.github.com/unforswearing/db73475f333809119ae3dd... [1]: https://github.com/unforswearing/todo_markup.js https://github.com/unforswearing/todo_markup.js
- bonestamp2 5y agoWhen my wife and I were looking at buying an investment property, I built a little program to use Zillow's API to get tons of data for a particular area, make some calculations, and then sort the data in order of most potential profit as a rental (based on their estimated rental rates, which are not always perfect of course). Then I added some filters so I could find a property that met our other criteria. 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.
- windthrown 5y agoThat sounds interesting! Would you be willing to share it with those of us that don't work at Zillow?
- fsniper 5y agoI have had many small scripts or software doing automation for me. One of them is the one that found me a motorcycle. It was a neat web console JavaScript code, which would go over the listings and score them with a pretty basic algorithm. I scored a good Cbr250 with that. In turn I dislocated my shoulder in the upcoming days :) I rode the bike for a few years. It was also my first and the last motorbike. Fun times.
- sideproject 5y agoI frequent ProductHunt to see what new products are launched. I usually click on every link. That takes time and hurts my fingers clicking. So I automated it and created an app called Rockmelon. https://www.rockmelon.app https://www.rockmelon.app 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#/ 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.
- submeta 5y agoI got an appointment at the registry office for my marriage because of a script I wrote. 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.
- ggerganov 5y agoI've always wondered what would be the chance to win the lottery if I played consistently a certain set of numbers. Every day, no excuses. 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 https://ggerganov.github.io/lottery-check Bonus - clicking the "Random" button helps you really understand how futile playing the lottery actually is.
- Ratalala 5y agoThat would be 49!/(43!6!) = 13983816 combinations. So, on average, you need to play 13983816 times before your first win (geometric distribution). At one game a day, that's nearly 40000 years.
- theshrike79 5y agoExcept for those few cases where the people planning the lottery don't know math and buying all the combinations costs less than the amount of the wins :) A Romanian Economist did this in the 90's: https://thehustle.co/the-man-who-won-the-lottery-14-times/ https://thehustle.co/the-man-who-won-the-lottery-14-times/
- deleted 5y ago[deleted]
- beamatronic 5y ago>> secret undocumented APIs There's precedent in the US for going to jail for doing this
- julius_deane 5y ago[citation please]
- CyberDildonics 5y agoWhat person went to jail? What is their name and what jail did they go to?
- coreyp_1 5y agoI wrote a program to distribute my lecture slides to my students in real time. 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.
- RangerScience 5y agoThat's really cool! Did you post the code up anywhere?
- coreyp_1 5y agoMaybe one day, when the code is cleaner!
- gurchik 5y agoSorry but I'm confused by > 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.
- 5y ago
- shimonabi 5y agoI had a relly nice free seaside summer vacation because of a Python script. 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.
- punnerud 5y agoUsing print in Python to generate HTML and piping the output to a file: https://gist.github.com/jvns/a552895b6f9b523276e88d7e7506ee86 https://gist.github.com/jvns/a552895b6f9b523276e88d7e7506ee8... Always used append to file, but this is easier to debug/iterate. Thanks for the trick.
- sailorganymede 5y agoMy parents work at a care home and every now and then, they will have a funny issue that I’ll try solve with code. Like, the staff tried going paperless so important documents needed to be hosted somewhere and a QR code was used to link them. It’s little things like this that honestly bring so much joy
- somishere 5y agoLove this stuff. I use regular mini side programs/projects as motivation-boosting procrastination tools. Oxygen to a tired mind. Just yesterday I saw a front page post on hn that I didn't love the solution for and so took 3hrs to byo (3hrs from another, only slightly less-tiny, project). Often tiny programs form the seed of much bigger efforts. My last two major projects, both now well-funded scientific programs, can be found buried in tiny-program / MIT form on my codepen. In fact looking at it again now I have a codepen littered with tiny personal programs, most of which are utility-driven, I'd completely forgotten about, and would make no sense to anyone else.
- diatone 5y agoIn case anyone’s interested in the math to get the dice answer, it’s (1 + 2 + … + 6) * 2500 / 6 = 8750. At least, I think it is
- jbmny 5y ago> one of my favourite things is to use secret undocumented APIs where you need to copy your cookies out of the browser to get access to them 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!
- NaturalPhallacy 5y agoI wrote a small program to manage my contracting time after it being gently suggested that I stick to 40 hours and that overtime wasn't needed of me (calculate hours per day and when to leave Friday to hit 40.0). I wrote it so that usage was absolutely as lazy as possible. So typical use cases look like this: >$ 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 https://github.com/cynoclast/time (Java, because that's what I used at the time)
- roughly 5y agoI write code for a living, and I'm in a sweet spot where I actually do get to write things that make people's lives easier, but it's still easy to forget just how much of a superpower being able to write code is. I mean, the things we do, and the things Julia writes about here - this is literally modern day wizardry. We speak the right words to arcane and inscrutable systems and change reality around us. I love that I get paid for this, but I love it even more when I get to change something from "dauntingly difficult" to "easy" just by thinking about it a bit and asking correctly.
- RangerScience 5y agoI describe programming as "describing ideas in enough detail that they are now alive on their own". (this gets more true when you pick up devops and have a codebase that contains both, say, the server code and infra)
- XCSme 5y agoOne of the most used "tiny program" I wrote [0] is a weird one to explain to non-technical people: a scoreboard UI to display the current score of your match on a stream when playing Eleven Table Tennis in VR. I see it being used quite frequently in Twitch streams. 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. [0]: https://github.com/Cristy94/eleven-vr-scoreboard https://github.com/Cristy94/eleven-vr-scoreboard
- lukewrites 5y agoI wrote a web scraper to determine how local Nissan dealerships changed prices on CPO Leafs over time. The script hit the Nissan CPO page, grabbed all the VINs, then updated the price & date if there had been a change. I collected data for a while, then decided I wanted a different car. Still had fun writing that script though.
- robbomacrae 5y agoMy wife was working a role that, as one of her more mundane jobs, required grabbing image descriptions from ShutterStock for their purchased images and replacing the filenames with them. It took up several hours of her week and was incredibly boring work. I wrote her a small script that she could simply drop it in the folder where the images were and double click. 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!
- Nextgrid 5y agoThe best monetisation for this would be to explicitly seek out and take up these jobs then automate them away and enjoy the free paychecks. With remote work you could get multiple jobs concurrently even.
- abnry 5y agoI can control my smart devices by typing the command '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.
- john-radio 5y ago> [the output](https://gist.github.com/jvns/e4a35ca2bad90c1a0fcaf578a803b456 https://gist.github.com/jvns/e4a35ca2bad90c1a0fcaf578a803b45... Missing close paren here btw
- justinlloyd 5y agoI code every day, even when my job has me busy with other things that aren't coding related. I love banging out tiny programs and scripts to solve problems. 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.
- AussieWog93 5y agoI've built an entire business around some personal programs that I've written (all Python scripts). 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).
- ad404b8a372f2b9 5y agoCan you provide examples? I've never managed to make money from scripting and short of going into freelancing I don't see how I would even start.
- AussieWog93 5y agoSpecifically in our case, we sell used video games. 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. [1]https://marshallbrain.com/manna1 https://marshallbrain.com/manna1
- electromech 5y agoThis made my day, especially the scripts that were not ultimately useful, yet you are proud of them and glad you spent the time to do them. I tend to beat myself up for not doing more "productive" coding, and I need to appreciate the experience itself more. Thank you so much for this.
- barbs 5y agoI wrote a script similar to Julia's and other people's here to score tickets to a sold out music festival. At the time, people were posting on the event page that they had tickets to sell, but they were scooped up very quickly. It was a simple script that used Facebook's API to pull the messages on the event page and notify me via email that a new post had been made. I ran it every minute via a cronjob on an ancient laptop I'd been gifted. It was arguably a little chatty since it notified me of every post, and of course I had to be wary of potential scammers, but it worked and the festival was great. 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.
- adriangrigore 5y agoHere’s my list of tiny programs https://adi.onl/projects.html https://adi.onl/projects.html, the log analyzers are soon the be updated. There’s a set of plain text linters in there, percent encoding on the CLI, TAP testing for the CLI, a generic shell preprocessor, my static site generator, Void Linux installation script and my dotfiles if that counts. :P
- reacharavindh 5y agoOne of the best tiny programs I wrote in half hour was to help my office mate automate his manual copy & paste of sample IDs to generate barcodes, aggregate them in 10 nos boxes and send them out. He had allocated the entire day to do this manual labour for 3800 samples. I showed up, asked if I could help, and wrote a simple python script that would read the excel doc with all sample IDs and prepare printable PDFs with 10 barcodes each that he can simply stick on the box. 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 :-)
- froddd 5y agoI have a script running on the raspberry pi that scrapes the Council website and emails me with what bins need to be out on Monday. Runs every Friday. I still await the email with anticipation every week.
- ayushnix 5y agoThis may not be as impressive but I wrote a script to eliminate one of the primary roadblocks I faced when I moved to Wayland on my Linux desktop — a script to copy and autotype password store and gopass data, kinda like rofi-pass https://github.com/ayushnix/tessen https://github.com/ayushnix/tessen
- tempodox 5y agoI wrote a script to post a comment on HN about how I wrote a script.
- lormayna 5y ago* With the spikes of gasoline prices, I have developed a tiny program that find the station with best gasoline prices close to my position. This might become a public website in the future * 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.
- spikej 5y agoHave a look here for the first one https://www.gasbuddy.com/ https://www.gasbuddy.com/
- sparks1970 5y agoIn the UK the government runs the booking of driving tests from a central online system. Because of Covid, and because the test has a 50% pass rate at best, there is now a lot of pressure on this system. People wanting a test are getting test dates 6 months out. 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.