jarv.org

  • Ensuring a consistent PID in a container

    Recently a challenge was added that asks you to identify a process and kill it. This was a new type of exercise that requires a running process in the docker container where all commands are run. This itself wasn’t really an issue except that with caching, it requires that the state of the container to be identical from one run to the next. PIDs however, are not so predictable, even when you only have a very small wrapper.

    Read more…
  • Cat without cat on the commandline

    Say you want to display the contents of a file on the command line. The first tool we most of us reach for is cat, which does a fine job at just this. But what happens when you are on a Linux machine and when you try to cat a file this happens: $ cat file.txt -bash: cat: command not found or even: $ cat file.txt bash: fork: retry: No child processes This post explores this idea and was a feature of this challenge where you needed to display a file’s contents without using any utility outside of the shell.

    Read more…
  • Switching to Hugo

    Hello world from the new blog using Hugo as the static site generator. After cutting away the cruft from the old one, which used Pelican as a static site generator, I decided to make a switch on a lazy Sunday. I definitely think the design is much nicer and site generation is much faster! There is a great selection of themes, this one uses the kiera which is exactly what I wanted for a layout that doesn’t have too many bells and whistles.

    Read more…
  • Understanding shell redirection

    When I was learning to use the shell for the first time I remember teaching myself to do things as I ran into problems, and the first problem I ran into was how to take the output of one command and write it to a file or pipe it a second command. So like most people, I learned: cmd1 | cmd2 to take the output of cmd1 and send it to cmd2, and

    Read more…
  • A new new new blog

    Yeah it’s another blog update, just really some style updates and looking back at something I did a long time ago and say what the heck was I thinking?. I don’t know, I think things that I don’t have time to spend up usually end up being a craptastic design by copy-and-paste. Anyway, still using Pelican but upgraded to Python3 and fixed the CI configuration a bit. Got rid of the bourbon/{sass,neat} mixins because that was so 2013.

    Read more…
  • Never use git submodules

    I’m writing this as a reminder to my future self never to use git submodules. For most things I would say never say never but let’s make an exception for this one. I’ve used submodules for the following reasons: There is some logical separation or a clear defined interfaces between two things, and repos are cheap There is a 1 to many (usually 2 or 3) relationship between this thing (that has stable interface) and something else The problem is that this 1-to-many thing usually starts as 1-to-2 and usually doesn’t go much further than that.

    Read more…
  • The stages of a side project

    One experience of mine, though it has roughly mapped to previous side projects: Wow this thing that has no business model is a cool idea, I wonder if anyone has done it before? This is fun, let’s spend an evening hacking on it Wow this is taking way more time than I thought it would … Can I do this without spending any money? Let’s use AWS free tier to get this going OK let’s ship this thing, wow it’s getting a lot of attention!

    Read more…
  • Using GitLab CICD for your static blog

    In the process of making all of my private repositories public on Github and moving off of GitHub pages I have also decided to move most of my repos over to GitLab. One reason is that setting up a CICD pipeline makes it extremely easy to publish these posts automatically. This in combination with GitLab’s web IDE makes minor changes a little bit easier to make. CICD piplines in GitLab are controlled with a single file, .

    Read more…
  • Removing all of my private repos from GitHub

    Today I decided to remove all private repositories from GitHub. Why? Interesting that having private repositories generally meant that I was not being as careful about managing secrets properly. Checking in API tokens, keys and especially cloud tokens into git never a good idea and looking through some of my old private repos I was doing exactly that. So for others who are interested in going from a developer GitHub account back to free I highly recommend doing it!

    Read more…
  • Building cmdchallenge using Lambda and API Gateway in the AWS free-tier with Docker and Go

    Have you ever thought about building a side-project for fun without spending a lot on hosting? This post might be for you. With the most tech-buzz-wordy title I could conjure up here is a quick overview of how cmdchallenge.com is built. The site is a simple web application side-project that executes shell commands remotely in a docker container in AWS. The front-end gives the feeling of a normal terminal but underneath it is sending whatever commands you give it remotely on an EC2 instance inside a Docker container.

    Read more…