Skip to content

Instantly share code, notes, and snippets.

@palewire
palewire / README.md
Last active June 5, 2025 02:37
How to push tagged Docker releases to Google Artifact Registry with a GitHub Action

How to push tagged Docker releases to Google Artifact Registry with a GitHub Action

Here's how I configured a GitHub Action so that a new version issued by GitHub's release interface will build a Dockerfile, tag it with the version number and upload it to Google Artifact Registry.

Before you attempt the steps below, you need the following:

  • A GitHub repository that contains a working Dockerfile
  • The Google Cloud SDK tool gcloud installed and authenticated

Create a Workload Identity Federation

@nitred
nitred / optimal_mtu.md
Last active August 12, 2025 01:52
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@donaldpipowitch
donaldpipowitch / README.md
Last active November 13, 2023 22:08
Rewrite relative import paths with a codemod

⚠️ This is for an internal project, but shared publicly as a reference for myself.

If you want to have a general introduction how to write such a codemod have a look at this Gist from me.

What to do?

Place the usage.js and prettiermod.js in the root of the project. Run:

$ pnpm add globby@^11.0.0 @babel/traverse
@Anduh
Anduh / ScreenMonitor.sh
Created April 3, 2021 20:29 — forked from fatguytyson/ScreenMonitor.sh
Screen watcher for Linux Mint Immersed (dis)connect.
#! /bin/bash
OUTPUT_NAME="DVI-I-2-2"
OUTPUT_MODE="1920x1080"
OUTPUT_LOCATION="--right-of DP-1-3"
LOG_DIR="~/.Immersed/Logs"
agent_started() {
pgrep Immersed &> /dev/null 2>&1
return $?
@niko
niko / README.md
Last active July 7, 2025 03:57 — forked from ePirat/spec.md
Icecast Protocol specification

An collection of documents about icecast/shoutcast streaming.

@ralex
ralex / seventeentrack.j2
Created December 7, 2020 20:48
17track template for Home Assistant
{% set status = [
{
"sensor": "seventeentrack_packages_not_found",
"icon": "mdi:timer-sand-empty"
},
{
"sensor": "seventeentrack_packages_expired",
"icon": "mdi:restore-alert"
},
{
@andrebrait
andrebrait / keychron_linux.md
Last active August 4, 2025 20:42
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@jfellus
jfellus / README.md
Last active May 20, 2025 15:46
Docker-compose (v2,v3) | Network interfaces order is tied to docker network names lexical order despite priority

Docker-compose network priority won't work, would it be v2 or v3

Deterministic docker-network to container interface is a must in multi-network setups Docker-compose has a priority mechanism to let the containers connect in order to the given networks

However, docker itself doesn't seem to take that into account

Instead, ethX order in the containers is determined by the lexical order of network names

How to reproduce

@tomhicks
tomhicks / plink-plonk.js
Last active May 15, 2025 13:25
Listen to your web pages
@hmanzur
hmanzur / Dockerrun.aws.json
Last active January 31, 2022 15:25
Beanstalk Environments to Docker container build in .env file
{
"AWSEBDockerrunVersion": "1",
"Logging": "/tmp/app",
"Image": {
"Update": "true"
}
}