14 votes

What programming/technical projects have you been working on?

This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

8 comments

  1. jmp
    Link
    I started making a little envelope budgeting app for iOS. It’s very minimalist and won’t include any cool bells and whistles existing apps have (like bank integration, graphs, etc.). It’s...

    I started making a little envelope budgeting app for iOS. It’s very minimalist and won’t include any cool bells and whistles existing apps have (like bank integration, graphs, etc.). It’s basically just physical cash envelopes in a virtual form. No backend. Everything stored locally on-device. No tracking.

    So far I have the basic functionality working quite well. I can create envelopes, put money in them, and spend money from them. I’m using SwiftUI for the UI, which works quite well. Trying to make it look and feel as close to standard iOS apps as possible.

    I might be the only user of the app in the end, but at least it feels happy developing something that I would actually use myself. 🙂

    I have a habit of starting projects and never finishing them, so maybe writing about it here gives me some motivation to keep working on it too. Let’s see!

    5 votes
  2. Eji1700
    Link
    Did my writeup of my home server setup. Working on probably nuking and resintalling the OS because linux gremlins (fails to boot when you shutdown/reboot, until you hold the power button, then...

    Did my writeup of my home server setup. Working on probably nuking and resintalling the OS because linux gremlins (fails to boot when you shutdown/reboot, until you hold the power button, then boots...neat).

    3 votes
  3. DeaconBlue
    Link
    In my attempts to only do silly programs outside of work, I made a thing for OBS that allows you to turn any input source into a sliding puzzle. It turns out that OBS has a pretty decent API that...

    In my attempts to only do silly programs outside of work, I made a thing for OBS that allows you to turn any input source into a sliding puzzle.

    It turns out that OBS has a pretty decent API that I was able to use to (short version)

    • Duplicate an input source 8 times
    • Hide the original input source
    • Manipulate each of the 8 duplicated sources to have different crop and position offsets based on the position of the original
    • Move the children sources around after the fact

    The API, however, is a bit lacking in a few spots.

    • It is kind of annoying to try to rename the children items. You can create a new source of an arbitrary name and fill it with the guts of the parent, but there is no rename function after creation.
    • The API requires values for some fields even if they aren't provided by the API. For example, when you Get a SceneItemTransform, you cannot send the same response back as a Set because the API gives you bounding values of 0 for X and Y, but it requires a minimum value of 1 on the Set call. It's just fiddly.
    • Because of the first bullet point, the GetSceneItemId call is kind of useless for finding the values of the children and they have to be snagged during creation. Not a big deal, just annoying.

    Then I moved the code over to StreamerBot so that other people could use it (because I don't stream, this is particularly useless without sharing). This has its own hurdles. Streamerbot allows C# to run but I can't figure out where to put my objects that I want to use so that I can reference them all over the place. Instead, I just used JObjects and we're going to hope that is Good Enough. It's just a really awkward experience. I ended up copying the same method to four different actions (up/down/left/right) and changing one or two lines on each. It felt gross.

    I am also throwing everything in global variable storage because you can't stop me.

    Here it is in action, mangling a random picture of a puppy https://i.imgur.com/6gdvKiC.mp4

    3 votes
  4. xk3
    Link
    I started work on a small CLI to make Syncthing easier to configure. It's pretty fun! I can now launch multiple Syncthing instances on the same computer and get them talking to each other (just to...

    I started work on a small CLI to make Syncthing easier to configure. It's pretty fun!

    I can now launch multiple Syncthing instances on the same computer and get them talking to each other (just to verify and experiment with Syncthing behavior):

    def test_w_r_r():
        with SyncthingCluster(["w", "r", "r"]) as cluster:
            cluster.wait_for_connection()
            w, r1, r2 = cluster
    
            r2.stop()
    
            fstree.write({"test.txt": "hello world"}, w.local / cluster.folder_id)
            fstree.check({"test.txt": "hello world"}, r1.local / cluster.folder_id)
    
            # let's check that r2 can get a file from r1
            w.stop()
            r2.start()
    
            fstree.check({"test.txt": "hello world"}, r2.local / cluster.folder_id)
    

    This test starts one node with a "sendonly" folder configuration and shares it with two other nodes which use the folder in "receiveonly" configuration

    2 votes
  5. FireTime
    (edited )
    Link
    Just finished setting up the software for an e-ink poster display that shows random album art from my music collection on my wall. Pic1 Pic2. For a long while I was looking at building my own...

    Just finished setting up the software for an e-ink poster display that shows random album art from my music collection on my wall. Pic1 Pic2.

    For a long while I was looking at building my own device using a display from Good Display but I realized that by the time I added a Dev kit and support electronics I was already at the price of the the Samsung EMDX 32. Samsung's mobile app is not good but it communicates with the display using the same protocol as used on their television sets but with a unique command. I modified the samsung_mdc library to include the new commands (only to find out that an hour before I submitted a pull request with my changes they had implemented the same commands... at least I'm not on the hook to manage it now). For now I have all of my album art indexed in a mysql database where the script pulls down 15 random paths. I them assemble a collage using pillow and color correct and dither it to the 6 colors the e-ink can natively display. The image object is hosted on a webserver and the link is passed to the display using a json file to trigger the update.

    I've thrown a copy of my POC code in a gist here https://gist.github.com/FireTime/05915d04a6037f8958efbb23f2a864a3. All that is left is to throw it in a docker container or integrate it into my youtube music time shift program. My true goal is to just pull album art for what i've been listening to recently but the unofficial youtube music api is broken at the moment.

    2 votes
  6. lynxy
    Link
    Currently I'm playing with the Micro editor, re-writing some older plugins which haven't been updated in a few years and are a little janky- but the Lua API is also somewhat weird too. The...

    Currently I'm playing with the Micro editor, re-writing some older plugins which haven't been updated in a few years and are a little janky- but the Lua API is also somewhat weird too. The documentation isn't the greatest either but it suffices most of the time.

    Really, I just want as little excuse to open an electron app as possible while programming, and if the project-view plugin I'm currently working on a proof of concept for pans out I might be able to do the majority of my programming in it. I'm really not happy with the direction VSCode (VSCodium) is going in and I'm experiencing plenty of weird issues with Electron apps under Wayland now that I've properly switched.

    1 vote
  7. 0x29A
    Link
    These probably sit somewhere in-between creative and technical, but: Continuing down the 3D printing rabbit hole. Designed and printed some brackets to hold some USB PC fans up above my router,...

    These probably sit somewhere in-between creative and technical, but:

    • Continuing down the 3D printing rabbit hole. Designed and printed some brackets to hold some USB PC fans up above my router, pointing air down at it and the hardware on its sides (modem + miniPC server). The brackets clip to the top of the router and cradle the fans.

    • Planning on printing some brackets to clip onto the drain tray that goes around my A-frame inside coil of my HVAC system so that the filters that lay on each side of the coil don't dip down into the drainage tray, causing them to wick up moisture and grow mold. The brackets will provide a nice little platform / catch for the bottom edge of the filters to rest on, while keeping them elevated enough not to touch the moisture

    • Re-did my online presence on the web. Moved my music blog to its own domain, kept it on bearblog. Moved my personal site to a static host and just using HTML/CSS there. I wanted to keep the frictionless writing of using a blog platform for the music posts since they're the most often/common, but break outside of a platform and use HTML/CSS so I have more control for my personal site for creating types of pages bearblog wasn't really designed for (and for things where markdown just isn't adequate or desired)

    1 vote
  8. tomf
    Link
    Sometimes my Hue lights dim down because its later in the night but I'm not ready for that... but I also dont want to bark orders at the Google Home or open the app. So instead, I used skhd to map...

    Sometimes my Hue lights dim down because its later in the night but I'm not ready for that... but I also dont want to bark orders at the Google Home or open the app. So instead, I used skhd to map hyper - o and hyper - p to turn the lights down or up

    First, create a user to get an API key

    curl -X POST http://BRIDGE-IP-ADDRESS/api -d '{"devicetype":"my_terminal_app"}'
    

    That will return

    [{"success":{"username":"E4iGN5zHaaNiuZTqQOB7ndVGarnTjbiublahblah"}}]
    

    Next, get a list of lights etc

    curl -s http://123.45.67.89/api/E4iGN5zHaaNiuZTqQOB7ndVGarnTjbiublahblah/scenes \
      | jq 'to_entries[] | {key: .key, type: .value.type, group: .value.group, name: .value.name, lights: (.value.lights | join(","))}'
    

    that will return sets like this

    {
      "key": "gID5vnLP1TgxjZs0",
      "type": "GroupScene",
      "group": "82",
      "name": "Summer Night",
      "lights": "2,3,4,6,7"
    }
    

    you can do a lot.. but here's a basic oner to turn everything off

    BASE="http://172.30.30.140/api/E4iGN5zHaaNiuZTqQOB7ndVGarnTjbiublahblah"; for L in $(curl -s $BASE/lights|jq -r 'keys[]'); do curl -s -X PUT $BASE/lights/$L/state -d '{"on":false}'; done
    

    change on to true to have it all back on again.

    1 vote