Skip to content

Instantly share code, notes, and snippets.

View DblD's full-sized avatar

Dario Matonicki DblD

View GitHub Profile
@DblD
DblD / Install and Configure ZeroTier on Asahi Linux.MD
Last active November 4, 2024 20:32
Install and Configure ZeroTier on Asahi Linux (Fedora for Apple Silicon) with Automatic GPG Key Retrieval

Title: Install and Configure ZeroTier on Asahi Linux (Fedora for Apple Silicon) with Automatic GPG Key Retrieval

Description:

This script addresses issues with installing ZeroTier on Asahi Linux (Fedora installations on Apple Silicon). It ensures the correct GPG key and repository configuration for systems that may lack native ZeroTier support out of the box. The script performs the following steps:

  1. Checks for the presence of the ZeroTier GPG key in /tmp. If missing, it downloads the key directly from ZeroTier's official source to ensure package authenticity.
  2. Imports the GPG key to verify ZeroTier packages.
  3. Creates a temporary repository configuration file for ZeroTier.
  4. Moves the repository file to /etc/yum.repos.d to make it system-wide.
@DblD
DblD / framework_arch.markdown
Created September 19, 2022 15:56 — forked from RobFisher/framework_arch.markdown
Install Arch on Framework laptop with BTRFS, encrypted swap and hibernate

See video: https://www.youtube.com/watch?v=BAQ78pBPjjc

Set up laptop

In BIOS, under security, set "Enforce secure boot" to "disabled".

Get install environment working

Keyboard layout for boot env:

localectl list-keymaps | grep uk

loadkeys uk

@DblD
DblD / dynamic.yaml
Created April 25, 2020 11:46 — forked from Mau5Machine/dynamic.yaml
Traefik Dynamic Configuration File
## Setting up the middleware for redirect to https ##
http:
middlewares:
redirect:
redirectScheme:
scheme: https
@DblD
DblD / docker-compose.yml
Created April 25, 2020 11:46 — forked from Mau5Machine/docker-compose.yml
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
@DblD
DblD / Scripting_with_Golang_on_Linux.MD
Last active June 11, 2019 19:56
Yes we can - aka pick your favourite language and make it "script able"

Linux kernel magic

In Linux we can load and execute any file with its executable bit set. Thanks to the linux kernel [binfmt_misc module][1] we can dynamically extend and add support for varaitey of executable formats directly from userspace using well defined and documented procfs interface.

Making Golang our scripting language of choice

We can achive this by making binary format descriptions for our .go files. To do this we need to ensure we have special binfmt_misc filesystem mounted to /proc/sys/fs/binfmt_misc.

# Fetch and fill config
mikrotik_vpn_config=$(curl https://gist.github.com/elmariofredo/7232556/raw/VPN-L2TP-IPSEC.mikrotik \
| sed -e '
s/IPSEC_PEER_SECRET/somesecret/g;
s/USER1_NAME/mario/g;
s/USER1_PASS/somepass/g;
s/IP_RANGE/172.16.24.100-172.16.24.200/g;
s/DNS_SERVER/172.16.22.1/g;
s/LOCAL_ADDRESS/172.16.22.1/g;
s/WINS_SERVER/172.16.22.1/g')