Skip to content

Instantly share code, notes, and snippets.

View curiousercreative's full-sized avatar

Winston Hoy curiousercreative

View GitHub Profile
@curiousercreative
curiousercreative / encrypted.sh
Last active April 22, 2024 02:36
Migrate Pop! install to ZFS
#! /usr/bin/env bash
# adapted from https://docs.zfsbootmenu.org/en/v2.3.x/guides/ubuntu/uefi.html
# script is not meant to be run non-interactively. read and understand before executing
sudo -i
source /etc/os-release
export ID
export POOL_DISK="/dev/sdg"
@curiousercreative
curiousercreative / project-openspace.sh
Last active March 24, 2024 04:14
Project OpenSpace into another room, typically executed via SSH
#! /usr/bin/env bash
function cleanup() {
echo 'restoring mouse cursor'
killall xbanish
echo 'restoring desktop monitor'
/usr/local/bin/unprojectorify.sh
echo 'restoring screen blank and suspend on idle'
@curiousercreative
curiousercreative / qemu.sh
Last active January 23, 2024 04:02
Log of failed ZFSBootMenu EFI execution
#!/usr/bin/env bash
set -e
MODEL="qemu"
qemu-system-x86_64 \
-enable-kvm \
-M q35 \
-m 4096 \
@curiousercreative
curiousercreative / main.sh
Last active January 10, 2024 17:18
Build Iris Docker Image for arm64
#! /usr/bin/env bash
# Create a new ARM server (CAX41 | arm | 320 GB | eu-central) from app image: Docker CE
# install git
apt update
apt install -y git
# download and prepare Iris for build
git clone --depth=1 https://github.com/jaedb/Iris.git
@curiousercreative
curiousercreative / main.js
Last active December 7, 2023 01:47
Immich shared album selects
// open the likes/comments activity panel prior to running this in a web console.
// this will insert thumbs just above the album photos
(() => {
// cleanup and init
try {
document.querySelector('#virtual-timeline').parentNode.removeChild(document.querySelector('#selects'))
} catch {}
document.querySelector('#virtual-timeline').insertAdjacentHTML('beforebegin', '<div class="flex flex-wrap" id="selects"></div>')
@curiousercreative
curiousercreative / dockify.sh
Last active December 6, 2023 17:34
Profiles for running System76 Galago Pro (galp5) docked vs undocked
#!/bin/bash
# default text size
#gsettings set org.gnome.desktop.interface text-scaling-factor 1.0
#echo 'disablig auto-suspend on AC power'
#gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
echo 'disabling hibernation'
test -h /etc/systemd/system/systemd-suspend.service && sudo rm /etc/systemd/system/systemd-suspend.service
@curiousercreative
curiousercreative / main.sh
Created December 5, 2023 03:04
Build and install ghostscript
#! /usr/bin/env bash
wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10021/ghostscript-10.02.1.tar.gz
tar -zxf ghostscript-10.02.1.tar.gz ghostscript-10.02.1/
cd ghostscript-10.02.1/
./configure
make -j56
sudo make install
@curiousercreative
curiousercreative / displays.sh
Created March 31, 2023 17:36
Script to configure displays using xrandr from an enumerated list
#! /usr/bin/env bash
# displays.sh single
# displays.sh stack
# displays.sh split
# displays.sh triple
case $1 in
single)
xrandr \
@curiousercreative
curiousercreative / main.sh
Last active February 27, 2023 15:34
Make a 2011 MacBook Pro with failing AMD dGPU run Pop!_OS 22.04
#! /usr/bin/env bash
# If the Pop! installer won't boot due to dGPU failure, remove the SATA SSD/HDD from the MacBook and install Pop! to it using a computer that will boot the installer
sudo su
# With Pop! installed and running as root
# disable AMD gpu drivers
cat << EOF > /etc/modprobe.d/blacklist-amd-dgpu.conf
blacklist radeon
@curiousercreative
curiousercreative / migrate-atom-to-pulsar.sh
Last active January 24, 2023 16:27
Rough migration guide for Atom to Pulsar on Linux
#! /usr/bin/env bash
# NOTE: This worked for my migration from Pop!_OS 22.04 Atom 1.63.1 which was installed with flatpak (user)
# First, download and install the deb package found here https://pulsar-edit.dev/download.html
# for flatpak Atom migration to Pulsar deb - copy configuration and packages
rsync -av ~/.var/app/io.atom.Atom/data/ ~/.pulsar/
# for deb Atom migration to Pulsar deb - copy configuration and packages
#rsync -av ~/.atom/ ~/.pulsar/