This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Test-Admin { | |
$currentUser = [Security.Principal.WindowsIdentity]::GetCurrent() | |
$principal = New-Object Security.Principal.WindowsPrincipal($currentUser) | |
return $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) | |
} | |
# Relaunch as Admin if not already elevated | |
if (-not (Test-Admin)) { | |
Write-Host "Restarting script as Administrator..." | |
Start-Process PowerShell -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
import transmission_rpc # pip install transmission-rpc | |
# Connect to the Transmission server | |
client = transmission_rpc.Client( | |
host='localhost', # Change this to your server's address if it's remote | |
port=9091, # Default Transmission RPC port | |
username='transmission', # Your Transmission username | |
password='transmission' # Your Transmission password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# USAGE | |
# blink_led <device> that exists as /dev/disk/by-id/<device> | |
# you should use by-id mounts in zfs (instead of /dev/sda etc) | |
# so copying that directly when at a faulted state (for example) | |
# should be enough. if you use by-vdev, edit the script to suit | |
# your needs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Edit these | |
$USERNAME = "bindi" | |
$REMOTE = "unencrypted" | |
#Stop editing after this line (meaning end-users, you as the admin should preconfigure directory structure below) | |
$filename = "snapshotmounter_for_$REMOTE.xml" | |
if (!(Test-Path $filename)) { | |
$rclone_config_password = (Read-Host -Prompt 'Enter rclone encryption **password** for current remote (saved (**as encrypted**) for future use of the same remote)' -AsSecureString) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# helps with (re)installing https://github.com/DualCoder/vgpu_unlock | |
# after you have installed nvidia drivers (./NVIDIA-Linux-*-vgpu-kvm.run --dkms) | |
# | |
# this script assumes you have vgpu_unlock in /root | |
# it also assumes you only have one nvidia-<version> in /usr/src/ | |
# (beware that NVIDIA doesn't clean up files in that directory, even if you run the uninstaller, do it yourself if required) | |
# | |
# hope it isn't too hacky. works for me :)! |