Skip to content

Instantly share code, notes, and snippets.

View johnhof's full-sized avatar

John Hofrichter johnhof

View GitHub Profile

Prompt

Create a golang in-momory key/value store.

Parameters

Any coding tools, googling, etc are allowed. Best practices can be skipped as long as theyre called out when they occur.

Data Format

@johnhof
johnhof / go_project_challenge.md
Last active March 22, 2024 20:43
A short golang coding challenge prompt

Prompt

Create a golang http server for storing unstructured objects by ID.

Parameters

Any coding tools, googling, etc are allowed. Best practices can be skipped as long as theyre called out when they occur.

Data Format

SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --no-builtin-rules
.PHONY: help
help: ## Lists targets and their descriptions
@##grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | cut -d: -f2- | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

Keybase proof

I hereby claim:

  • I am johnhof on github.
  • I am johnhof (https://keybase.io/johnhof) on keybase.
  • I have a public key ASC5vLgybiCAaWF5-bwDFYnPBo0zn-nVvAaYW7HT119uPwo

To claim this, I am signing this object:

@johnhof
johnhof / satan.sh
Last active March 22, 2023 16:44
19 lines of hatred spat from the keyboard of lucifer himself. Proceed with caution, the resulting rage will consume a lesser man
sudo() {
local TODAY = $(date + % Y % m % d);
local SECONDS = $(date + % s);
local PERSON = $(env - i whoami);
if [$TODAY - ge 20140502];#
fails after a specifed date#
if [$(($SECONDS % 2)) - ge 1];#
fails on odd numbered seconds#
if [$(($TODAY % 2)) - ge 1];#
fails every other day