Skip to content

Instantly share code, notes, and snippets.

View in03's full-sized avatar
💭
Working on new projects!✨

Caleb Trevatt in03

💭
Working on new projects!✨
View GitHub Profile
@in03
in03 / Get-TotalActiveComputers.ps1
Created February 21, 2025 00:24
Recursively check active computers in a computer group based on `LastLogonDate`
# Define the group name
$ADGroupName = "My-AD-Computer-Group"
# Get the current date and calculate the threshold for last logon (365 days ago)
$DaysThreshold = 365
$LastLogonCutoff = (Get-Date).AddDays(-$DaysThreshold)
# Function to recursively get members of a group, including nested groups
function Get-ADGroupMembersRecursive {
param (
@in03
in03 / checkJobFit.prompt
Last active December 7, 2024 02:14
AI prompt "recipe" to provide a report on an applicant's fit for an open job role or a potential career switch. Provides metrics on fit and a roadmap for improving the fit. Use with ChatGPT, Ollama, or other LLMs.
Inputs:
Applicant Info:
LinkedIn Profile: Career history and skills.
GitHub Profile: Projects and technical expertise.
Resume: Experience, certifications, and education.
Job Posting:
@in03
in03 / install_nvidia_driver_host.sh
Last active December 29, 2024 05:51
Configures an LXC container with Nvidia GPU passthrough.
#!/bin/bash
# Constants
SCRIPT_NAME="install_nvidia_driver_host.sh"
SCRIPT_PATH="/usr/local/bin/$SCRIPT_NAME"
DRIVER_DIR="/usr/local/share/nvidia" # Directory to store the NVIDIA driver file
KERNEL_HOOK_PATH="/etc/kernel/postinst.d/nvidia-driver-reinstall"
KERNEL_TRACK_FILE="/var/lib/nvidia-driver-installed-kernel"
# Logging function
@in03
in03 / Cleanup-Tailscale.sh
Created September 24, 2024 03:20
Cleanup a Tailscale installation on MacOS
#!/bin/bash
# If you're having issues with Tailscale after a reinstall, try cleaning up.
# Tailscale recommends the following. I've just scripted it for ease:
# https://tailscale.com/kb/1069/uninstall?q=uninstall&tab=macos+%28standalone%29
# Oh would you look at that, if you've got brew, just use that.
# https://github.com/Homebrew/homebrew-cask/blob/master/Casks/t/tailscale.rb
# NOTE:
@in03
in03 / .traefik-cloudflare-tunnel
Created March 8, 2024 03:09 — forked from mattdy/.traefik-cloudflare-tunnel
Traefik on Docker Swarm accessed via Cloudflare Tunnel
Please see https://mattdyson.org/blog/2024/02/using-traefik-with-cloudflare-tunnels for a detailed write-up of this configuration
@in03
in03 / Jump_To_Folder.ahk
Created January 6, 2024 03:15
Creates a quick nav menu in any Windows browser dialog based on open explorer windows - trigger with Ctrl+G or middle mouse button
; Easy Access to Currently Opened Folders
; Original author: Savage
; Fork by Leeroy
; Invoke a menu of currently opened folders when you click
; the middle mouse button inside Open / Save as dialogs or
; Console (command prompt) windows. Select one of these
; locations and the script will navigate there.
; CONFIG: CHOOSE A DIFFERENT HOTKEY
; You could also use a modified mouse button (such as ^MButton) or
@in03
in03 / cross_platform_path_mapping.py
Created April 29, 2022 21:53
Convert network-share mount points between platforms using path-mapping
import platform
import os
def resolve_path_map(rpath, path_map_list, strict=True):
target_os = platform.system().lower()
rpath = os.path.normpath(rpath)
for path_maps in path_map_list:
@in03
in03 / resolve_network_path.py
Last active April 27, 2022 23:53
Resolve cross-platform network paths from local mapped mounts
import logging
import os
import pathlib
import socket
def resolve_network_path(local_path, strict=True):
"""
Resolve cross-platform network paths from local mapped mounts
Args:
- local_path (str): local path to resolve
@in03
in03 / AHK_Resolve_Master.ahk
Last active January 27, 2024 19:17
DaVinci Resolve AutoHotkey scripts - not exhaustive! Examples for others.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn, All
#Warn, Unreachable, Off ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%\ResolveHelper ; Ensures a consistent starting directory.
SetDefaultMouseSpeed 1
#SingleInstance, Force
@in03
in03 / Currently-Opened-Folders.md
Created September 25, 2021 01:02 — forked from akaleeroy/Currently-Opened-Folders.md
Easy Access to Currently Opened Folders

Easy Access to Currently Opened Folders

Windows Enhancement Productivity

Enhance Open... or Save As... dialogs with a quick way to navigate to currently opened folders.

Easy Access to Currently Opened Folders - Demo

This is an AutoHotkey script that gives common file selection dialogs an extra feature: middle-clicking invokes a menu of currently opened folders. Say you want to save or upload something to/from a folder you've got open in Windows Explorer. The dialog box pops up with the last folder (from another project) or My Documents, and now you have to manually navigate to the folder you want, or copy-paste its path from the open Explorer window. I wanted to get to the active locations quicker. Recent Items wasn't exactly helping, so I made this by forking FavoriteFolders.ahk by Savage. Tested