This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Exit immediately if any command fails. | |
set -e | |
# Treat any non-zero exit status in a pipeline as an error. | |
set -o pipefail | |
# Make unset variables an error. | |
set -u | |
# --- Configuration --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
count_managed_resources() { | |
jq '[.resources[] | select(.mode == "managed") | select(.type == "terraform_data" or .type == "null_resource" | not) | .instances | flatten[]] | length' | |
} | |
ROOT_DIR=${1:-.} | |
ABS_ROOT_DIR=$(readlink -f "$ROOT_DIR") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Use vim settings, rather then vi settings (much better!) | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
set nu | |
set syntax | |
""" | |
""" Keyshort shortcuts | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// ======================================= | |
// Editor stlye and default behavior | |
// ======================================= | |
"editor.minimap.enabled": true, | |
"editor.fontFamily": "'Cascadia Code Light', 'Jetbrains Mono'", | |
"editor.fontSize": 13, | |
"editor.lineHeight": 30, | |
"editor.fontLigatures": true, | |
"editor.rulers": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
echo "Which version do you want to see?" | |
echo "web or pdf?" | |
read -r ANSWER | |
RESUME_URL="https://registry.jsonresume.org/JeffreyVdb" | |
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", | |
"basics": { | |
"name": "Jeffrey Vandenborne", | |
"label": "Software Engineer - Sysadmin - Tech geek", | |
"image": "", | |
"email": "[email protected]", | |
"phone": "+32483126523", | |
"url": "https://jeffrey.vandenborne.co", | |
"summary": "I believe that a good software engineer should be like a chameleon: instantly able to adapt the technologies required for the task at hand. Choosing the right tool for the job is the real complexity.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os.path | |
if __name__ == "__main__": | |
paths = [p for p in sys.argv[1:] if os.path.exists(p) and os.path.isdir(p)] | |
if not paths: | |
sys.exit(0) | |
print(os.path.pathsep.join(paths)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const HashMap = std.HashMap; | |
const Allocator = std.mem.Allocator; | |
const StringHashMap = std.hash_map.StringHashMap; | |
const SinglyLinkedList = std.SinglyLinkedList; | |
pub fn main() !void { | |
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); | |
defer arena.deinit(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const c = @cImport(@cInclude("unistd.h")); | |
const std = @import("std"); | |
const ChownData = struct { | |
uid: c_uint, | |
gid: c_uint, | |
filename: [:0]const u8, | |
}; | |
pub fn main() !void { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
mktempfile() { | |
tmpfile=$(mktemp --tmpdir=/tmp "$1") | |
echo "Created $tmpfile" >/dev/tty | |
printf "%s" "$tmpfile" | |
} | |
KEY_NAME="${1:-}" |
NewerOlder