Skip to content

Instantly share code, notes, and snippets.

View nuvious's full-sized avatar

David Cheeseman nuvious

View GitHub Profile
<#
.SYNOPSIS
Executes a command remotely on a Windows machine using CIM/WMI.
.PARAMETER Username
The username for remote authentication.
.PARAMETER Password
The password associated with the username.
@nuvious
nuvious / README.md
Created April 26, 2025 19:58
NFC Driven Chore List for Home Assistant and Node Red

NFC Chores for Home Assistant

This is a node red flow that integrates with home assistant to allow one to create chores using the native HA todo list and complete those chores by scanning NFC tags. The flow is written as generally as possibl

Quick Setup

Create Tags

@nuvious
nuvious / scale_vid.sh
Created March 23, 2025 21:44
Script to scale a video to an excact time length with ffmpeg without pitch shift in audio.
#!/bin/bash
# Anything breaks, we need to stop trying to encode
set -e
# If not enough arguments are provided, inform the user of the user
if [ $# -lt 4 ]; then
echo "This tool re-encodes a video stretching or shrinking to the target" \
"video length with no changes to audio pitch."
echo "Usage: scale_vid.sh [input video] [hours] [minutes] [seconds]"
@nuvious
nuvious / brute_volatility.sh
Last active September 8, 2024 06:41
Volatility 3 Brute Force Script
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Usage: brute_volatility.sh [MEMDUMP FILE] [PLUGIN FILTER]"
echo " ex: brute_volatility.sh mydump.mem windows"
fi
python3 -m venv .venv
source .venv/bin/activate
mkdir -p analysis
if [ ! -d volatility3 ]; then
git clone https://github.com/volatilityfoundation/volatility3.git
@nuvious
nuvious / example-nginx-deployment.yaml
Last active August 31, 2024 21:14
NFS Stale Handle Liveness Probe
---
apiVersion: v1
data:
liveness.sh: |
#!/bin/bash
# Get list of nfs mounts
temp_file=$(mktemp)
# May need to change to nfs depending on base image
mount -t nfs4 > "$temp_file"
@nuvious
nuvious / auto-rotate
Created June 30, 2024 02:21
Auto rotate 2 in 1 Laptop screens like the Lenovo Flex or Yoga
#!/bin/bash
# Template Configuration:
# ~/.config/autostart/auto-rotate.desktop
#
# [Desktop Entry]
# Type=Application
# Exec=sh -c "export DEVICE=eDP && /usr/bin/auto-rotate" # Change device identifier here
# Hidden=false
# NoDisplay=false
# X-GNOME-Autostart-enabled=true
@nuvious
nuvious / cloak.py
Created June 25, 2024 18:18
Cloak Covert Channel TCP Flow Sequence Encoder/Decoder
"""
An implementation of the encoding used by Clock [1], a timing based covert
channel which converts a binary string into a sequence of N packets to be sent
over X flows. It is assumed that the values N, X, and the number of bits per
message are agreed upon ahead of time. The bit string is converted to an
unsigned integer value, which is used as the rank [2] for the reverse-sorted
distribution. The distribution is then computed from this rank and each of X
tcp flows has N packets sent with each flow waiting for N acknowledgements
before attempting to receive the next message. On the receiving end, the number
of TCP handshakes is counted and the number of packets sent are also counted to
@nuvious
nuvious / module_assignment_solver.py
Last active June 19, 2024 01:18
Group Preference Maximizer through Student Preferences on Paper Assigned to Groups - A narrow example of an assignment problem solution with constraints
"""
I wrote this for a course I was in where we had a group of 6 that had to give
presentations over 3 modules (0, 1, and 2) with each module having 2 papers we
needed to present on.
As a group we decided to pair up so 2 people would generate the presentations
for a single module, working together to make slides for the 2 papers.
The question then comes how to pair people up so they are most satisfied with
their pairings (none of us are co-located because it's an online course). This
@nuvious
nuvious / disable_windows_copilot.reg
Last active May 24, 2024 14:39
Disable Widnows Copilot
Windows Registry Editor Version 5.00
; References:
; https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-windowsai#turnoffwindowscopilot
;
; Only works on non-Home editions of Windows 11 (Pro and up)
; Requires a restart
; If this becomes out of date please comment with any corrections to key/value path information and @-me so I can correct it.
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsCopilot]
@nuvious
nuvious / bash_ansi_color.sh
Created May 18, 2024 21:59
Bash Ansi Color Helper Script
#!/bin/bash
# A helper script to define ANSI code and provide 'echo' and 'printf' functions to printf/echo ansi strings
# Usage:
# source bash_ansi_color.sh
# printf_ansi "This is BOLD AND RED\n" $ANSI_TEXT_BOLD_RED
# echo_ansi "Echo applies newlines!" $ANSI_TEXT_UNDERLINE_PURPLE $ANSI_BACKGROUND_YELLOW
# Derrived from AHaymond's README on ANSI color codes
# https://gist.github.com/AHaymond/e96f00ed0ba64a9af419296bf852c5bb