Go Methods on Values and Pointers

TLDR: I was surprised by the behavior of a method on a value. Should have used a method on a pointer instead. This story starts when I was attempting to put together a simple web application using go. I was following the, what I believe to be good, recommendation of Alex Edwards on Organizing Database Access and was using dependency injection to provide some initialized resources to all my request handlers. [Read More]

Ship it: ctfdfetch edition

Today I wrote and shipped ctfdfetch a simple python tool to “fetch” challenges from any CTFd hosted CTF. The code is on gitlab and pypi. This means downloading all the challenges for a CTF locally can be as simple as: pip3 install ctfdfetch ctfdfetch --server https://ctf.example.com --user hacker Most of the code I was familiar with such as requests and beautiful soup, so probably the biggest thing I learned was how to package everything up. [Read More]

Back at it

Been a couple of days… apparently more like 193… well, not to be deterred I’m going to try this again. Tonight I am hacking on a CTFtime stats application. CTFtime is “All about CTF (Capture the Flag)”. It is the defacto scoreboard aggregator for all the wonderful CTFs that occur each week. They actually have been doing it for some time (since 2011) so there is a lot of really great data there. [Read More]

Ansible Strikes Back

All Kinds of cool solutions today: Alternative Today I Learned. https://til.hashrocket.com/ Aside from just looking really slick, one really nice thing about this is that each post is limited to 200 words. I may adopt that here because some of these have grown to prodigious, if not quite novel lengths. Ansible FTW The other day I dove way into some bash foo. Turns out that was all unnecessary now that I know about the raw and script modules for ansible. [Read More]

Git Submodules

Over the last few days I have run into a number of issues using git submodules. Perhaps mostly user error on my part. Overall if its just a project I am working on than I think its a reasonable amount of complexity to introduce, but otherwise in particular when working with a team that is relatively new to git they are probably not the answer. Here are some links and notes. [Read More]

Bash + Git

A tale in two parts today. Quick bash admin and git woes. Bash Admin Today I was faced with a real sysadmin task. I had 32 nodes I needed to configure all with just a bare bones Ubuntu install. Typically I fallback on ansible as my provisioning and configuration tool of choice. Unfortunately the machines did not even have python installed so we couldn’t jump right there. To make matters worse, the single user on the machine was not configured with an ssh key, so password based authentication was all that was available. [Read More]

Github Pages

Today I learned about GitHub Pages. This was similar in many ways to when I learned about Gitlab Page but there where some differences. The most substantive are: No integrated CI requires a manual deploy step More complex HTTPS setup The guide I followed for SSL was the aptly named Secure and fast GitHub Pages with CloudFlare. The guide I followed for hugo was also appropriately Host on GitHub and in particular the organization pages portion. [Read More]

Hugo Content Layout

Today I worked on another static site and learned more about Hugo’s content management organization. Specifically, I learned much more about the distinction between sections, types, and taxomonies. These concepts are all related, and can all produce aggregate lists, but have very different degrees and mechanisms to configure. sections are opinionated, unchangeable, attributes that are determined by where a file is placed. Seemingly the documentation indicates they are the top level directories under content, however there does appear to be some support for nested sections, including an open issue related to their documentation. [Read More]

Outlook + http.Client

First day back at work since the new baby, so it will be interesting to see how this log changes when I am not just doing hobby projects. Outlook Unfortunately, it wouldn’t be a true work day if it didn’t involve digging out from under a pile of emails. In the spirit of efficiency I looked up some hotkeys and lo and behold (courtesy of lifewire, you can move a message to a folder with: [Read More]

Webpack + CORS

webpack Today I learned about webpack, a way to “bundle your site”. As I would summarize it webpack allows you to write your web application across multiple files, with multiple dependencies, and it takes care of resolving (and bundling) everything into a functional output that can be served. I had heard of webpack before but specifically came across it while reading the Vue.js tooling documentation. One thing that was really helpful to wrap my head around webpack’s functionality was the Concepts documentation. [Read More]