Skip to content

Instantly share code, notes, and snippets.

@jcassette
jcassette / truenas_scale_lxc.sh
Created February 4, 2024 14:56
TrueNAS SCALE LXC
#!/bin/sh
set -e
chmod +x /usr/bin/apt*
chmod +x /usr/bin/dpkg
apt install lxc
cat >> /etc/lxc/default.conf << EOF
@jcassette
jcassette / storj_zksync_lite_to_euro.md
Last active January 31, 2024 17:35
How to sell STORJ tokens from zkSync Lite to Euro

How to sell STORJ tokens from zkSync Lite to Euro

Screenshot_20240131_163450 Screenshot_20240131_163601 Screenshot_20240131_164007-1 Screenshot_20240131_164245 Screenshot_20240131_164346 Screenshot_20240131_164420 Screenshot_20240131_164513 Screenshot_20240131_164643

#!/bin/sh
set -e
set -x
# https://wiki.debian.org/NvidiaGraphicsDrivers#Debian_12_.22Bookworm.22
sudo sed --in-place .bak --expression 's/bookworm main .*$/bookworm main contrib non-free non-free-firmware/' /etc/apt/sources.list
sudo apt update
@jcassette
jcassette / nvidia_shield_fix_xbox_button.md
Created December 7, 2023 14:35
Nvidia Shield: fix the Xbox (Guide) controller button

Nvidia Shield: fix the Xbox (Guide) controller button

On the Nvidia Shield, the Xbox (Guide) button of Xbox Series controllers is mapped to "Home".

These instructions unmap the Xbox (Guide) button so that it can be used in Steam Link or other apps.

  1. On the Shield, enable the developer options:
    1. Click the Menu button
    1. Navigate to Device Preferences > About > Build
    1. Click Build repeatedly until it shows "You are now a developer"
@jcassette
jcassette / windows_11_no_wake_screen.md
Created December 7, 2023 13:27
Windows 11: remove the login screen shown after sleep

Windows 11: remove the login screen shown after sleep

  1. Start a terminal as Administrator
  2. Execute the following commands:
powercfg /SETDCVALUEINDEX SCHEME_CURRENT SUB_NONE CONSOLELOCK 0
powercfg /SETACVALUEINDEX SCHEME_CURRENT SUB_NONE CONSOLELOCK 0
  1. Reboot
@jcassette
jcassette / supermicro_x10_fans.md
Last active April 12, 2024 14:23
How to control fan settings of Supermicro X10 motherboards
@jcassette
jcassette / freebsd_dhcpv6.sh
Last active April 4, 2023 22:56
FreeBSD DHCP+DHCPv6 configuration
#!/bin/sh
# FreeBSD DHCP+DHCPv6 configuration
pkg install -y dhcpcd
cat >> /etc/rc.conf << EOF
ipv6_activate_all_interfaces="YES"
ifconfig_epair0b="SYNCDHCP"
EOF
#!/usr/bin/env python
import io
import pathlib
import subprocess
import urllib.parse
import urllib.request
import zipfile
BASEURL = 'https://github.com/storj/storj/releases/latest/download/'
#!/bin/sh
iso_path="$1"
img_path="$2"
dd if=/dev/zero of="$img_path" bs=1MB count=8000 status=progress
parted --script "$img_path" -- \
mklabel gpt \
mkpart P1 fat32 1MB 1000MB \