Skip to content

Instantly share code, notes, and snippets.

View i8degrees's full-sized avatar

Jeffrey Carpenter i8degrees

View GitHub Profile
@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 i8degrees@gmail.com 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,
@i8degrees
i8degrees / demo.html
Last active July 24, 2019 05:51
A snippet from my nom-video module from Naughty Girl to demonstrate the "Page Visibility" API (browser implement)
<!DOCTYPE html>
<html>
<head>
<title>nom-video: demo</title>
</head>
<body>
<!-- hero video cover -->
<!-- ...and so on and so forth and what have you! -->
@i8degrees
i8degrees / gas-receipt-generator.markdown
Created November 20, 2018 05:53
Gas Receipt Generator
@i8degrees
i8degrees / how-to-set-up-stress-free-ssl-on-os-x.md
Created August 13, 2017 22:17 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

#!/usr/bin/env bash
#
# fix-imessage.sh:jeff
#
# http://www.tonymacx86.com/threads/how-to-fix-imessage.110471/#TOP3.3
# Execute a command
#
# This function supports "dry-run" execution; set the variable NOM_DRY_RUN
# before execution of this function to enable it.
@i8degrees
i8degrees / Makefile.tb
Last active September 30, 2018 09:48
Video processing tasks for Time Bomb DVD
#!/usr/bin/env bash
#
# Makefile:jeff
#
# Video encoding, subtitles conversion, etc. tasks for "Time Bomb"
#
# TODO(jeff): Swap out use of ffmpeg in favor of x264 for encoding.
#
# mp4box -add previews/mpeg2/ch4_doggy-pounding.mp2 chapter4_doggy-pounding.mp4