Skip to content

Instantly share code, notes, and snippets.

View ran-dall's full-sized avatar
🗿
It's a Trap!

Randall ran-dall

🗿
It's a Trap!
View GitHub Profile
@ran-dall
ran-dall / CrowdStrikeRecovery.ps1
Created July 19, 2024 14:56
(Semi-)Automated CrowdStrike Driver Cleanup / Recovery
# Function to delete the specified file in Safe Mode
function Delete-CrowdStrikeFile {
$directoryPath = "C:\Windows\System32\drivers\CrowdStrike"
$filePattern = "C-00000291*.sys"
# Ensure the directory exists
if (Test-Path -Path $directoryPath) {
$files = Get-ChildItem -Path $directoryPath -Filter $filePattern
if ($files) {
foreach ($file in $files) {
@ran-dall
ran-dall / SetupDevDrivePackageCache.ps1
Created June 25, 2024 21:45
This PowerShell script is designed to set up various development tool caches on a specified Dev Drive (e.g., D:\packages). It ensures that each tool's cache directory is properly created, sets global environment variables to point to these new directories, and moves any existing cache contents to the new locations. Additionally, the script check…
# Define the Dev Drive base path
$DevDrive = "D:\packages"
# Function to create a directory if it doesn't exist
function Ensure-Directory {
param (
[string]$Path
)
if (-not (Test-Path -Path $Path)) {
New-Item -Path $Path -ItemType Directory -Force
@ran-dall
ran-dall / SetupDevDrivePackageCache.ps1
Created June 25, 2024 21:45
This PowerShell script is designed to set up various development tool caches on a specified Dev Drive (e.g., D:\packages). It ensures that each tool's cache directory is properly created, sets global environment variables to point to these new directories, and moves any existing cache contents to the new locations. Additionally, the script check…
# Define the Dev Drive base path
$DevDrive = "D:\packages"
# Function to create a directory if it doesn't exist
function Ensure-Directory {
param (
[string]$Path
)
if (-not (Test-Path -Path $Path)) {
New-Item -Path $Path -ItemType Directory -Force
@ran-dall
ran-dall / gpt-repository-loader.Dockerfile
Created May 3, 2024 01:48
This Docker container facilitates the use of gpt-repository-loader, a CLI tool that formats Git repositories for AI analysis.
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Install git
RUN apt-get update && \
apt-get install -y git && \
rm -rf /var/lib/apt/lists/*
# Set the working directory in the container
WORKDIR /usr/src/app
@ran-dall
ran-dall / dracula-nextcloud.css
Created January 15, 2022 19:06
Dracula Theme for NextCloud
:root {
--color-hover-blue:rgba(75, 110, 175, 0.4);
--color-plasma-blue:rgba(75, 110, 175, 1);
--color-cardboard-gray: rgba(210, 210, 210, 1);
--color-coastal-fog: rgba(127, 140, 141, 1);
@ran-dall
ran-dall / one-shot.sh
Created October 3, 2022 14:46
Gentoo `merge-usr` One Shot
emerge -v1 sys-apps/merge-usr; \
merge-usr; \
eselect profile set {n+1}; \
emerge --update --deep --changed-use @world
@ran-dall
ran-dall / usb-suspend-control
Created August 26, 2022 14:24
Disable a device from resuming system after suspending on Linux
#!/bin/bash
# Adapted from uglic's StackOverflow response
# https://askubuntu.com/questions/1328823/disable-specific-device-from-waking-up-the-system
while getopts v:p:s: flag
do
case "${flag}" in
v) vendor=${OPTARG};;
p) product=${OPTARG};;
s) state=${OPTARG};;

Keybase proof

I hereby claim:

  • I am ran-dall on github.
  • I am randall_ (https://keybase.io/randall_) on keybase.
  • I have a public key ASA8wlV7E58tR9yIklkeToSJHFgAzCWqL3il13Cubrcy0Ao

To claim this, I am signing this object: