this post was submitted on 22 Jun 2025
65 points (100.0% liked)

Ask Lemmy

32755 readers
1971 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either [email protected] or [email protected]. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email [email protected]. For other questions check our partnered communities list, or use the search function.


6) No US Politics.
Please don't post about current US Politics. If you need to do this, try [email protected] or [email protected]


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 2 years ago
MODERATORS
 

Little programs or scripts or automations you've created ad-hoc to solve a particular single use case

I have lots of shortcuts i make on my phone and I have one i love that detects when bluetooth accidentally or purposefully disconnects from my speaker and reconnects it and fixes a playback glitch so its back to playing properly

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 2 hours ago

Dang, I really should write a programming portfolio page about all of the weird hacks I've made over the years. Other people link to their GitHub profiles in job applications and gesture non-specifically. I'd just point to my portfolio of weird hacks about weird problems I tried to solve weirdly. Anyway...

An ancient one I made back in the day:

I was listening to music while trying to sleep. I controlled the music player with infrared remote. Some mystery song starts playing and I have no idea what it's called. Obviously, the monitor was far away and turned off so I couldn't read.

So I was like, dammit, why can't I just push a button on the remote and have the computer say the name of the song?

My previous project actually helped with that - I had previously made an extension for XMMS that allows other programs to read the song information via a named pipe. So I just whipped up a script that reads the song name and feeds it to Festival TTS, and hooked that up to the infrared daemon. And that was at like 3 AM, so I quickly got back to trying to sleep

Some more recent ones:

Long ago, I was using Adobe Photoshop Elements Organizer to import my photos from SD cards (etc) to my NAS. It was horrible. It sucked. So much that when I finally snapped and switched over to better software (read: stable version of digiKam for Windows came out), I never trusted the photo organiser to get this thing right. So for a while I used random hacks and a bunch of weird scriptery. Then I decided to turn it into a PowerShell script. That started to kinda suck, so I now have a massive overengineered Python script to import my photos. And it does exactly what I want it to do. And I'm finally happy. (Available here for what it's worth)

Another thingy: I have to set the clocks on some devices manually. Daylight saving time, clock drift, you name it. One of my recent old-lady whinges was "Why the hell doesn't Windows even have an analog clock anymore?" I just prefer to have a clock that has both number display (to set the time) and analog clock face with a second hand so I can time the button press better visually. ...so I made one. Because I've never written an analog clock before. First, I made one in Processing. Then, a second version, because I'm in process of learning Godot.

[–] [email protected] 2 points 2 hours ago

I write AHK scripts to make it possible to play certain games even though I can barely use my limbs. Often this means condensing a bunch of pointless inputs into one. Other times it means hacking controller support into a game so that I can use my preferred input devices.

Even though I fucking hate AHK as a general language, it is easily the best language for such tasks.

[–] [email protected] 2 points 5 hours ago

Once I wrote a PowerShell script to change all the public affairs officers' job titles to pubic affairs officers on our exchange server. I never ran it, but I could have.

[–] captain_aggravated 1 points 5 hours ago

One or two versions before they included it by default, I wrote a Nemo Action to launch the monitor settings dialog in the right click menu when you right click the desktop.

[–] [email protected] 1 points 6 hours ago

I wrote a knights and knaves puzzle generator. I enjoyed making the program more than actually solving the puzzles though

[–] [email protected] 2 points 8 hours ago (1 children)

I use Redshift to change the color temp on my monitors.

I have cron jobs at 1930 to change to night mode, and 0600 to revert back to day mode.

I'm very certain the temp change can be scheduled within Redshift itself, but I'd have to leave the terminal open, figure out the documentation, arguments, etc. Creating the cron jobs was easier for me. 🤷

[–] [email protected] 1 points 4 hours ago

You can run scripts without terminal emulator windows.

[–] blackstampede 2 points 9 hours ago

I recently wrote a little library that adds some neat little features to enums in Rust. It's tiny, does one thing, and does it pretty well, I think.

[–] [email protected] 2 points 12 hours ago

a backup script i keep on my flash drive. when i wanna backup my files i just run the script and it copies the folders i want to back up

[–] [email protected] 7 points 17 hours ago

A few years back, I made a python program that searched free-for-commercial-use Google Images and auto-adjusted them to fit Amazon Merch shirts and uploaded them to Amazon. This was, of course, a violation of their terms of service.

[–] Flames5123 4 points 17 hours ago

I have a python script that I run on my phone to scrape a few websites and return the current food trucks at my few local breweries with the times they’re there. It makes our once/twice a week dinner selections so much easier than having to manually visit 4 websites. Some sites have been updated, and I haven’t updated my script and I need to.

[–] [email protected] 2 points 18 hours ago

me and a few friends have a dumb chatbot we've been fiddling with for 15 years. started out on irc, moved platforms multiple times, and i'm currently porting it to matrix. it can do poetry, markov chains, tell you when the weekend starts, pull youtube videos, create email aliases, etc.

[–] [email protected] 2 points 18 hours ago

I wrote a powershell script to rename and reorder about 1000 comic books based off a reading order I put in a csv file once

[–] [email protected] 34 points 1 day ago (1 children)

I have a lot of comic book boxes:

I created a script that lets me query the database to return the box numbers for certain content.

I can search by writer, artist, title, character, notes, even down to issue number.

What I'd LIKE to do is hook it into a voice recognition system and smart lights and get it to light up the boxes "Wheel of Fortune" style. But I'm aways off that yet.

[–] [email protected] 6 points 1 day ago (1 children)

That’s a lot of comic books.

What’s the value of a collection like that?

[–] [email protected] 15 points 1 day ago* (last edited 1 day ago) (2 children)

Hard to say, it's been years since I've done a full inventory and I have books signed by people who have since passed away. :(

Working on a current inventory now.

[–] [email protected] 4 points 18 hours ago

Wow this is really cool. Thanks for sharing!

[–] [email protected] 4 points 1 day ago

That’s really cool!

[–] [email protected] 19 points 1 day ago (2 children)

i wrote a simple program to wiggle my mouse

you can guess why

it was a rip off from a coworker’s program

[–] [email protected] 1 points 6 hours ago

I did that too with a basic powershell loop hitting F15 (non existent keyboard key that's not mapped to anything)

[–] [email protected] 15 points 1 day ago

It was to keep the screensaver from coming on while watching a movie with your date, right?

[–] [email protected] 3 points 1 day ago

My most used one is a two letter terminal alias (zz for zigzag) that copies all the track information from a specified playlist, or from my “download" playlist if none is provided. It can also read from CSV and text files in order to remove all special characters and repeated words from each name. Then it outputs a formatted version to my clipboard, which I then paste into another program's config file. Then I wait...

[–] [email protected] 11 points 1 day ago* (last edited 1 day ago)

It's not an answer, but I really hate how hard this is to do on Android, including it's FOSS versions. You can root it and do something like that then, but that undercuts the whole system design and is a terrible hack.

That's like my main beef with the whole mobile ecosystem.

[–] [email protected] 11 points 1 day ago

I built a script that runs on a raspberry pi with an nfc reader and speakers. It's setup with nfc cards to play music for my kids. they don't use it as much as they used to but it's still going strong after four years!

[–] [email protected] 6 points 1 day ago* (last edited 1 day ago)

I have one deployed project using a raspberry pi.

A water temp meter that reports the water temp at a local swimming hole to a private webpage. Built using a raspberry pi zero w, a timer, an MC battery, a DS18B20 sensor and a bash script running as a service on bootup.

[–] [email protected] 7 points 1 day ago

I made a browser extension to make downloading Minecraft mods easier. It would scrape the curseforge page you're visiting, search for the mod on modrinth, and redirect you if it found one. It was actually very useful when I needed it, I even put it on the extension stores and it gained some users.

I also have a small collection of random python numpy and matplotlib utilities. I need to do some basic graphs and data analysis for uni, and this simplifies it a lot.

[–] [email protected] 5 points 1 day ago* (last edited 1 day ago)

Cowsay as a Service. A Go microservice that lets you send form or json http post with curl or whatever to an api over the internet and in return you get the cowsay ascii art you requested.

[–] [email protected] 4 points 1 day ago

I wrote a coin flip script that randomly calls qlmanage -p tails.jpg / heads.jpg (Mac) to flip a virtual coin.

[–] [email protected] 5 points 1 day ago

Back over 10+ years ago on the original raspberry pi, I made a butler program. Every hour on top of the hour, it would use espeak to say what my schedule was, the current internet usage (there was max usage of 100gb) and a couple of other things. It worked really well for years.

[–] [email protected] 6 points 1 day ago

One I miss the most is one I had on my Nokia N900. It would take a photo with both cameras, aquire the current GPS position and upload all those things to my server. Then it would check for a file on my server and if it existed would create an SSH tunnel, allowing me to SSH into the phone from my server.

It was supposed to be an anti theft measure. Never needed it. Was still cool that the phone had this possibility.

[–] neidu3 6 points 1 day ago* (last edited 1 day ago) (1 children)

I mostly write utilities/tools like this. Some examples from my ~/bin/ folder:

  • A script that turns caps lock off and numlock on, and remaps caps lock to compose. I have this run by cron every minute.
  • A script that saves the current buffer of my continously running screen recorder to a file. Bound to the Lenovo coilot key.
  • A half-finished script that downloads and installs the latest version of discord, as Discord and ants me to manually upgrade it every time I start it.

Edit: OH, and on my work laptop I have a script named Fnkeyfuckery. The keyboard layout is annoying in that I have to choose between Function keys or have Home+End.
I want my function keys AND I want home+end. Luckily I don't need F11 and F12 very often, so I'swapped around those two with their alternate function. That way I have F1 through F10, Home and End by default, and if I hold Fn I can have F11 and F12 too. It runs on startup.

[–] [email protected] 2 points 1 day ago (1 children)

script that saves the current buffer of my continously running screen recorder to a file

Curious to know why you are continuously recording your screen. Must fill up your hard drives really quickly?

[–] neidu3 2 points 1 day ago* (last edited 1 day ago) (1 children)

Why: I case I want to show something unplanned to someone. Freak accident in a game, for example.
Disk: It's only keeping the latest 30 minutes in a buffer. Saving basically means copying that buffer to a different file.

[–] [email protected] 1 points 19 hours ago (1 children)

Ah, cool.

Sounds kind of like the Nvidia tool for Windows.

Speaking of which, as well as your use case, I found this tool a while ago that looks and does pretty much the same thing: "GPU Screen Recorder", found on flathub via "com.dec05eba.gpu_screen_recorder".

I hope it comes to use for anyone!

[–] neidu3 1 points 19 hours ago* (last edited 17 hours ago) (1 children)

I based my setup around ~~Replay Magic~~ ReplaySorcery. I'm sure there are other packages too.

[–] [email protected] 1 points 18 hours ago (1 children)

Replay Magic

Hmm. Trying to find that. Do you mean ReplaySourcery?

[–] neidu3 2 points 17 hours ago (1 children)
[–] [email protected] 1 points 4 hours ago* (last edited 4 hours ago) (1 children)

I read through the readme and the config file example. Looks pretty neat! I might take a look at that to see if I can use it too.

The last release talks about a future 1.0 release, and "experimental" stuff. But that was 4 years ago.

Is it inactive? 🫤

[–] neidu3 2 points 3 hours ago (1 children)

I think so, but it works well enough

[–] [email protected] 1 points 5 minutes ago

Might give a go. Thanks for the tip! 🙂

[–] [email protected] 2 points 1 day ago* (last edited 1 day ago)

I made a website to practice reading my wristwatch: https://aadniz.github.io/niwa-practicer/ (works best on PC, and I'm well aware of many issues)

Since depth is important to recognizing the odd and even, quickly mapping them to the number, I made it "fake" 3D, tracing each layer in krita.

There was no deep motivation for this other than refreshing myself a bit of React from University. With my neverending list of project plans, I felt like this one was a good choice for that. Here is the source code: https://github.com/Aadniz/niwa-practicer

[–] [email protected] 2 points 1 day ago

orphankiller, because pacman -Rns $(pacman -Qtdq) is too much to type

[–] [email protected] 5 points 1 day ago

I've written an entire android app just for myself. I couldnt find anything with the features or widgets i wanted so i just made it myself. Presumably because widgets reduce the need to open the app and that reduces ad revenue.

My userbase is currently me and one friend

[–] [email protected] 3 points 1 day ago

I basically rewrote all of polybar using eww widgets because I didn't like how polybar was too rigid in certain aspects.

So lots of scripts handling audio control, dark/light mode, i3 workspace switching, media control, login session management, weather widgets calling external APIs, etc. It was a whole ecosystem of tools and widgets.

I just recently bought a new computer with an AMD GPU so I'm finally running Hyprland, and now I'm using Waybar. But I might start a project to do it all again using Astal. Who knows. Or maybe Waybar will be able to suffice. We shall see.

[–] [email protected] 4 points 1 day ago

I wrote a link handler, that allows me to just click on magnet: links or open torrent files and send them to my remote torrent client. I use this almost daily.

I also built a torrent crawler that fetches multiple torrent sites and shows me the new stuff, while filtering out shit quality stuff and things I already have.

And then I built a viewer with search for multiple defunct story sites I crawled years ago.

Those tools I use all the damn time.

[–] [email protected] 4 points 1 day ago* (last edited 1 day ago) (1 children)

I haven’t written many utility scripts/programs in a while but my apartment is fully automated with temperature, humidity, light, presence and door sensors.

We like to keep our screen doors open when the weather is nice so I have things like fans, heating, air conditioning automated but set to turn off when a door(s) is open.

The outdoor lights are also automated but I have them turn green/blue when it’s foggy or rainy and they turn red when there is aircraft above.

Before smartphones started using random MAC addresses on WiFi I also automated some things depending which guests we had over, but I haven’t done that in a long time.

load more comments (1 replies)
[–] [email protected] 3 points 1 day ago

I made a D&D character generator once.

[–] [email protected] 3 points 1 day ago

Pi and touch screen photo frame . it reads a photos dir and just sets it as the background randomly every 5 mins using "feh" and "cron".

[–] [email protected] 3 points 1 day ago

A "full update script" so I don't forget a package manager. It should probably be an alias but whatever, I run the script

[–] [email protected] 3 points 1 day ago

I started self-hosting as a hobby and while I enjoy it, I was getting frustrated with file transfers between my computer, phone and two raspberry pi's. Since I was already using rsync, I created a tool for myself to help sort rsync commands into sortable files.

I can now lump together those files into a single command and run several rsync commands in one go.

It's definitely saved me some sanity by not having to refer to a wall of text full of rsync aliases.

I posted it on codeberg.

It is random code on the internet and it involves file transfers so if anyone uses it, those are the risks unless you care to read the code itself.

load more comments
view more: next ›