Skip to content

Instantly share code, notes, and snippets.

View hbjydev's full-sized avatar
🇺🇦
Слава Україні!

Hayden hbjydev

🇺🇦
Слава Україні!
View GitHub Profile
@hbjydev
hbjydev / flake.nix
Last active April 26, 2024 22:03
Run `nix build .#caddy` against this to generate a Caddy binary using xcaddy with whatever plugins you've specified built in.
{
inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = ["x86_64-linux"];
perSystem = { pkgs, ... }: {
packages.caddy = pkgs.callPackage ./pkg.nix {};
};
};
package tmp
import (
"context"
"encoding/json"
"fmt"
"os"
"reflect"
"github.com/go-kit/log"
nixBuildCmd := "nix build --json --print-build-logs"
build profile='default':
{{nixBuildCmd}} '.#{{profile}}'
build-remote host system profile='default':
{{nixBuildCmd}} --remote-host '{{host}}' --system='{{system}}' '.#{{profile}}'
export const Base = ({ children }) => (
<div className="something">
This is my base
<NavLinks />
{children}
<Footer />
</div>
);
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/master/schema.json",
"basics": {
"name": "Hayden Young",
"label": "Senior Code Janitor, also DevOps Engineer",
"summary": "I love working with all things DevOps, from automation and software engineering to full-on platform engineering. I’m a huge advocate for making things self-service and as reproducible as possible. My goal as an engineer, and the reason for my advocacy for DevOps, is developer enablement. Being blocked because the configuration needs updating to work with the latest OS or web server, or because the other service we need has gone offline, is never fun. Good DevOps culture can help alleiviate that issue, and that's why I've chosen to build a career in it.\n\nAlso I cannot stand Python. Why are anti-patterns in most languages called \"Pythonic\" in Python circles?",
"website": "https://hbjy.dev",
"email": "hayden@hbjy.dev",
"location": {
"city": "Sheffield",
@hbjydev
hbjydev / zk
Last active May 15, 2022 17:04
zk - zettelkasten management script (requires ripgrep, neovim, bat and fzf)
#!/bin/bash
set -e
function zk_dir() {
if [[ ! -d $HOME/zet ]]; then
mkdir $HOME/zet
fi
}
function zk_id() {

Keybase proof

I hereby claim:

  • I am hbjydev on github.
  • I am hbjy (https://keybase.io/hbjy) on keybase.
  • I have a public key ASAt6wXWQ5WwUTKtHLy6S1j-hf9XsY3yuvxUZw4WOdlKmgo

To claim this, I am signing this object:

#!/bin/bash
# Sudo alias
alias s="sudo"
# systemd-related
alias log="sudo journalctl --output cat -u"
alias log-previous-boot="sudo journalctl --boot=-1"
# Monitoring & process control
@hbjydev
hbjydev / motd.j2
Created January 1, 2021 22:50
server-motd
=====[ THIS SERVER IS MANAGED WITH ANSIBLE ]=====
_ __ _
|_| / \_/ | \ |__ |\| \_/ /-\ | | |\| | _
| | /-\ / |_/ |__ | | / \-/ \_/ | | |_|
=================================================
{{ inventory_hostname }}
├─ type: {% if ansible_virtualization_role == 'host' -%} Physical Host {% else -%} {{ ansible_virtualization_type }} guest VM {% endif %}
@hbjydev
hbjydev / t.txt
Created December 28, 2020 21:12
It works!!
curl -L https://api.github.com/repos/rocky-linux/rockylinux.org/pulls/135/commits | jq --nul-output .[].commit.message - | xargs -0 -I _ sh -c 'echo "_" > /tmp/cmsg | pre-commit run --hook-stage commit-msg --commit-msg-filename /tmp/cmsg; rm /tmp/cmsg'