Skip to content

Instantly share code, notes, and snippets.

View 0xdnL's full-sized avatar

daniel 0xdnL

  • Hamburg
View GitHub Profile
@idleberg
idleberg / Restore Mac using DFU mode.md
Last active January 11, 2026 13:36
Restore Mac using DFU mode

Note

If you followed this guide before, you might want to scroll all the way down to the TL;DR version of this guide

Intro

Somehow, I managed to ”brick“ my Mac mini (2018, Intel) when I wiped its data before selling it online. From then on I could no longer:

  • boot the normal Recovery Mode
  • re-install macOS using an USB stick
  • use the online Recovery Mode, since it always ended up in a error -1008F
@zidenis
zidenis / 5_steps_for_creating_templates_and_vms_on_proxmox_using_linux_distros_cloud_images.md
Last active January 18, 2026 12:47
Creating Templates and Virtual Machines on Proxmox using cloud images from various Linux distributions.

5 Steps for Creating Templates and Virtual Machines on Proxmox using Linux Distro's Cloud Images

This tutorial guides you through the process of creating Templates and Virtual Machines on Proxmox using cloud-based images from various Linux distributions. We provide clear instructions for Alma Linux 9, Amazon Linux 2, CentOS 9, Fedora 38, Oracle Linux 9, RHEL 9, Rocky Linux 9, and Ubuntu 23.04 Lynx Lobster.

Note: The instructions have been tested on Proxmox 8.0.4.

Let's begin by choosing the cloud-based image. If you already have your preferred Linux distribution, skip to the 1st step.

To assist in making informed choices when selecting a Linux distribution for your virtual machines, we've compiled a table showcasing key characteristics of each cloud image. This table provides a snapshot of important attributes, including kernel version, Python version, number of processes initialized after boot, number of packages installed, free memory after boot, VM disk size, root partition disk size, used size on t

@SergiuSavva
SergiuSavva / 1. aws-mfa.sh
Last active November 10, 2025 08:25
This Bash script helps in generating and configuring temporary AWS credentials using Multi-Factor Authentication (MFA) for added security. It reads the MFA device ARN from the specified AWS profile in the credentials file, prompts the user for the MFA token code, and then obtains the temporary credentials from AWS Security Token Service (STS). F…
#!/bin/bash
# Set the profile you want to use for MFA
SOURCE_PROFILE="default"
MFA_PROFILE="mfa"
# Read the MFA device ARN from the credentials file
MFA_DEVICE_ARN=$(aws configure get mfa_device_arn --profile $SOURCE_PROFILE)
if [ -z "$MFA_DEVICE_ARN" ]; then
echo "Error: MFA device ARN not found in the ~/.aws/credentials file for profile $SOURCE_PROFILE"
@sts10
sts10 / rust-command-line-utilities.markdown
Last active January 24, 2026 15:37
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@ThomasG77
ThomasG77 / README.md
Last active April 24, 2025 05:05
Recipe to get JSON using pagination using command line tools e.g curl, jq, bc, cat
@montmanu
montmanu / README.md
Last active December 20, 2023 07:33
Processing kubectl YAML Output with yq
@superseb
superseb / k3s-etcd-commands.md
Last active November 3, 2025 12:55
k3s etcd commands

k3s etcd commands

etcd

Setup etcdctl using the instructions at https://github.com/etcd-io/etcd/releases/tag/v3.4.13 (changed path to /usr/local/bin):

Note: if you want to match th etcdctl binaries with the embedded k3s etcd version, please run the curl command for getting the version first and adjust ETCD_VER below accordingly:

curl -L --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key https://127.0.0.1:2379/version
@alisdair
alisdair / intensify.sh
Created May 21, 2019 23:44
intensifies Slack emoji creator
#!/bin/bash
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image
# input. I recommend grabbing an emoji from https://emojipedia.org/
set -euo pipefail
# Number of frames of shaking
count=10
# Max pixels to move while shaking
@ckabalan
ckabalan / best_bash_history.sh
Last active October 6, 2025 10:48
The Best Bash History Settings Ever
# /etc/profile.d/best_bash_history.sh
# Save 5,000 lines of history in memory
HISTSIZE=10000
# Save 2,000,000 lines of history to disk (will have to grep ~/.bash_history for full listing)
HISTFILESIZE=2000000
# Append to history instead of overwrite
shopt -s histappend
# Ignore redundant or space commands
HISTCONTROL=ignoreboth
# Ignore more
@sj26
sj26 / LICENSE.md
Last active December 27, 2025 05:35
Bash retry function

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit