Skip to content

Instantly share code, notes, and snippets.

View icedream's full-sized avatar

Carl Kittelberger icedream

View GitHub Profile
@icedream
icedream / Dockerfile
Last active October 9, 2024 14:43
Patched mtr for Ubuntu 24
# Dockerfile to build a patched mtr package for Ubuntu 24.
#
# Run this directly with this command, you don't need anything else than
# Docker:
#
# docker build --rm --output type=local,dest=output/ https://gist.github.com/icedream/f34af692ae6a2d63986f149a9001ca54/raw/Dockerfile
#
# This will give you an output/ directory with source and binary packages
# for a version suffixed +icedream.1 containing the patches.
#
@icedream
icedream / openpgp.md
Created September 25, 2024 14:29
Identity proof

openpgp4fpr:04ADEF85EA6AEC6F75941E84468BBEEBB9EC6AEA

@icedream
icedream / Dockerfile
Last active October 9, 2024 14:33
PowerTOP 2.14 Ryzen patches for Debian 12
# Dockerfile to build a patched powertop package for Debian 12 with the AMD
# Ryzen fixes.
#
# Debian 12 does not have these patches yet, however Debian 13 will include
# PowerTOP 2.15 which contains these changes already.
#
# Run this directly with this command, you don't need anything else than
# Docker:
#
# docker build --rm --output type=local,dest=output/ https://gist.github.com/icedream/ee7780b87706f2693c75a116759f0fbb/raw/Dockerfile
@icedream
icedream / 00_MigratingFromOldUbuntuLaptopToNewLinuxMintLaptopViaVMs.md
Last active March 8, 2024 10:42
Migrating from an old laptop to a new one through VMs

These are the bunch of overengineered scripts that allow me to take an old Ubuntu laptop's backup, take the important user data from it, migrate that to Linux Mint and unsnappify it without interrupting use of the old laptop, and then prepare it so it will run a proper setup wizard on first boot to set up the new laptop that will run the copy of Linux Mint in the end.

For this purpose, I set up:

  • The old laptop - The old Linux install machine, in my case an old Acer Aspire E5 with Ubuntu 22 on it. Runs Veeam Agent for Linux, backs up to NAS.
  • A hypervisor - I will use VMs to do a migration of data from the old laptop to Linux Mint without interrupting work on the actual device. In this case, I used Proxmox. It hosts:
    • VM 1 (source VM) - Holds the files of the old laptop from the Veeam backups on NAS so the Linux Mint VM can migrate the important parts over via SFTP. A backup restore script runs regularly.
  • VM 2 (Linux Mint VM) - Runs a copy of Linux Mint that will be sysprepped. A separate disk hold
@icedream
icedream / Dockerfile
Last active March 28, 2023 16:41
Nextcloud Alpine Docker image with modified imagemagick to work around wrongly rendered single-letter avatars
# HACK - compile imagemagick package with --without-rsvg flag to work around #34755
FROM nextcloud:26-fpm-alpine AS custom-imagemagick
# Build deps
RUN apk add --no-cache \
alpine-sdk grep \
chrpath fontconfig-dev freetype-dev ghostscript-dev lcms2-dev libheif-dev \
libjpeg-turbo-dev libpng-dev libjxl-dev librsvg-dev libtool libwebp-dev \
libx11-dev libxext-dev libxml2-dev perl-dev tiff-dev zlib-dev \
@icedream
icedream / steamos-ssh.sh
Last active March 7, 2022 17:45
SteamOS SSH preparation
#!/bin/bash
set -e
set -u
# following stuff kinda copied from /usr/bin/steamos-chroot
[ -e /usr/lib/steamos/steamos-partitions-lib ] && \
. /usr/lib/steamos/steamos-partitions-lib || \
{ echo "Failed to source '/usr/lib/steamos/steamos-partitions-lib'"; exit 1; }
@icedream
icedream / deepl-integration-for-twitter.user.js
Last active December 28, 2021 10:42
DeepL Integration for Twitter (Userscript)
// ==UserScript==
// @name DeepL integration for Twitter
// @namespace http://icedream.tech/
// @version 0.3.2
// @description Add "Translate tweet with DeepL" button
// @author Carl Kittelberger <[email protected]> (https://icedream.tech)
// @collaborator Remonade
// @match https://twitter.com/*
// @grant none
// @require http://code.jquery.com/jquery-3.5.1.min.js
@icedream
icedream / main.js
Created June 20, 2021 02:19
Some crappy string obfuscation thing
function _arrayBufferToBase64( buffer ) {
var binary = '';
var bytes = new Uint8Array( buffer );
var len = bytes.byteLength;
for (var i = 0; i < len; i++) {
binary += String.fromCharCode( bytes[ i ] );
}
return window.btoa( binary );
}
@icedream
icedream / README.md
Last active March 25, 2022 13:31
Clipping without reencoding

youtube-dl has the ability to give you a direct download link for a video instead of downloading the whole video by itself. This is really useful if you only intend to clip a specific part of a stream, and you can even do that without reencoding for maximum speed if you can accept a tolerance of 2 seconds (the usual keyframe interval used for streams). This is a technique I am using to make my Games Done Quick clips as well, so this is not limited to YouTube.

Here's how you can do it:

Requirements

@icedream
icedream / README.md
Last active October 16, 2020 10:20
Upstream ssh-copy-id Fix

Arch Linux (and I assume several other mostly-as-is distros) currently ships a broken version of the ssh-copy-id script with their openssh package because the upstream developers decided to merge a "ported" version of the script by Phil Hands back into upstream. While it contains many improvements it does reintroduce the error messages and changes actually not taking any effect in authorized_keys.

It turns out getting the new script back running is pretty simple with the changes listed below.

I suggest copying the original script from /usr/bin/ssh-copy-id to a new folder that you prepend to your $PATH (like $HOME/.local/bin) and then applying the patch listed here. This way the copy will take effect in $PATH searches until the issue is resolved so you can safely delete the file.