Projects

I just (as of 020821) had a realization! I don't just have to host html and images on this site, I can do whatever I want! With that crazy (obvious) idea, here are some projects I am or have been working on. Some are finished, some are not, but at least they should all be easy to access from here. I should have "--help" menus for most of these, but don't hesitate to ask me a question if something still doesn't make sense.

ptable

This was a simple utility I wrote a while ago for chem class. It can print out a periodic table (which I wrote by hand!), give you atomic data from an atomic symbol, and average atomic mass from one (or more) elements in the form of `{coefficient}{atomic symbol} {coefficient}{atomic symbol} ...`.

Example:

> ptable -m H 7C 4H N S 3O
mass of H: 1.008
coefficient of H: 1
total mass of H: 1.008
...
            ┌─────────┐
total mass: │ 183.180 │
            └─────────┘

uxnrun

The build process for uxn really isn't that complicated, but to streamline things a bit for myself I wrote this script! It requires you to have a .uxn folder in your home directory, with a bin directory in that with `uxnasm` and `uxnemu`. It takes the relative path of a .tal file in the .uxn directory, assembles it into a rom in the bin directory, and runs the rom with varvara.

Example:

> uxnrun left.tal
building and running left

mtrack

Not an executable; needs compiling

I wrote this a while ago to track changes in mood, because I wanted some more data on my mental health (I think it was also one of the first programs I wrote in Rust?). It requires an "mtrack" directory in your .config folder, with a log.txt file (though I think it should also create those things when you first run it). you can then use it by running `mtrack xxx message`, where `xxx` is a string up to three characters to designate a change in mood. I, for example, use "+" to mark positive changes, and "-" to mark negative changes, with fewer characters being a smaller change. The `message` portion is an optional note about the reason for the change, which I would recommend putting in quotes to sanitize it. I haven't written any parsing programs for the log file yet, but it's on my todo list!

Example:

> mtrack ++ "working on website"
logged

syncpi

A really bare-bones bash script, but one I use all the time, syncpi syncs my laptop with my pi. I have an ip/ dir in my home folder which is a git repo of a gist I have which is just a text file with the ip address of my pi. This may seem a bit over-complicated (and it probably is), but it was a quick way to get around the fact that my pi doesn't have a static ip. Every five minutes or so my pi checks its ip and pushes it to the gist. To sync my laptop to my pi, this script pulls that repo to make sure its up to date, then uses rsync to sync the folders I want. Those are currently my mtrack config folder, my Documents folder, my backgrounds, and my .config folder.

Example:

> syncpi
Already up to date
sending incremental file list
...

sumtime

A small bash script to figure out how much time I spent on a project. It takes a newline-separated list of times, in the format `hour:minute`, and gives a total. That list of times is just given through stdin, so you can run it and manually type in the list of times, or do something like pass the contents of a file containing your data.

Example:

> cat times.txt | sumtime
Pipe in times, or type and ctrl-d when done
Total time:
29:35