04. November 2019

Creating A Custom Docker Image For Your Drupal Website

Previously I shared how to get started with Docker and Docker Compose to start hosting your own projects, but what if the project you want to host is your own custom code? If you want to host your own code in a Docker Image that means you will need to create your own Docker Image for that. I will discuss how to do this with your own Drupal site, but for all other things you'd want to create a Docker Image for Docker has more than enough documentation out there to help you do it for whatever you'd need.

Into To Dockerfiles

What even is a Dockerfile? A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. It's a plain text file that on each line (called a layer in Docker terminology) is a different command Docker needs to run to build the image.

A very basic Dockerfile example is the following:

FROM ubuntu:18.04
COPY . /app
RUN make /app
CMD python /app/app.py

Each instruction creates one layer:

  • FROM creates a layer from the ubuntu:18.04 Docker image.
  • COPY adds files from your Docker client’s current directory.
  • RUN builds your application with make.
  • CMD specifies what command to run within the container.

On the first line we have a FROM this is important and very useful, you don't need to create everything from scratch but can start with a base and build your image on top of that. The colon 18.04 refers to what tag of Ubuntu we are using, which is a lot of times used to choose a version number or a flavor of the image. So we are starting with Ubuntu version 18.04. Then COPY all files in the current path on our system into the /app path in our image, this is used to take your code and put it into the image. After that we RUN a make command in the /app directory which will build whatever is needed and defined in that makefile. Finally we run CMD which is executing a bash command of python /app/app.py which is starting up our code making it run.

That's a very basic sample but shows you everything you need to build upon making more complicated Dockerfiles. Whenever you're starting see if there is a good base to build upon, if you cannot find one Ubuntu server is probably a decent starting place.

Creating A Dockerfile

Luckily for us trying to build a custom image for Drupal there is a Drupal Docker image that already has everything we need installed to run Drupal. Much like the Ubuntu Image you can use the tag of what version of Drupal you need to run. The image itself doesn't have any code for Drupal in it, it's just a setup server with everything needed to run a Drupal site. Depending on your needs you can probably get away with doing a FROM on Drupal COPY in your files and then CMD apache2-foreground and be done. The Dockerfile I normally run does a little more than that as we found we like to modify the image a little bit more. Our finished Dockerfile is below (Also available as a Gist):

FROM drupal:8.7

RUN apt-get update && apt-get install -y libxml2-dev imagemagick mysql-client --no-install-recommends

RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli

RUN { \
    echo 'memory_limit = 196M'; \
    echo 'display_errors = Off'; \
    echo 'post_max_size = 64M'; \
    echo 'file_uploads = On'; \
    echo 'upload_max_filesize = 64M'; \
    echo 'max_file_uploads = 20'; \
} > /usr/local/etc/php/conf.d/codekoalas-settings.ini

RUN sed -i 's/\/var\/www\/html/\/var\/www\/html\/docroot/g' /etc/apache2/sites-available/000-default.conf

RUN rm -rf /var/www/html/*

COPY ./ /var/www/html

RUN apache2-foreground

What this Dockerfile does layer by layer

  • FROM Drupal:8.7 to get a base server that has PHP and other dependencies needed to run a Drupal site
  • RUN running an apt-get update and install of a couple extra packages we run into needing beyond what the base Drupal image gives us.
  • RUN that command tells Docker to install and enable mysqli, that's needed if you want to run any Drupal or Drush commands on your server ever, the command line needs to know how to talk to mysql.
  • RUN We are creating a php conf file with some settings we like over the default php settings. If you ever need larger file uploads or more memory you could edit this line right here.
  • RUN We are taking the default Apache site conf and changing the path from /var/www/html to /var/www/html/docroot as we build all of our sites in docroot.
  • RUN We are deleting any files currently in /var/www/html as Apache normally gives you a plain index.html and we don't want that.
  • COPY Copying our Drupal site into /var/www/html
  • RUN starting Apache so the site will be served.

Once you have that file created you should run the docker build command locally to test it and see what happens. The Docker Build command will be docker build -t user/project:optionaltag . ran from inside your directory with the Dockerfile. That -t part is you naming your image, like how we are calling drupal in the from layer we need to name our image so we can reference it later when telling Docker to spin it up. After running that command if it doesn't fail you should be good to go!

From there you could move that build off to a pipeline by setting up some pipeline config with your repo or you could create a cron that pulls your repo and rebuilds every so often, whatever works for you. You can see the Dockerfile we run for our Drupal sites at Code Koalas on our Github repo Koality Drupal.

Spinning up your image

In my last post I showed you how to get started with Docker Compose to host your projects. Using that knowledge to get your new site setup using that image your new docker-compose.yaml file will look like the following:

version: '2'
services:
  nginx-proxy:
    container_name: nginx-proxy
    image: jwilder/nginx-proxy:alpine
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - /home/joshfabean/letsencrypt/certs:/etc/nginx/certs
      - /etc/nginx/vhost.d
      - /usr/share/nginx/html
      - ./nginx-proxy/nginx.tmpl:/app/nginx.tmpl
  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: letsencrypt
    volumes_from:
      - nginx-proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /home/joshfabean/letsencrypt/certs:/etc/nginx/certs:rw
  mydrupalsite:
    container_name: mydrupalsite
    image: fabean/mydrupalsite:latest
    environment:
      - VIRTUAL_HOST=mydrupalsite.joshfabean.com
      - LETSENCRYPT_HOST=mydrupalsite.joshfabean.com
      - DATABASE_NAME=default
      - DATABASE_USERNAME=user
      - DATABASE_PASSWORD=user
      - DATABASE_HOST=db
    restart: always
    volumes:
      - ./mydrupalsite:/var/www/html/docroot/sites/default/files

The main thing to notice is on the line for image we put in what we typed in on the docker build command in the -t section. If you have an image with that name locally it will just pull that image, if not it will check other docker registries your are logged into or dockerhub for that image.

Wrapping Up

Building your own docker images isn't that hard and is super powerful. You are now no longer restricted to only hosting pre-built services in Docker but now you can host anything you can dream up in Docker. If you have questions or need more help Docker has great documentation or you can reach out to me on Twitter and hopefully I can point you in the right direction.

23. October 2019

Getting Started with Docker for Self Hosting All The Things

There is no doubt about it, if you're setting up a new server today to run your website or any service really you should be using Docker. The only problem is if you haven't used it before it is a little intimidating. I've been using Docker for the past couple years as in restarting containers and tweaking things here and there but this year I really decided to take the dive and learn all I could. Now that it has "clicked" in my head I wouldn't imagine running servers any other way.

I've found the best way to learn is to take an old computer you have laying around and install Ubuntu Server on it, if you don't have that option you could run something in AWS, a Raspberry PI (won't have the best performance depending on what you're doing) or even run a VM on your computer. I think it's best to have a solution that can be always on so you always have your Docker services running.

The next thing to do is to figure out what you need to run on a server so you have a reason at all to do this. Great resources for finding self hosted software are the Awesome-Selfhosted git repo and I like the /r/selfhosted subreddit. Across my servers I run the following in Docker; Plex, Minecraft, Nextcloud, Gitea, Rocket.Chat, DokuWiki and this website. I run more but those are probably good places to start and things you might interested in running as well.

For this tutorial we will focus on running DokuWiki because it's a singe container already setup that we don't need to build ourselves, we can make it world facing using nginx, give it a SSL with letsencrypt and is something you can do that's useful to store information in an organized matter. All files created in this tutorial are available on this gist.

Configuring your Ubuntu Server

There are many tutorials on how to install Ubuntu, and these days it's so easy you shouldn't need a tutorial, just plug in your USB installer and follow the prompts. After it's installed, now what? For the purposes of this tutorial the only extra things you will need are Docker itself. I personally am not a fan of installing Docker through the Ubuntu setup and running the Snap version of it, but you can if you want, if not you can follow Docker's tutorial on installing Docker. When you're done running docker ps should output the following, showing nothing is currently running.

That image above means you are successfully running Docker, it's just not doing anything yet! Next step is to get Docker Compose installed, which luckily is just a one liner you paste into your terminal and you're good to go.

The only other configuration you need to do is decide where on your server you want all your docker things to live. I put all of my docker things in /opt/docker-compose which is standardized for all my servers so if I SSH into one I know where I need to go. For this tutorial I'll assume that's what you're using but you can put them wherever you'd like.

Creating your Docker Compose file

Docker compose lets you have a YAML file that tells Docker what servers to spin up and what to do with them. This is super useful as YAML is built to be readable to anyone so it's not some new complicated thing you need to learn to manage your servers.

For DockuWiki I did some duckduckgoing for a docker container for DockuWiki and ran into one called ericbarch/dockuwiki which points at a git repo and auto pushes any changes you make back to that git repo, which is exactly what I wanted, so we'll use that.

Before we go too far into setting up DockuWiki there are some base things we will need for our Docker Compose file. We will need nginx-proxy and letsencrypt, which will let us serve up our website and gives it a SSL cert so it's available on https. To get those both running we need the following docker-compose.yaml file which is placed in /opt/docker-compose. It's downloadable as a gist as well.

version: '2'
services:
  nginx-proxy:
    container_name: nginx-proxy
    image: jwilder/nginx-proxy:alpine
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ./letsencrypt/certs:/etc/nginx/certs
      - /etc/nginx/vhost.d
      - /usr/share/nginx/html
  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: letsencrypt
    volumes_from:
      - nginx-proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./letsencrypt/certs:/etc/nginx/certs:rw

That file shows we have two containers running, nginx-proxy and letsencrypt. The volumes are the part you will want to pay attention to as that's mapping files on your local computer into the container. In that file above you can see it mentions the directory letsencrypt and the ./ means it's starting in your current directory that this file lives in. So you will need to create the directory /opt/docker-compose/letsencrypt.

Now that the base of your docker-compose file is in place the next thing is adding the lines needed for DockuWiki. In that repo Eric Barch shows how to spin this up with Docker, but not Docker Compose, that's fine we will learn how to convert it. He says you spin up DockuWiki with this docker command:

docker run -d --restart=always --name=wiki -e SSH_PORT=22 -e SSH_DOMAIN=bitbucket.org -e  REMOTE_URL=git@bitbucket.org:YOUR_BITBUCKET_USERNAME/wiki.git -p  3000:3000 ericbarch/dockuwiki

The fastest way to figure out how this converts is use a website to convert it. Pasting in the code above outputs the following:

version: '3.3'
services:
    dockuwiki:
        restart: always
        container_name: wiki
        environment:
            - SSH_PORT=22
            - SSH_DOMAIN=bitbucket.org
            - 'REMOTE_URL=git@bitbucket.org:YOUR_BITBUCKET_USERNAME/wiki.git'
        ports:
            - '3000:3000'
        image: ericbarch/dockuwiki

In the environment section you will need to change those to all point to your git repo for your wiki. It doesn't have to be bitbucket either that's just what was used in the sample given to us. We also want to add a couple lines to this for nginx-proxy and letsencrypt so we can serve this site and have an SSL cert. In the environment section you will need to add the following lines:

      - VIRTUAL_HOST=mycoolwiki.joshfabean.com
      - VIRTUAL_PORT=3000
      - LETSENCRYPT_HOST=mycoolwiki.joshfabean.com

VIRTUAL_HOST and VIRTUAL_PORT are used by nginx-proxy to know when traffic comes to the server with the domain name of mycoolwiki.joshfabean.com this is the container it needs to go to, and once in the container you need to serve port 3000, which is nice so your users don't need to put the port in their browser. The line LETSENCRYPT_HOST always needs to match your VIRTUAL_HOST or the SSL cert won't work, and this will only work if your domains DNS actually points to this server, or letencrypt won't issue you the cert. Once that section is all modified it should look like the following:

wiki:
    container_name: wiki
    image: ericbarch/dockuwiki
    environment:
      - SSH_PORT=22
      - SSH_DOMAIN=github.com
      - REMOTE_URL=git@github.com:fabean/wiki.git
      - VIRTUAL_HOST=mycoolwiki.joshfabean.com
      - VIRTUAL_PORT=3000
      - LETSENCRYPT_HOST=mycoolwiki.joshfabean.com
    ports:
      - "3000"
    restart: always

So all together your file should look like this:

version: '2'
services:
  nginx-proxy:
    container_name: nginx-proxy
    image: jwilder/nginx-proxy:alpine
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ./letsencrypt/certs:/etc/nginx/certs
      - /etc/nginx/vhost.d
      - /usr/share/nginx/html
  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: letsencrypt
    volumes_from:
      - nginx-proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./letsencrypt/certs:/etc/nginx/certs:rw
  wiki:
    container_name: wiki
    image: ericbarch/dockuwiki
    environment:
      - SSH_PORT=22
      - SSH_DOMAIN=git.joshfabean.com
      - REMOTE_URL=git@git.joshfabean.com:fabean/Wiki.git
      - VIRTUAL_HOST=mycoolwiki.joshfabean.com
      - VIRTUAL_PORT=3000
      - LETSENCRYPT_HOST=mycoolwiki.joshfabean.com
    ports:
      - "3000"
    expose:
      - "3000"
    restart: always

Alright, you have your final docker-compose.yaml file almost done! Now from the directory /opt/docker-compose we need to tell docker to start all the containers. To do that run docker-compose up -d that tells docker-compose to read the docker-compose.yaml and up all those containers, the -d means to do it detached so if you close your terminal it keeps running.

Generally right here you'd be done, but because the DockuWiki server we're running needs full right access to a git repo you need to get it's SSH key and add it to your github/gitlab/bitbucker/gitea account. To do that we need to view the servers logs, as that's were it's telling you what's wrong. To view the logs you type docker logs wiki that works because wiki is the container name, you will see something like this:

From there copy the SSH key printed add it to your account, then you should see the logs change saying it connected and it's setting up your wiki. After that go to your website and things should be good!

Conclusion

You have now, spun up a Ubuntu Server, installed Docker, configured your docker server, and got a Wiki website up and running! With docker the possibilities of what services and sites you can start hosting yourself are endless, you really need to look no further that Awesome Selfhosted Repo I posted earlier to see what types of things you might be interested in hosting. Next steps might be compiling your own Docker containers, spinning up a private Chat server for you and your friends, or getting a Plex or Jellyfin server setup to more easily watch your TV Shows and Movies you have.

I hope this helped you get your feet wet with servers, if this inspired you or you run into issues or have questions feel free to reach out to me on Twitter @joshfabean.

25. August 2019

Using Linux as a Fulltime Drupal Developer

I'm a full time Drupal developer at Code Koalas a mostly Drupal shop based out of Kansas City, and I use Linux as my full time desktop environment. I started playing with Linux as early as 2008 when I download Ubuntu 8.04 Hardy Heron to get away from Windows Vista on my desktop computer that wasn't good enough to properly run Vista. I had also installed it on some old laptops for fun or friends and obviously had and used many Linux servers for work and fun but it never stuck for my desktop until 2017 when I installed Arch Linux on my work laptop a 2015 MacBook Pro. No this isn't simply a "I use Arch BTW" post, though I do use Arch and suggest that or Manjaro for people over Ubuntu for reasons, I hope to show the reasons I choose Linux in the first place and why it's still what I use today.

A Better Window Manager

On Mac windows just float wherever they like, and though I am a fan of their multiple spaces and swiping between them there is always just a mess of windows everywhere. For work I at a minimum always have at least have the following open; Firefox, Slack, a terminal, and PHPStorm. In that I might have multiple tabs and windows of both Firefox and the terminal open. So I'm at a minimum of four windows but probably more like six plus. I don't like using Apple's full screen mode (not sure why, I'm just picky) but my programs are pretty much always full screened. So I was having to use gestures all the time swiping every which way to get to the window I wasted to keep working.

I started using Phoenix which is an i3 like Window manager for Mac to give you keyboard shortcuts to move windows and make them sticky, it worked but wasn't exactly what I needed. I didn't want something like i3 that is a hack on top of Mac's window manager I just wanted i3.

So Why i3?

Mostly I decided I needed a Tiling Window Manager. A Tiling Window Manager is a window manager with an organization of the screen into mutually non-overlapping frames, as opposed to the more popular approach of coordinate-based stacking of overlapping objects. That means that windows never overlap each other, they all get their own place on the screen in a nice orderly way. I choose i3 over some of the other window managers because I knew someone with that and they were willing to share their config with me.

With i3 I was now able to press a command to open Rofi and open any program I wanted (Think Macs Spotlight), press a key combination to move a window to a different screen or workspace, have windows always fall into the place I expected them to, and press a key combination to move workspaces. Now I can work mostly with my hands staying on my keyboard and I don't have to click around all day and swipe my fingers to find the windows I want. If you too would like to get started with i3 you can take a peak at my dotfiles repo with my config in it.

I have now switched away from i3 to Sway for reasons but Sway aims to be a drop in replacement for i3 so configs can be shared but it out of the box does a lot of things nicer and runs on Wayland instead of X.

Faster Local Development

Like a lot of people in 2019 we run all of our sites on Docker, and have been for the past couple years. Docker is great and has made my life so much easier. At Code Koalas we don't just run Docker on our servers for live sites we also run those same Docker containers locally to build our sites. The great thing about this is that everyone is running the same version of PHP and has things setup the way that the stage and prod environments do. The bad thing about this is Docker for both Windows and Mac is terribly slow and buggy. Docker is meant to run on Linux servers so it runs best there and everywhere else it works but not well. Running Linux as my desktop computer means that I have the same great version of Docker running millions of services on my computer running my local sites.

Many coworkers message me asking "do you know what this container error means" with their local containers getting blown up. I'm not going to say I never have had issues but I know I haven't even had 1/10th the amount of Docker issues people on Macs have had.

How much faster?

This isn't a super scientific answer with rigorous testing but on my 2015 MacBook Pro clearing the cache on a Drupal site while on linux generally takes around one minute to around a minute and fifteen seconds. A coworker using the same model MacBook Pro but on Mac takes over three minutes to clear the cache. This is us using the time command in terminal before our drupal cr all command, and ran multiple times so in our testing Docker on Linux in three times as fast. Now that I upgraded to a custom build desktop computer at work running Linux my cache clears and 15 - 20 seconds.

Made Me A Better Dev

One of the great things about using Arch Linux and Sway is that I'm in the terminal a lot to manage a lot of computer services. Yes there are GUI for a lot of things but I personally prefer the terminal and when I'm managing remote servers all I have is a terminal anyways. I'm now way more comfortable poking around on servers trying to figure out what went wrong with them or turning on extra PHP extensions that we are missing. I now can tar a directory without having to look it up online. I also now look at the git repos of most projects I use on my computer and have seen at least a little bit of the code that goes into making the software I use daily work.

There isn't one specific thing I can point to with using Linux that made me the developer I am today but since I made the switch I'm way more knowledgeable than I used to be.

Is it really all good? Short answer no

Nothing is perfect, not every part of using Linux has been easy and great. Yes I have bricked my computer before, but I also did that on my Mac with a bad regex find and replace. Yes an update made a certain program not open anymore or function at all, but a Windows update made people lose all their info in their User folders.

The only real issue I have is I cannot use Adobe products, there have been hacks in the past that make them work but none seem to work right now. To me it's not that big a deal because when a client gives us designs in Photoshop I can always look at a JPG preview of it for general ideas and either open it or my old MacBook Pro or open it in a VM on my main computer. It's not a great solution but it's a small part of my job and Linux made the main part of my job way better so it works out. No GIMP is not the solution, I don't make the designs I open them and GIMP, though it's great, doesn't always render them right so I then build things that aren't actually part of the design but a GIMP mess up.

Conclusion

Is Linux for everyone? YES, I mean no, err maybe? Linux has been great for me and I'm not leaving anytime soon but I understand why some people don't make the jump. If you have every been curious or are finally getting frustrated on Windows or Mac give Linux a try, you might just like it enough to stay.

04. August 2019

Weeknotes #6

It's been a hot minute or two since I've updated things here, life is busy sometimes.

I added two new pages to the site, one of games I've played and whether I recommend the game or not, and one of ongoing projects I'm working on. Nothing complicated yet or even completely filled out but it expands my site beyond just random blogs.

[Quick Life Things]

  • †My van broke, then I fixed it, then it broke again in a different and worse way. (currently still broken)
  • Started building a divider wall in my garage to move my home office in there so the baby can take my office room.

[Play]

Throw Throw Burrito this game is great! It's easy to learn and fun to play. It's a fast pace match making card game, where sometimes people throw burritos at each other. We played at work and it resulted in people running and jumping over couches throwing burritos at each other.

Trogdor!! The Board Game that came in last week, I've only played it once but it was pretty fun and cooperative.

Ravine this is a card game I backed on Kickstarter awhile ago but just started playing in a last two months. It's actually really fun. One complaint would be sometimes the games are super hard and sometimes they're easy. You are supposed to control how hard the game is by how many nights minimum you need to survive but it's really just the luck of the draw pile. I've played games were most of us died by night 5 and another game where we lasted 16 nights all with full health.

Superhot VR I've played this before at a friend's house but recently just picked up an Oculus Rift S second hard for a good price. This game is what sold me on VR, this style of game I think is perfect for VR.

[Try]

Path Redirect Import this is an easy and small thing. In Drupal sites we do 301 redirects all the time, never thought about bulk importing them because normally we handle them through a htaccess or the client does them as needed. Recently I needed to add 50+ redirects to a site and editing the htaccess wasn't an option, I stumbled upon this module so now we're using it.

Control your Android Phone from your computer with scrcpy I haven't actually tried this but it seems like a cool way to use your Android phone from your computer.

Desktop Color picker for Linux: Farge I started using this color picker the other week it does what it needs to without being overly complicated or fancy.

[Read]

VS Code for PHP Development it's good to see ways to make editors beyond PHPStorm good for PHP dev, I personally use PHPStorm but I wouldn't say I'm satisfied or would recommend it to others, PHPStorm works.

No CS Degree as a person without a CS degree it's cool to read about how other people without degrees are doing in tech.

What's new in ES2019 it's good to keep up with new things in JS land, but when I can use ES6 without babel, what's what I want to know.

13. July 2019

Weeknotes #5

Last week was the 4th of July, we had family in town to celebrate and to see our baby. Due to that I missed last week as there was just too many things to do and a lot of time spent with family.

This week at work I was able to spend a good amount of time building new layouts and blocks for a site in Layout Builder. I also continued working on the date repeat update for a site and built out a First/Last date formatter. Hopefully it starts working good enough that I can share it back with people as it seems quite useful.

I crashed my Grom

It seems like I have bruised by ankle bone, maybe sprained my knee and shoulder. But WAY better than last time I crashed my bike a couple years ago and this time I was hit which was weird. Basically people shouldn't be aloud to drive. Someone was in the right turn lane of an intersection stopped, I was needing to drive through that intersection so I was in the non turning lane to the left of them. Then I guess they decided they wanted to go straight too and turned right into my lane right in front of me. I slammed on my brakes hit them and fell over. Then they drove away. I'm very lucky to walk away from that accident mostly unhurt. The next day I was walking around and mostly able to live my life except I have a slight limp and I'm sore.

[Try]

Lazydocker this is a TUI (terminal User Interface) for all your docker containers running or not. I opened this and found gigs of old containers and things unneeded that I was able to remove. I also am just a sucker for TUIs so if you know of any other good ones let me know.

Layout Builder Modal at CK we user Layout Builder now for all landing page things but one of the terrible things about it is you do everything in a 300px wide sidebar. This modal module lets you do the same things but in a modal. Normally I'm a modal hater but this is a pretty good use case for them.

[Read]

First letter pseudo element & Making responsive tables with minimal CSS this week I came across Bradley Taunt's website and he has some really good frontend tutorials these were just two of the ones that showed me new things I didn't know.

Intro Guide to Dockerfile Best Practices I use Docker all day everyday and this was a good refresher for what makes a good Dockerfile.

The death watch for the X Window System (aka X11) has probably started as a user of Wayland this is both good to read. I am looking forward to more things working properly under Wayland by default. Now if only we could get rid of Qt...

A better zip bomb cool to learn how zip bombs work and really just how unzip tool work. Be careful with that file though, I sent it as a joke in my company Slack and someone tried opening it.

30. June 2019

Weeknotes #4

This was a good week, got a lot done at work and even had enough time to mow my lawn. Summer has finally arrived in Kansas City just in time for the AC to die on my wife's van, so that made this week hotter than I would have liked. Next week is 4th of July so I have family coming into town and we're going to watch things blow up and eat grill food, it will be great!

Due to my wife being sick I worked form home on Monday to help take care of our baby while she slept. The weird thing is that may have been my most productive day of work, I got a solid 9 hours in all with minimal interruptions. I really like my office and going to work but it is really that strange that alone in a room I'm able to get more done because I can think for a least an hour at a time without interruptions. This is good news because at Code Koalas we're starting first Friday's of the month as work from home days.

I was able to get a Drupal 8 site mirroring over to Patheon with a custom pipeline. It took longer than I would have wanted but in the end it's not too complicated. Pantheon make you track all composer downloaded files if you're not using circleci, I refuse to track all my composer files because I'm not an animal. I created a pipeline that replaces the gitignore with a pantheon gitignore then composer installs and git adds and pushed up to Pantheon. We had to use an approach like that because we already have auto deploying docker containers for this site locally and on our staging, but the client ultimately wants to deploy on Pantheon. The goal was to keep our normal workflow while still using Pantheon and I believe I accomplished that.

I accidentally nuked my Desktop Arch Linux computer and had to reset everything. I recently moved from nvm to n to manage node on my laptop, and decided I wanted to move that setup to my desktop computer as well. For some reason node loves to save files in root system directories, and so does n. It wanted access to /usr/local/n I believe so I created that and chmod that but accidentally ran that just on /usr/local. Right away nothing was broken but I knew bad things had happened, then about a hour later I realized I could no longer sudo things. I tried just booting from a flash drive and changing back permissions but after a couple failed attempts I decided to just start over on this computer. A hour or two later it was up and running and good to go. I'm impressed with how quickly I got things back working, and now I know I don't have filler things I don't use anymore taking up space. This is why it's nice to have you dotfiles backed up and I've been creating a private wiki for my life which includes all the random things I run on my computer so I could easily grab those and install them.

[Try]

I mentioned Gutenberg for Drupal last week, I tried it and so should you. I put it up on my blog (this right here) and was blown away with how great it is! We spend so much time trying to add plugins and change settings in ckeditor to make it work right for our users where with Gutenberg I clicked install and enabled it for the Blog content type and I was done. So seriously try it if you haven't, I'm writing this blog right now in Gutenberg.

[Read]

$499 AMD Ryzen 9 3900X Almost as Fast as $2000 Intel Core i9-9980XE this is really good news for anyone wanting a new computer some day, you don't need that crazy AMD Ryzen 9 3900X but because it's 1/4 the price that means Intel will need to do something to still be competitive. Hopefully bringing all prices down or making an even better processor. I personally am wanting to build a new computer using a Ryzen, but this computer I'm typing on is only two years old, runs perfect and all Intel based so too big of an upgrade.

The Toyota Way this was a fun read to see what Toyota does to stay so good. The best car I ever owned was my 2003 Toyota MR2 and I miss it everyday.

HTTP Cats and IP Kittens fun ways to put more cats on the internet.

Hey advertisers, track THIS a project from Firefox that spams all the tracking scripts watching you with tons of fake data to "confuse" them. Unsure if this actually works as they have years of data on you, how much does one day move the needle on this?

HTML is the Web good read about how HTML is fundamental to the web and a lot of people seem to not care to learn it. I learned HTML first back in 2004 (I think) and it's pretty simple and all made sense to me, so it's weird than newer people and just learning React or a framework and not the language that makes the internet. But then again do people say that about me writing websites in PHP instead of learning Assembly?

Raspberry Pi 4 is released! and What do you do with your Pi? A new Pi is released that goes up to 4GB of RAM, this is great but also what is there to even do with a Pi? I think with the 4GB and dual monitor capabilities of this newest one you could seriously make it your kids computer. I had already told my wife that when our kids are old enough I'm making them build a Pi if they want to have or use a computer. I want them to understand what computers are and not just be addicted to phones like so many young kids today.

Why you need to give Firefox a chance Chrome/Google have a monopoly on the internet, Firefox is really the only Browser fighting for us to keep the web standards open and not controlled by one company. I have used Firefox on and off since it's been out, I've currently been using to for I think the last two years when the rewrote the render engine making it much faster than it used to be.

23. June 2019

Weeknotes #3

This week at work was really good. I mostly got to work on building out new features on a new Drupal 8 site we're building using Layout Builder. It's always nice to be building out features trying new things instead of digging through piles of old code trying to fix little bugs. One of the things I need to start doing is rewrite an event calendar written in D8 to actually use repeating date fields to allow for the calendar search feature to work as intended, won't be fun.

Recently the Gutenberg editor for Drupal became stable, I don't think it will replace with Layout Builder does but I'm going to try it for this site for blogs and see how much better it makes it.

This week I finally got in my new tires for my Honda Express, I got those mounted on, filled with air and actually rode it for a couple minutes yesterday, currently the max speed is 24mph so either there's an issue with the carb or possibly a blockage in the exhaust that I'll have to start working on soon.

Honda Express Moped with fresh tires
New tires mounted on the Honda Express.

Yesterday I got to go my first Royal's game of the year, we really wanted to bring Phineas but because the temperature was over 90 and very humid we left him at home. It was a fun game even though like always the Royals did lose, we got to see a good game that was close until the 10th inning. They were really good seats and thanks to a very nice client of ours.

Kansas City Royals Game

[Games]

For my weekly game night we got together and played Scythe again. I've owned the game since the Kickstarter a couple years ago, but I've only played it a handful of times. I'd rate the game probably 9/10, not sure what I'd improve my main complaint is there are so many moving parts it takes awhile to get new people into the game. That's the main reason I've only played it a couple times. My favorite part of the game is there isn't dice rolling and you cannot make the same move twice in a row so it's all strategy. Nathan beat me, which is unfortunate but fun nonetheless.

Scythe Board Game

Next week at Code Koalas we're hosting an external Mandatory Fun game night on Thursday. If you live in the KC area you should come by there will be games and good company. It's our first formal external mandatory fun game nights so hopefully it's good.

This week I also picked up Hollow Knight for Nintendo Switch this week, so far my impressions are it's a very fun game and hard. I'm currently lost off the left side of the map and I'm not sure how to get back onto the map. I'm also picking back up Golf Story to see if I can complete that game, it's one of the more fun "sports" games I've played in awhile.

[Read]

Google Calendar went down this week. That's the second service to go down in two weeks I think, not that it means that Google is going down or anything like that but it's always a good time to reevaluate whether or not you need to use a service like Google for your calendar or if a self hosted option would be better. Disclaimer I use Google Calendar for personal and work.

The worst morale-boosting gesture I've experienced. This is just a great read about how out of touch the higher-ups were while trying to cheer up their team.

The CIA Spied on People Through Their Smart TVs, Leaked Documents Reveal. and Samsung TVs should be regularly virus-checked, the company says. I've never been a huge fan of smart TVs. I'm a fan of a dumb TV with a box plugged into it, as I've never used a smart TV that didn't completely suck. I do currently own a TCL TV with a Roku built in, and I think the TVs with Android TV built in are a good idea, not sure if they will end up having the same security issues or not as they're separate systems.

15. June 2019

Weeknotes #2

This week really blew by, so did last week which would be why I missed that update, oh well. The coolest thing I did was over the weekend picked up a 1980 Honda Express II which is a little moped.

Honda Express 2

Bought it as a non running scooter that has sat for a couple years. I drained the fuel, cleaned the carburetor, replaced the battery and spark plug and got it running. Now I'm just trying to find tires that fit which seems to be a harder task then it should be.

At work I interviewed a couple developers and held reviews and one of ones for a couple of our existing developers. During interviews I've started asking critical thinking questions instead of asking questions of like "how do you do X in PHP". It will take me hiring people to find out if this really works or not.

[Try]

Aerc - terminal email client. For awhile I've been trying to use Mutt as my email client when teaming that up with offlineimap. It mostly worked and was nicer than other email clients. I most recently switch to using Claws Mail because it works. In steps Aerc

[Read]

Crucial Conversations Read this book for work, 8/10. Good book with good information but couple be cut easily in half or more and still be as useful. Talks about how to keep your cool and have meaningful crucial conversations when your brain wants to shut down and lash out at the person who just called you out in a meeting or wherever.

Matrix 1.0 released. I tried getting a Matrix server setup a couple months ago as a chat server but had issues getting it connecting to the federation. With the 1.0 release I'm willing to try it again. The main thing I want to try is the 3rd party bridges to connect multiple services. I would be running Matrix server and one app to connect Slack, Rocket.Chat, text messages and others which would be really cool.

Always own your platform. Been big on this for awhile, as Facebook and YouTube start removing people because they don't like them the fear is always what if one day you find that they've moved what was acceptable and now you're outside of that? Now you're out and you've lost all of the reach you had.

Open source seed initiative. Never realized seeds weren't open sourced, which once I thought about it of course companies own the seeds, this is cool because dooms day type of thinking we could run out of seeds and all die without something like this.

Nintendo killed it at E3 this year. Really existed to play Super Mario Maker 2, never played the first one but when I got a Switch and realized the first version existed I've been wanting that game on Switch which I now get.

 

01. June 2019

01. June 2019

Weeknotes #1

Wanted to start writing weekly recaps of the week, I heard about Dave Rupert doing that on an episode of Shop Talk Show. The thought is to get small news items and links to cool things out that don't need a full long write up. Hopefully this gets me updating content more frequently and makes me better at writing.

This week was a rough week with the holiday on Monday then Flyover Camp on Friday and Saturday so easy to realize not much work got done around the office in the three days of work we had. That's unfortunate because we are now quickly approaching a couple different deadlines at work.

Flyover Camp which was a Drupal specific camp in Kansas City was a lot of fun. At Code Koalas we sponsored the event and sent all our devs to it. It was a lot of fun and we learned a lot, you can view all of the sessions now on YouTube. To me camps are better than conference because they're smaller and you get to actually people in the Drupal community, also they're shorter so your brain gets less fried. One thing that happens at every camp and conference is after parties, and this after party was probably the best one I ever went to! We went to Pawn & Pint which is a local bar that has walls of board / party games so you go there and play games with friends over a drink and some food.

D&D Oneshot

At the after party we playing a D&D one shot with a couple people from work and some from the conference. It was my first one shot and it was a log of fun. We defeated and bag guys with no deaths of our own which is good.