Whats New May 2024

- 1 min read

I feel like it is time to make a new post here and write a little bit.

There have been lots of life changes recently so maybe I will write more later.

I have some things planned for the rest of this year, hopefully lots will come to fruition.

I have recently bought a Valve Index Kit and have been enjoying VR - playing through Half-Life Alyx currently. I have to admit it is bringing me back into gaming.

1 Year Googleversary

- 2 mins read

Today marks a special milestone for me - my one-year anniversary as a Data Center Technician at Google! As I reflect on the past year, I am filled with immense gratitude for the incredible journey it’s been.

This experience has been far more than just a job; it’s been a chance to learn, grow, and contribute to something truly meaningful.

Sure, it is not all kittens and rainbows. There are many things that could use improvement, more in fact than I can give thoughtful feedback on - but I do my best. That’s why we have team(s) though and as I learn more about how Google works, I am also filled with a sense of community and comradery with the people that I work with everyday.

Setting Up Traefik Reverse Proxy

Traefik is a reverse proxy program often used with docker to route web requests to different services on the backend.

It also has some really handy features like automatic HTTPS certs and a configuration syntax based on labels that makes it relatively easy to add to existing docker-compose files or even Docker Swarm and Kubernetes.

Be sure to look at the docs to get a better overview.

Self-Hosting a Minecraft server

This is going to be quick rundown on running Minecraft as a docker container.

Prequisite

  • A computer with docker and docker-compose installed

The minecraft docker image we are using is itzj/minecraft-server

The compose file

Paste the following into a docker-compose.yml

version: "3"

services:
  minecraft-server:
    image: itzg/minecraft-server
    container_name: my-mc-server
    ports:
      - 25565:25565
    environment:
      EULA: "TRUE"
    tty: true
    stdin_open: true
    restart: unless-stopped
    volumes:
      - ./minecraft_data:/data

After you have that file - run docker-compose up -d to run the services in this compose file.

Keyboards, keyboards, keyboards

I love keyboards. As a hobby, as a peripheral and as a history and culture, these things are all really cool to me. There is just something magic about having an input device with so many buttons, configurations and arrangements. So many different typing experiences and ways to customize as well.

I have been wanting to get back into linear switches, as I have almost exclusively used tactile for the last couple years and have been really wanting to get switches that are both lighter quieter.

This post is going to be a very short guide on creating/adding a PAT (personal access token) or SSH key on GitHub and adding it to a Linux (or Mac) host.

This is necessary because GitHub has deprecated password authentication as of August 13, 2021

This means all authentication on the platform can only be done two ways:

  1. SSH/GPG Keys
  2. PAT (Personal Access Tokens)

Generating SSH Keys

Follow this guide to create ssh keys with ssh-keygen.

It was another restless night with not even the slightest chance of sleep - I picked up the rubicks cube that I had a gotten a few years ago on christmas… or perhaps it was the cube that kept me up restlessly. It was time for me to learn the secrets of this plastic puzzle - onece again!

Initially I had learned the basic solving steps a few years ago (bottom->top), but had not comitted them to memory (at least not to the long-term kind)

Revisiting Hugo Themes :heart:

I started using Hugo in 2019 and have stuck with the same theme for my blog for the most of that time… until now.

I ended up on Blowfish mostly because the flexibility of layouts and feature set was exactly what I was looking for in a theme.

Hugo Learnings

I also learned some things about Hugo content organization, changing Site params in frontmatter and a directory based config approach (compared to a single file).

I wanted to see some percentages of how much time certain things take out of my week. This obviously does not reflect the reality and to be honest I doubt it really comes close, but I found it to be an interesting exercise.

Script Output

------------------------
Time Map:
------------------------
[29.8%] work           : {'working': 40, 'commuting': 10}
[40.5%] health         : {'sleep': 35, 'showers': 3.5, 'gym': 3, 'meditating': 3.5, 'cleaning_cooking': 7, 'eating': 7, 'pooping': 7, 'laundry': 2}
[16.7%] digital_entertainment: {'gaming': 7, 'watching_videos': 21}
[10.4%] learning_studying: {'reading': 7, 'learning_japanese': 3.5, 'coding_proj': 7}
------------------------
Time Used:
------------------------
[97.3] % used
[2.7] % left
------------------------

used hrs 163.5 / 168

The Script

#!/usr/bin/env python3

# this is a very simplified, rough estimate of time as there is much more
# variation and drift in these things, however the things that do not change
# for me are work, sleep (I don't usually get a full 8 hours :/)

# i know there are lots of ways to log time spent on various things and that would
# take a lot of the guess work out of these things. something to consider in the future

hrs_in_week = 24 * 7                # 168 hours in a week - that's not ever going to change

# this is a map of groups of things that i dedicate my time to
# the (++) or (--) parentheses at the end of the comments indicate what i want to spend more or less time on

hours_map = {
    "work": {
        "working": 8 * 5,           # currently working a 9-5 schedule. this is not very cash money (--)
        "commuting": 2 * 5,         # an hour each way to work in the car. this does not spark joy (--)
    },
    "health": {
        "sleep": 5 * 7,             # ideally getting 8 hours of sleep (more often 4-6 is the case). I should get more sleep (++)
        "showers": .5 * 7,          # i take short showers (G)
        "gym": 1 * 3,               # if I don't skip leg day (++)
        "meditating": .5 * 7,       # like to spend an hour or two meditating throughout the day (++)
        "cleaning_cooking": 1 * 7,  # easily could be more/less (++)
        "eating": 1 * 7,            # could me more or less (G)
        "pooping": 1 * 7,           # also could be more or less (G)
        "laundry": 2                # pretty much 2 hours for washing/drying/folding/putting-away clothes for the week (G)
    },
    "digital_entertainment": {
        "gaming": 1 * 7,            # usually don't even play 7 hours of games these days :< (++)
        "watching_videos": 3 * 7,   # usually watch more on YT or streaming. includes social media (--) (unless classic movies)
    },
    "learning_studying": {
        "reading": 1 * 7,           # reading more would be nice (++)
        "learning_japanese": .5 * 7,# would like to spend an hour learning a new language (++)
        "coding_proj": 1 * 7        # would also like to do more of this (++)
    },
}


total_hours_used = 0
total_used_percentage = 0

print("------------------------")
print("Time Map:")
print("------------------------")

for k, v in hours_map.items():
    hrs_sum = sum(v.values())
    total_hours_used += hrs_sum
    percentage = (hrs_sum / hrs_in_week) * 100
    total_used_percentage += percentage
    print(f"[{percentage:.1f}%] {k : <15}: {v} ")

print("------------------------")

print("Time Used:")
print("------------------------")
print(f"[{total_used_percentage:.1f}] % used")
print(f"[{100 - total_used_percentage:.1f}] % left")
print("------------------------")
print()
print("used hrs", total_hours_used, "/", hrs_in_week)
print()

You can take this, modify it to what you spend time on and see what you can change around.

Zsh Git Prompt

- 1 min read

My ZSH Git Prompt

zsh is a great interactive prompt, however it can be a little tough to find solutions that do not rely on plugins or plugin managers like oh-my-zsh.

If you are looking for a portable zsh function for getting git status in your zsh prompt, here is what I am using currently (adapted from my bash git prompt):

https://github.com/lemonase/dotfiles/blob/master/config/zsh/.zshrc#L225-L247

This function gets the git status and branch - greps out a few keywords that I’m interested in and prints out some characters accordingly.