wyattmarks.com

Index   About   GitHub

RSS 📝

08/22/23

I have added an RSS feed to my site! It's not a super complicated thing to do, especially for a site like mine with statically generated content. The feed itself is actually generated by a small python script I wrote. It's really just taking the raw HTML of my site and parsing it into a proper RSS XML file. The specifications for RSS can be found here. Thankfully my website displays every post inside the index.html file, so I'm able to just use it. We search for id="post inside each line of HTML, and if it is found we have started a new RSS entry. The post ID is set by our markdown_site_generator for custom post header stylings. We then assume we are in that post's content until we hit another post. If you view source of my website, you'll see that this is a pretty valid method. The generator is consistent.

We also are using the id="date string to determine publication dates. Again this ID is generated by our generator for special date subheader styling. The RSS spec doesn't require this entry (pubDate), but most readers use it so it makes sense to include it. We're also not using an XML generator or anything like that to make the file. We're just raw building it, appending strings to strings. This is fine, thanks to the very simple RSS specifications.

And of course this new feature wasn't unbidden. I've just started using RSS feeds personally, and I've really been enjoying it. I've mostly stopped using Reddit with the API changes, and Lemmy is a good alternative but not as up-to-date with news and some other stuff. I've also been finding myself reading more and more personal blogs by other tech nerds, and I've started to not enjoy opening up my list of sites to browse each for new content. I feel late to the party in regards to RSS (like, really really late) but it has truly been a refreshing experience.

The RSS client I've been using is newsboat. It's definitely not for the faint of heart. I enjoy it more than I think I would enjoy something like feedly. Feedly is another RSS reader client, but one that's hosted in tHe ClOuD. It's been around for a long while, so I'm sure their service is well polished. But if we look at their webpage we'll see that RSS is not mentioned once and instead AI is mentioned a ton. They've got to stay relevant, so they try and market their customized content feed and recommnedation AI. That's not what I want. I want my own, custom feed. I'll continue to use newsboat, potentially switching to a different FOSS client that generates static HTML or something. I've read about PlanetPlanet (and then MoonMoon,) which are interesting. I enjoy living on my terminal, tho :)

Here are my current RSS feeds, if you want some potentially good reading:

Reading 📖

07/03/23

I like to read. Well, as an adult, I "read" more audio than text.

What is "reading"?

By read I mean consume stories, originally written in novel form. There is plenty of text that I read throughout my day, but most of it is written for articles or messages, not to tell a (long) story. Regardless, it is my opinion that audio books are just as valid as paper books. It is also my opinion that digital books are also just as valid. I do not understand the hate that e-readers or audio book listeners get. It just seems so holier-than-thou that it's almost satirical.

I say this, as I write in neovim. But I don't spurn people who use other text editors or IDEs. Or at least I don't spurn them outside my own thoughts, lol.

What do I read?

Nowadays I mostly read Sci-Fi, but I've also been reading some fantasy. There are a ton of good books, and here is (most of) my past couple of years in books:

Sci-Fi:

Fantasy:

Non-Fiction:

Why should people read?

Reading is fun. It's a way to explore an alternate universe, and to challenge your mind. When I was young, I read all kinds of books. Plain old fiction was my go-to choice, any and all of them. I remember reading Milkweed by Jerry Spinelli and being absolutely floored. It was my first foray into the history of WWII, and it was visceral. I felt like I knew what it was like to grow up as a street urchin in Warsaw when in reality I was an average American boy.

Not only is reading an exploration, but it really allows a young mind to understand how others think and feel. This is something I feel a lot of adults don't think about, either. An example of how the average person doesn't think about others actual lives is The Fundamental Attribution problem.

As an example of the behavior which attribution error theory seeks to explain, consider the situation where Alice, a driver, is cut off in traffic by Bob. Alice attributes Bob's behavior to his fundamental personality; e.g., He thinks only of himself, he is selfish, he is an unskilled driver. She does not think it is situational; e.g., He is going to miss his flight, his wife is giving birth at the hospital, his daughter is convulsing at school.

This is something that everyone struggles with, but I think reading helps a person see from others' perspectives.

Why do I read?

I read for the reasons given above. Exploring the universes created in books is not "an escape." I strongly dislike that phrase. People should not hide in their books. Rather, they should seek ways to change their surroundings with things they learn in books. That seems rather idealistic, though. Of course people will hide in their books. Imagine the young children of whichever war-torn land reading Harry Potter. They're certainly reading because they want an escape from the horror of their everyday. I should just say that I, personally, do not read to escape. I read to explore. To imagine worlds where something that is impossible today could happen. Or just where something plain old impossible could happen.

And then, on top of the reading, I love theorizing on my own time what could happen next. Sanderson's Cosmere books are a great examplef for this. The Cosmere has Laws, similar to our universe's laws, but with magic. The more I learn about the Cosmere, the more excited I become about the series based in it, since I understand what X thing meant, or what it means that Y has Z. And it's even more rewarding when I turn out to be correct. This exploration into what could be is what I love most about reading, or at least lately it has been. Sanderson's works are excellent for this.

I also like to read to explore potential societal constructs that are incongruous with the life I've experienced in the capitalist era. KSR's books are so, so, so excellent in this regard. His original Mars Trilogy posits an evolution of the current feudal-capitalist system, one which codifies equality and the value of the worker. Then, his later works, like 2312, explore similar ideas and how Earth could be moved to them. KSR gets more and more direct with his novels, with his most recent fiction novel, The Ministry for Future, only being set in the very near future instead of centuries away. After reading so many of KSR's books, and loving them all, I had to read his love letter to the Sierra Mountains. And that non-fiction book was amazing. It's now on my TODO list to visit the Sierras, and to go backpacking on my own newly defined trail.

Social Aspects of Reading

There was a period of time, mostly high school, where I didn't do much reading at all. I told myself I was too busy, but that wasn't true. I don't know what caused it specifically, but it had certainly happened. And I didn't pick it back up for until after fall of sophomore year of university. My Diff. Eq. instructor and I somehow got on the topics of books. He highly recommended The Expanse series, and I told him I would check it out. He then kept asking how I liked it, so I was forced to read it. After reading the first book I flew through the rest of the novels that were out at the time.

And it was a lot different than it was when I was young. When I was young, not many of my peers would read the same books as me, and that was fine. I would read my books, maybe take an Accelerated Reader test on it, and then move on. I wouldn't discuss the things I had read very often, if at all.

Now, though, I was talking all about the story with someone. They had their own theories and ideas and it was so exciting! Every since then I've made an effort to find someone else who is interested in the things I'm reading, solely so I can discuss it with them. It's so fun to share thoughts and ideas about the text. This continued til today, where I discuss all of the books I'm reading with my coworkers who are also interested in the topics and genres I am.

I've never used the internet for sharing my thoughts on books, beyond the occasional comment on Reddit if a series was mentioned. With the migration off Reddit, however, I have been tempted to check out something like GoodReads. GoodReads, though, is owned by Amazon and seems to have been mostly abandoned by them. After leaving Reddit, and joining a Lemmy instance, though, I was checking out things on the Fediverse. I found BookWyrm and it seems to be a promising alternative. I've registered, and started filling in some of my profile. I hope it continues to grow! It feels odd using a social media (honestly at all, I've never been someone who posts statuses to FaceBook or tweets to Twittr or anything, really) but I'll try to keep updates coming. Kinda like these posts, actually.


Writing ✏️

06/29/23

Writing is hard. I tell myself that I don't know why it's hard. But that's false. I know that it is hard because I have too-high self expectations. I'm not sure if "self expectations" is the right phrase, either. I worry that my reader(s) will not understand the why of my words. The onus to understand is not on my potential readers, though. That is what makes it hard for me to write - I am worried that I will fail my audience by not conveying what I feel accurately enough.

I spend a lot of my day reading the blogs or articles of other humans. Mostly other humans' thoughts on various technologies or their philosophies relating to them. It's something that I didn't used to do, or really see myself doing.

But spending so much of my time reading the ideas of others makes me feel an urge to share my own thoughts and opinions on the same topics, or others. If I start to force myself to write and share my thoughts I hope I will start to take more action on them. I need to realize that the goal of my writing isn't to impress others or anything like that. It's to get myself thinking, more than I do currently.

Most of my musings will probably be more technical, and less philosophical. Maybe not, though. We'll see. Or hopefully we will. I think it would be a useful practice.


Hello World 🤖

05/23/22

Hello, World! This site is brand-spankin-new, and is generated by markdown_site_generator, a slightly utilitarianly named tool. It uses showdown at its core, turning markdown into HTML. It also uses showdown-highlight for syntax highlighting. It uses CSS from this repo, as well.

In addition to gluing all of these things together, there are some custom things you can do. For instance, all the post titles and dates are using custom tags to have special styling, like this.

## [Hello World :robot:](<​!this_page!>) {post}
###### 05/23/22 {date}

This the {post} and {date} features are using showdown's option to give custom IDs to headers. Then, with css, we target that ID. There are several operators that use the <! style delimeters. The this_page operation inserts a link to this page, or this post. There is also the header operator, which inserts the header, the posts operator, which inserts all of the posts (think of the Index page!)

These custom operators let us combine a ton of features into a very basic set up. To make the website I just run the generate_site.py script after creating some markdown files.


Also, this site's markdown is hosted here! You can use those files with the markdown_site_generator to make this website!

All posts older than this one are from a previous incarnation of this website. I was a lot younger when I wrote them, so don't judge them too harshly!


Greenshot Replacement for Linux

07/19/14

So today I made a pretty cool script. If you use Windows, Greenshot is a must have screenshot program. But I’ve been seriously considering switching to Linux for my desktop, and one problem I thought of was how Greenshot was not available for Linux (they should really reconsider making a Linux port, they would really be at home being opensource and all.)

So I started looking up alternatives, and I found a great little program called Shutter. Unfortunately Shutter is Linux only, so sorry Windows users, you should stick to Greenshot. One of the great things about Greenshot, though, is the ‘External command’ thing. It allows you to make your own program or batch script and make Greenshot send the image to it. I was using this to send the image to a batch file which would use WinSCP’s scripting features to upload it to my sever, and then paste the link into my clipboard. I would release that, but it’s really bad.

Unfortunately, Shutter has no External command feature. But it doesn’t need to! Linux makes up for it. Shutter does have a –output (-o) argument, which allows you to pick where it saves. So I took that, and made this!

#!/bin/bash

## Credits to LordOfGears2 - wyattmarks.com

## This script was meant to replicate what I had on my Windows machine with Greenshot. This uses shutter, a program similar to greenshot.
## It requires: shutter and xsel (for pasting the link into your clipboard on finish)
## Problems: 
##    It may require you to type your password, but you should set up RSA keys

ROOT=/home/user/scripts/
REMOTE_DIR=/var/www/images/
URL=http://mycoolsite.com/images/
REMOTE_USER=username
REMOTE_HOST=mycoolsite.com

cd ${ROOT}
OUTPUT=$(date +%Y_%m_%d_%H:%M:%S.png)

shutter -e -n -s -o ${ROOT}${OUTPUT}

scp ./${OUTPUT} ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_DIR}

echo ${URL}${OUTPUT} | xsel -i -b

rm ${OUTPUT}

ROOT is where you are running the script. REMOTEDIR is where you are uploading the screenshot. URL is where the pic gets uploaded in URL format. REMOTEHOST is the server you are logging in on. REMOTEUSER is who you are logging in as on the REMOTEHOST.

This takes the pic, uploads it, and then puts it in your clipboard. Pretty sweet, huh? Does exactly what Greenshot used to do for me.

This requires xsel too, for putting the link in your clipboard. sudo apt-get install xsel

Now to make this automatically run when you press print screen like Greenshot, you need to follow these instructions, but instead of making the action 'shutter -blah -blah -blah' you need to make the action point to this script. For me, it was /home/lord/scripts/screenshot.sh.

It just depends what/where you save it. Thanks for reading!


Link Shortener

07/19/14

My site now has a link shortener! It’s pretty simple. It just stores the links ID in a MySQL database and uses PHP to refer that link’s id to the link.

Here’s the link! (Removed after site migration. Also not as cool in 2022, lol.)


Minecraft Color Picker

07/04/14

This is a color picker for Minecraft! In Minecraft, color codes are generated using a specific math formula. This does that for you! You can use it for custom leather armor colors, firework colors, etc.

If you want to know the formula for changing RGB color to Minecraft usable codes, it is blue + 256 * green + 65536 * red. Pretty simple, but hey, why do that work when this can do it for you?

Hex: R: G: B:

Minecraft Color Code:




RaspBMC on my Raspberry Pi

06/10/14

So. Raspberry Pi. They’re pretty cool, right?

That’s what I thought. And boy was I right! This thing has been so much fun to mess with. I made a simple reddit bot when I first got it, because I didn’t know what else to do. It’s /u/GoogleTranslateBot, but he’s currently down because I’m using my Raspberry Pi for other purposes. For a long while I didn’t know what to do with my Pi, but I thought a home theatre system sounded cool. I didn’t have anything in my living room to watch movies on anyways. I always had to bring my laptop in there to watch netflix, listen to music, or even play a mp4 video. I had no simple way to view my pictures with the rest of the family.

To be honest though, I never really minded bringing my laptop in. It wasn’t too hard. I only really care when I had to drag it out of my closet, cause that either meant it would have to be put back up, or just left out. I was in luck, because my raspberry pi was the perfect solution. This plan of action is a very popular one too, as there is RaspBMC, which is an OS dedicated to running XBMC (A home theatre software). There is also OpenELEC, which is also a OS for XBMC. I can’t say anything about OpenELEC though, as I never installed it.

Now, for the fun part. My setup. I have my Raspberry Pi mounted to the back of my TV, with power, Ethernet, and the audio cable all running through the stand which has openings for this very purpose. I was going to use my WiFi dongle originally, but I already had a Ethernet cable ran into the living room, not doing anything. I also got this remote. I got it on sale too, thanks to my friend John. Thanks John! It says compatible with all the Windows OS’s, but it also worked on my Raspberry Pi without me having to do any tinkering. It was pretty nice to have something work right on the first try. I also have my audio output hooked up through a standard 7.5mm jack from the Pi to surround sound in my living room. I can switch to the TV audio too, you can find the option under System->System->Audio Output (I think, just going by memory.)

I use the Pandora addon a lot, because before I could only use my phone as a music player. Now I can play music and play on my phone! The torrent addon XBMCTorrent wouldn’t show up in the official listing, so I just compiled the code from Steve’s GitHub and installed it. The addon is pretty neat. It’s similar to the headline making Popcorn Time App. Popcorn Time is slightly more polished looking, and they run their selection of torrents from their own servers (that they get from YIFY).

All in all, I think the Raspberry Pi is berry (See what I did there?) cool. I would definitely recommend getting one, even to just screw around with!


The Lua IRC Bot

05/14/14

IRC. Been a while since you heard that one, eh? IRC (Internet Relay Chat) is what people usually mean when they refer to chatrooms. Most people feel IRC has been dead for years. It is still used, but nowhere near as popular as it was in the early 2000′s.

Although, twitch.tv uses IRC for all their chat rooms. Honestly, I’d use it so much more if people would make it make a come-back! I used to boot up my client, join my favorite channels, and just chat away. I won’t lie, I even at one point set up a DDoS botnet using IRC. It was really interesting, it would connect the bot’s computer to the IRC channel, then you could issue it commands via IRC. Anyways, IRC is very cool.

There are lots and lots of bots for IRC. That’s how the /r/twitchplayspokemon thing worked. It was just a simple IRC bot taking input and pressing buttons for the game. There are also all the bots for moderation on twitch. Anyways, once upon a time, I made an IRC bot. It didn’t do much, simple commands really. It was quite fun to make though. Here is the download.

How to use:

Start the ircbot.lua with lua, I used 5.1.4 to develop it.
It will generate the config.txt file, edit that.
Start the bot again, this time it should connect to the server in your config.
You can add more commands easily, just read the code for more!
Also, !die is hidden from the !help command, and the !auth was never finished.




Paddle Ball Extreme

05/02/14

This here’s a mobile device game. It was made in Unity!

The objective is to keep the ball falling below your paddle. It’s a very simple game. It’s only on android at the moment, because I don’t want to pay the $25 to become a Google Developer. The game has a very retro feel, with simple colors. It’s very fun to just play and try to beat your previous record.

I had a lot of fun making this. Unity was such a change from the old nothing but code. Unity has its pros, but it also has it’s cons. I couldn’t find an easy way to make a gui/menu. What I ended up doing was just making 2D Planes with text painted on them, in the 3D environment. Good luck!

Download!

PS: My high score on easy is 4300. Beat that!


Lua Prettifier

05/02/14

This tool is a pretty printer for lua! It is very straightforward, if you have any knowledge of a computer you should be fine. I made this because I was put in the task of taking over a project started by someone else. Now, normally this isn’t a problem. But these people, I’m telling you, they do not know how to format anything! There were newlines where there didn’t need to be, code was horribly tabbed, even simple if then statements were the definition of ugly!

Anyways, here is the download link. The README:

IF YOU DID NOT DOWNLOAD THIS FROM WYATTMARKS.COM THEN DON'T USE IT! Official release at http://wyattmarks.com

This is a tool made by Wyatt Marks. It relies heavily on HW2 Pretty Printer. 
The homepage for HW2 is no longer available, so I'll link to where I downloaded it - 

http://forums.relicnews.com/showthread.php?70535-New-Tool-HW2-Pretty-Printer-%28currently-v1-27%29

Instructions:
Put the files from this in a folder. Remember where you put them, it will ask you for the locations upon runtime!
Place all the lua files that you want to be prettied in a folder. They can be in folders upon folders, the program will be fine.
And that's it!

Email any questions you may have to inbox@wyattmarks.com!

The source code is available here.

Thanks for using this! It was definitely a fun little project.