Skip to content

Instantly share code, notes, and snippets.

@andrewnk
andrewnk / gist:ecba8448b5009eaa3ae1433c549d881d
Created July 20, 2021 01:01
Resize partition in alpine
# after the virtual disk has already been expanded (e.g. in proxmox)
apk add --no-cache cfdisk e2fsprogs-extra
# choose partition then "Resize" > "Write" (to finalize)
cfdisk
# replace * with partition you are resizing
resize2fs /dev/*
@Barry1
Barry1 / AdobeCS2Free.md
Last active March 28, 2026 14:56
Adobe CreativeSuite 2 for free

GRUB INIT TUNE

A GRUB_INIT_TUNE uses the following format: tempo [freq duration] [freq duration]…

  • tempo: is the base for all note durations in beats per minute, 60 gives a second base (60s/60 = 1s), 120 gives a half-second base, etc.
  • freq: is the frequency (in hertz) of the sound (set 0 to produce a rest)
  • duration: is the duration of the sound in beats

You can preview the tunes below with the standalone index.html included in this gist.

@andrew-wilkes
andrew-wilkes / tunnel.php
Created March 20, 2021 11:18
PHP Script to Start and Stop a Reverse SSH Tunnel from a Remote Server
<?php
/*
This script is placed on a server or computer that remains powered up and is run via a
crontab job at regular intervals to ensure that the reverse SSH tunnel that it creates
remains active or gets killed according to the text value contained in a file on a remote
server that tells it whether to start or kill the process.
That file contains "on" or "off" text that is accessible via a URL.
On that server, the user should be able to SSH to it and change the command value in the file.
@DavidPesticcio
DavidPesticcio / Encrypted ZFS root install on Linux Mint 20.x & Ubuntu 20.04
Created February 22, 2021 14:13
Encrypted ZFS root install on Linux Mint 20.x & Ubuntu 20.04
### Steps for an encrypted ZFS root installation on Linux Mint 20.x & Ubuntu 20.04
01. Boot from an Ubuntu based installer/Live CD - Linux Mint 20.x or Ubuntu Desktop 20.04
02. Open a terminal
03. Run: `sudo apt -y install zfs-zed` - **!IMPORTANT!** - Ensure the ZFS pre-requisites installed!
04. Run: `sudo vi /usr/share/ubiquity/zsys-setup`
- find the right section with `/^init_zfs`
- prepend the `zpool create` for `rpool` with `echo MYPASSWORD | ` - `MYPASSWORD` **MUST** be 8 characters or more!
eg. `echo MYPASSWORD | zpool create -f \` - **DO NOT FORGET THIS!**
05. Above the last line of the `zpool create` command, insert these lines:
@yorickdowne
yorickdowne / README.md
Last active November 13, 2025 23:14
Ubuntu Desktop 20.04 with mirrored ZFS boot drive

Ubuntu 24.04

From the comments: "These exact instructions are not working on Ubuntu 24.04. Ubuntu has changed the naming of ZFS partitions, partition 2 and 3 are switched around, and the boot/efi folder is now different."

I don't have my dual-disk test system any longer, and so can't adjust these steps myself.

Overview

Ubuntu Desktop 20.04 supports a single ZFS boot drive out of the box. I wanted a ZFS mirror, without going through an entirely manual setup of Ubuntu as described by OpenZFS in their instructions for Ubuntu 20.04 and instructions for Ubuntu 22.04

@seiren-naru-shirayuri
seiren-naru-shirayuri / PEDump.vbs
Last active August 3, 2025 06:24
PE image file dumper in VBScript
'This script is released under GLWTPL, visit https://github.com/me-shaon/GLWTPL for details.
'
'
' GLWT(Good Luck With That) Public License
' Copyright (c) Everyone, except Author
'
'Everyone is permitted to copy, distribute, modify, merge, sell, publish,
'sublicense or whatever they want with this software but at their OWN RISK.
'
' Preamble
@roalcantara
roalcantara / XDG.cheat-sheet.md
Last active March 28, 2026 19:37
XDG cheat sheet

XDG - Base Directory Specification (extended)

Directories

Base

The intended use-case for BaseDirectories is to query the paths of user-invisible standard directories that have been defined according to the conventions of the operating system the library is running on.

@MrHallows
MrHallows / fastboot_help.md
Last active March 27, 2026 11:18
fastboot commands

Command:

$ fastboot help

Output:

usage: fastboot [OPTION...] COMMAND...

flashing:
@zinovyev
zinovyev / tt
Last active July 19, 2023 14:25
Create directory and file paths recursively
#! /usr/bin/env bash
# Create file or directory with parent directories
# For a more detalied description please take a look at:
# https://zinovyev.net/blog/create-files-and-directories-with-parent-directories
HELP_MESSAGE=$(cat <<EOM
Create files or directories with underlying path
Usage Examples: