YeenDeer softness blog (programming and electronics)

Ellie the Yeen is a soft YeenDeer that mweeoops and does programming

View on GitHub About Bots Projects Tags

The YeenDeer softness blog

Hi this is the blog of a YeenDeer mostly about programming and similar topics
  • Systemd sockets

    You might have heard about inetd which is often called a super-server according to Wikipedia. But did you know the systemd can do the same thing using something called systemd sockets. I will show you how to use them.

  • Useful Keyboard Shortcuts

    There are a lot of useful keyboard shortcuts in a large amount of applications and operating systems that make using those a lot easier and faster. You should always look up the keyboard shortcuts for the applications you use to be able them better. Here are some various examples from apps I commonly use.

  • Ensure a line is in a file in bash, zsh and sh

    Sometimes you want to ensure a certain line is in a config file for example that there is something in authorized_keys or anything like that really. It is quite common to do this manually by opening the file and putting in the line if it is missing and so on. You can however automate the entire process using shell.

  • Command Not Found

    Have you ever wondered what specifically happens when a command is not found on bash or zsh. Some you get some kind of message about installation. Here is how it works.

  • How to configure Requests in Python to retry

    There is a HTTP library for Python called Requests that is very widely used with a user friendly interface for most things except how to actually set how many retries it should do.

  • LeafPHP

    One thing I have not done much with PHP is looking at different frameworks. For many other languages such as Python and Java I have used quite some frameworks such as Netty, Twisted, Flask, Quart, and CherryPy. For PHP however I have not seen many at all that I have really looked into. For that reason I am looking into one that looks good called LeafPHP.

  • Webhook generator and mod_rewrite

    Sometimes you have a large amount of webhooks you want to receive from many different services so why not make one single handler for all of them and with fancy URLs too.

  • Turning off one of many screens on Windows 10 programmatically

    Lets say you have a computer setup like I do where you have 2 computers and one of them is a gaming computer using the middle screen that is on at times and the rest is a computer for everything else using several screens (more than 2) including the middle screen.

  • Getting back into electronics and soldering

    Decided to get into electronics more lately so decided to do some soldering of several microprocessor boards and also got a new camera setup to allow of making videos and streams about electronics. Currently waiting for a delivery of some PCBs I made in Kicad and Fritzing which will hopefully arrive soon. Here are some videos of me soldering.

  • How the plotter converts images to Gcode

    So you might know that I have a pen plotter which I built. I first made a smaller version that was not as good then in 2021 the one I have today which works great. Lately I have been plotting quite a few usernames and profile pictures of those liking a certain Mastodon, Bsky and Twitter post.

  • 3D print GIFs using OctoPrint

    OctoPrint has a feature to automatically make videos using a webcam and mjpg streamer or any other camera that can take snapshots by getting some data from an URL. This can be convenient but sometimes you want things that are sized differently or maybe a GIF instead of a video.

  • Get notifications when 3D prints are done in OctoPrint

    When you have 3D prints in OctoPrint it is convenient to know when a print is done and how it looks. Since Octoprint already tends to be set up with a webcam or other camera in mind this is quite easy to set up.

  • How to enable browser notifications in the local network

    The browser notification API is a bit quirky that it either requires either that you are from localhost or that you have a valid ssl certificate. There is however a way around it that involves using a self signed certificate. There are many guides how to set up such a certificate but it depends on what browser you have.

  • Argparse in chat bots

    The argparse built in library of Python is a rather interesting one. It has a large amount of features and is quite extensible. It is meant for usage in the commend line but you can override some methods in order for it to be used in other contexts such as chat bots.

  • Command line poster for Twitter, Mastodon and Bsky

    Decided to make a command line poster for Twitter, Mastodon and Bsky. It does not support posting images at least yet but it does support CWs. I hastily created it from converting my Discord bot so the code might be a bit messy but it works great. It has some unusual error handling that I implemented in case of smaller faults regarding previews. The code is below and feel free to use it for what you want.

  • Simple Mastodon Bot (Oriented Objects)

    A while ago I decided to make a very silly Mastodon bot that generates fake object oriented class names as I had done something similar many years ago as a Facebook bot when I still was there. It takes several things that sounds like it is part of a class and puts together and sometimes makes some funny nonsense. I have it running here if you want to check it out https://botsin.space/@oo.

  • Moving targets problem and solution

    One day when I was playing Skyrim I noticed that a sorcerer would hit me with their fireballs regardless if I was moving or not and as long as I did not change my speed, trajectory or something blocked the fireball. I tried thinking what the logic and math would be in order to achieve such targeting. To know where the target will be when the projectile arrives requires knowledge of how long time it takes for the projectile to reach the target and to know where the projectile will be in at this point and to know where the target till be at this point requires knowledge of how much the target moves which sounds just like the missile knows where it isn’t but I asked my dad about it and he said it was a differential equation.

  • Syntax highlighted code pictures from the command line

    There are times when you want to post pictures of code as the place to post them might not have a way to post code with syntax highlighting internally. What you typically will do in this case is screenshot code and then post that but the downside of that is that it is hard to fully automate. What we can do in this case is using a tool such as pygments which supports outputting syntax highlighted code as images, HTML and even IRC color codes.

  • Hello World In Many Languages

    Hello world is the most basic program that you tend to try out in a programming language. Here we are going to look at several languages and how to do hello world in them.

  • React update DOM

    Recently I decided to look into the React framework and how it actually works. It is quite interesting that it has ways to update the DOM without reloading the page. This makes switching pages incredibly fast once you have loaded up the app.

  • 1
  • 2