Skip to content

Instantly share code, notes, and snippets.

View i8degrees's full-sized avatar

Jeffrey Carpenter i8degrees

View GitHub Profile
@i8degrees
i8degrees / sanitize_url.mjs
Last active April 10, 2025 17:50
Borrowed from a chrome web extension at https://github.com/mikan/ec-url-cleaner
#!/usr/bin/env node
`use strict`;
import {argv} from "node:process";
import {URL} from "node:url";
//const url = require('node:url');
// [SOURCE](https://github.com/mikan/ec-url-cleaner)

Steam Client on APFS Case Sensitive Mac OS Drive

If you are using APFS Case Sensitive File system and trying to use Steam, it will flicker & silently fail or show the following error message:

steam requires that '~/library/application support/steam/steam.appbundle/steam/contents/macos' be on a case-insensitive filesystem.

To fix the issue, follow the instruction here.

Run from your user account, NOT ROOT!

@i8degrees
i8degrees / sendkeys.awk
Created November 29, 2024 23:38 — forked from zambonin/sendkeys.awk
AWK script to send multiple `sendkey` commands to a QEMU virtual machine.
#!/usr/bin/env awk -f
#
# AWK script to send multiple `sendkey` commands to a QEMU virtual machine.
# It writes at a rate of roughly 40 keys per second, due to lower delays
# resulting in garbage output.
#
# It makes use of a TCP client created by an external utility, such as OpenBSD
# Netcat, to interact with QEMU's monitor and send a stream of `sendkey`
# commands. This is a practical way to transfer a small file or to script
# interactions with a terminal user interface.
Gigabytes (GB) Megabytes (MB) decimal Megabytes (MB) binary
1 GB 1,000 MB 1,024 MB
2 GB 2,000 MB 2,048 MB
3 GB 3,000 MB 3,072 MB
4 GB 4,000 MB 4,096 MB
5 GB 5,000 MB 5,120 MB
6 GB 6,000 MB 6,144 MB
7 GB 7,000 MB 7,168 MB
8 GB 8,000 MB 8,192 MB
@i8degrees
i8degrees / firefox_mobile.md
Last active November 26, 2024 23:05
Enable the use private PKI certificates for Firefox Mobile on Android
created modified description
2024-11-18+CST -06:00
2024-11-18+CST -06:00
Enable the use private PKI certificates for Firefox Mobile on Android

Firefox Mobile

usage

@i8degrees
i8degrees / serve_http.py
Last active May 25, 2024 22:35
Simple Python HTTP Server with multi-threading, partial-content and basic authentication support
#!/usr/bin/env python2
#
# 1. https://web.archive.org/web/20210123000445/https://gist.github.com/devgianlu/018b299f8817bf92350bf7bf70214e4d
# 2. https://github.com/devgianlu/Aria2App/wiki/Setup-HTTP-DirectDownload
#
# devgianlu/serve_http.py
# Forked from pankajp/serve_http.py
#
# Standard library imports.
@i8degrees
i8degrees / zfs_replicate.v2.sh
Created April 14, 2024 16:05
My completed ZFS pool replication script
#!/bin/sh
#
# zfs snapshot -r offsite2_fs1/boot-pool@migrate
# zfs snapshot -r offsite2_fs1/npool0@migrate
#
datasets=(`zfs list -r offsite2_fs1/boot-pool -o name -H`);
existing_pool="offsite2_fs1"
new_pool="offsite2_fs1.tmp"
buffer=() # inbound scratch
@i8degrees
i8degrees / zfs_replicate.sh
Last active April 14, 2024 15:42
ZFS pool replication
#!/bin/bash
#
# Replicate source pool target with a destination pool target
#
# SOURCE[(https://www.truenas.com/community/threads/how-to-move-a-dataset-from-one-zfs-pool-to-another-zfs-pool.75912/#post-714236)
#
MY_POOL_DEVICE="offsite2_fs1"
ZFS_DEST_POOL="offsite2_fs1.tmp"
@i8degrees
i8degrees / notify.py
Created May 1, 2023 08:55
Modern 'wall' command
# Sourced from https://gist.githubusercontent.com/badp/672546/raw/4c6bc7dee6d547d8a7f002ce95c9a66363108f6e/spam.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Licensed under MIT license: http://www.opensource.org/licenses/mit-license.php
import os, subprocess, sys
# thanks: Martin-Éric Racine, Roger Pate
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=433960
# http://chat.askubuntu.com/rooms/3/conversation/spam-py
@i8degrees
i8degrees / LICENSE.md
Created March 16, 2022 07:20
rclone client, a Google web application

Simplified BSD License

Copyright (c) 2022 Jeffrey Carpenter [email protected] Some rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice,