Skip to content

Instantly share code, notes, and snippets.

View Faheetah's full-sized avatar

William Normand Faheetah

View GitHub Profile
!WA:2!nE12VTT1zCRi0LAUUgBvxxKwJgnN5mhVmJAHM0HHGTkQiv7bvlhk54SlDshsEK4jHIK5qsBlVRwlRZd7gM2wgW6awNWUV(WMYgWU)G)l4dcd7Tou432R5H92U8DiPSvTzCTFG(Wd)oFx)9778Pe3iLR6LNpZcZF5untPNsFNfKBWT3q(ALwB59uT56uUmr726CBhNXKnzBTfHRNUITTPhZPpX3ZWMxYXJzB5kXBvQEDxQ3IV4MVY)8TgzKr6rS0WVVInZYtnx(LRKxPBDFtZCmUMjTMIRdrJ(iCIwW5VIIRhH7jjZSyEsQ1X)5Ai12JZA0GYDF6lWJw(QD1PQ(1RxPLdLVy(IRuy1IYE4lkeFojtBxhQP5s6Us756RsxNA5vgLMTzVQ5YwUs1YvYQur2hnIQJjPfLRyrAsDLucevDrkX0Zy)JUcNIhvP8k5lwSJVvKli1tZ20VPvzreK8by8r5weZBG(jgk3VJl1SEqyNPsPvuiMSgwWOCm(ehorxu5k0gbjTon4m91y6EgVBztBIEbzx2w0jvA6Jzyjzmw0Me(askAMexxXkvpIj6xIL9vJkn5SnT5FSKjtUsYNB(l3HW1ksTA4zC3j5elwtIh1OxyXmuYejsKuXvdvuYUAuHZlYLtxurnukJUH)pVEdQZ4LVJpHttxaRCPxZG5r7YdCEXz2vVfM9yAiOX3j6uLXa4rKDT5EYw2wuftwtM3fZ4Z0798SgQRDLL9ZoBHoHEgQNRaVNcWeWv3LsCPL94bU(P7RJftXNRkkTCxQMTLUBBHmcddxvUjHzfCqi7PbzihCnC5zo8orb(swiYm5EOsWQGLxbe0zZvvYETLwTCBFxArHtwB3qHdXXJ2gzcHv4UE2ARhwCF0vo70m9(L8mW3tNxGrC7vNJqi01jEKKy52XGK8bHG)cIViCy1Y5uYNF5oUEuNSwnmPNtfDM6SgsOz8cI0eTfGHGsHY14BoGnT9B(wVoYM6ksaSqQwpMvDBEy6tsLt0z(U39XsPn3oZ2
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active April 3, 2026 17:34
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@Faheetah
Faheetah / install.sh
Created September 15, 2023 16:30
Install containerd and nerdctl on Ubuntu
# Note: can also just install nerdctl-full
sudo apt-get update
sudo apt-get install containerd
wget https://github.com/containerd/nerdctl/releases/download/v1.5.0/nerdctl-1.5.0-linux-amd64.tar.gz
tar -zxf nerdctl-1.5.0-linux-amd64.tar.gz nerdctl
sudo mv nerdctl /usr/bin/nerdctl
rm nerdctl-1.5.0-linux-amd64.tar.gz
@Faheetah
Faheetah / skills.md
Last active December 29, 2025 18:15
Everything is Crab cheatsheet

Quick reference for affinities

🌿[^1] Name Type Description (cooldown[^2]) Subspec
🌿 Diurnal Buff +DayDamage% / -NightDamage%
🌿 Fur Buff +DamageResist% / +ColdResist% Snow Dive, Wool
🌿 Nocturnal Buff +NightDamage% / +Senses%
🌿 Omnivore Buff +FoodProgress%
🌿 Outlier Other Gain a random legendary evolution
🌿 Piscivore Buff +FishFoodProgress%
@Faheetah
Faheetah / Elixir fizzbuzz
Last active December 12, 2025 02:46
Elixir fizzbuzz gore
Enum.each(elem(Enum.map_reduce(1..99, %{6 => 7379564129366843424, 10 => 7094711452935659552, 0 => 7379564130479733370}, fn i, acc -> {<<Map.get(acc, rem(i ** 4, 15), :binary.decode_unsigned(String.pad_trailing(to_string(i),8)))::64>>, acc} end),0), &IO.puts/1)
<?php
// (Keep the same PHP server-side code here as before for brevity)
// ...
// Then HTML head etc. omitted for brevity
?><!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
@Faheetah
Faheetah / Dockerfile
Last active October 19, 2022 15:22
Docker patterns/anti-patterns
### Generic Dockerfile demonstrating good practices
### Imports
# Bad-ish, we do not need Ubuntu for this, nor do we want latest if we are using in a build system, predictable is better
FROM ubuntu:latest
# Better, using a small image since our app has no dependency on Ubuntu
FROM alpine:3.3
@Faheetah
Faheetah / module.sh
Last active March 18, 2022 01:01
Ansible bash module boilerplate
#!/bin/bash
# Source arguments from Ansible
# These are passed into the module as $1 with a key=value format
# Sourcing this file sets the variables defined in the Ansible module
# Note that variables that are unused in the module are silently ignored
source $1
# Helper function to fail the module with the specified error
# This can accept $@ in printf for the full error
@Faheetah
Faheetah / README.md
Created March 15, 2022 16:29
Add Tailwind to Phoenix

Make all the changes described in these files. Delete assets/css/phoenix.css as it is no longer used.

  • config/dev.exs
  • assets/package.json
  • assets/postcss.config.js
  • assets/tailwind.config.js
  • assets/css/app.css
  • mix.exs
@Faheetah
Faheetah / README.md
Created May 1, 2021 18:00
Log commands to a .history file for repos

A problem with repositories is sometimes you do not remember what commands you ran to bootstrap the application, or what generators were used. A history file similar to .bash_history would be handy for a per-project basis. The h command above provides a wrapper around this functionality. It should be portable across any system with bash.

Run a command and write out the command to the git project's .history file, this logs $@ to .history

$ h mix phx.new project_name
$ h mix deps.get
$ h mix ecto.create
$ cat .history
mix phx.new project_name