Skip to content

Instantly share code, notes, and snippets.

@dot-mike
dot-mike / speedtest_exporter.js
Created April 11, 2025 19:35
Speedtest.net export speedtest to csv from website
(function () {
const rows = document.querySelectorAll('tr.result-row');
const csvRows = [];
// CSV Header
csvRows.push([
'Date',
'Time',
'Ping (ms)',
'Download (Mbps)',
@dot-mike
dot-mike / collect.sh
Created March 10, 2025 14:13
Ubuntu system evidence collection script
#!/bin/bash
# Evidence Collection Script
# Gathers system and application information for auditing
# ====================== CONFIGURATION SECTION ======================
# Configure services to check here
SERVICES_TO_CHECK=(
#"glusterd"
)
@dot-mike
dot-mike / reverse.py
Created February 20, 2025 21:49
decrypts SWZ files
import struct
import zlib
import argparse
import sys
def rotate_left(value, shift, bit_size=32):
"""Rotate left a 32-bit integer."""
return ((value << shift) & (2**bit_size - 1)) | (value >> (bit_size - shift))
def decrypt_and_decompress(file_path):
@dot-mike
dot-mike / main.py
Created February 20, 2025 11:43
super duck punch flash sol save file editor
import hashlib
import random
def decrypt(input_string, key="keykey"):
chars_array = list("e7NjchMCEGgTpsx3mKXbVPiAqn8DLzWo_6.tvwJQ-R0OUrSak954fd2FYyuH~1lIBZ")
chars_length = len(chars_array)
# MD5 hash of the key
key_array = list(hashlib.md5(key.encode()).hexdigest())
# Split the input string into its components
random_key_array = list(input_string[:chars_length * 2])
@dot-mike
dot-mike / get_nodes_from_yaml.sh
Last active January 24, 2025 01:00
External group definition script for ClusterShell. Reads group definitions from a YAML file and outputs hostnames. This is created so we can store additional metadata with the hosts
#!/bin/bash
# External group definition script for ClusterShell
# Reads group definitions from a YAML file and outputs hostnames
# Default YAML file path
YAML_FILE="/etc/clustershell/groups.yaml"
# Parse command-line options
while getopts "f:" opt; do
case $opt in
@dot-mike
dot-mike / README.md
Last active January 20, 2025 21:49 — forked from travelhawk/README.md
Use vagrant and ansible on Windows (WSL2)

Use vagrant and ansible on Windows (WSL2)

Making Vagrant and Virtualbox installed on Windows as a provider is not well documented across the documentations. This document outlines how to set this up.

Requirements

  • Windows 11
  • Virtualbox
  • WSL2
@dot-mike
dot-mike / !ComputerCraft GUI Framework.md
Last active January 17, 2025 19:45
ComputerCraft GUI Framework

ComputerCraft GUI Framework

A flexible GUI framework for ComputerCraft that provides a complete windowing system with tabs, buttons, labels, lists and graphs.

Features

  • Tabbed interface support
  • Multiple UI elements (buttons, labels, lists)
  • Flexible positioning system with anchoring
  • Global and element-specific styling
@dot-mike
dot-mike / boxstarter.ps1
Last active December 20, 2024 19:11
Boxstarter script
# START http://boxstarter.org/package/nr/url?<url-gist>
#Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
choco install -y GoogleChrome
choco install -y Firefox
choco install -y 7zip.install
choco install -y microsoft-windows-terminal
choco install -y notepadplusplus.install
choco install -y fiddler
@dot-mike
dot-mike / new-vm-ps1
Created December 16, 2024 19:57
Hyper-V to create a new VM quickly from existing vhd file
$VMName = Read-Host 'Name your VM'
New-Item -Path C:\Hyper-V\ -Name "$VMname" -ItemType Directory -Force
Copy-Item -Path "C:\Hyper-V\W11DevEvalImage\WinDev2407Eval.vhdx" -Destination "C:\Hyper-V\$VMname\$vmname.vhdx" | Out-Null
New-VM -Name $VMName -Path C:\Hyper-V\$VMName -MemoryStartupBytes 8GB -VHDPath "C:\Hyper-V\$VMname\$vmname.vhdx" -Generation 2 -BootDevice VHD
Set-VM -Name $VMName -ProcessorCount 4
Set-VMMemory $VMName -DynamicMemoryEnabled $false
Set-VM -Name $VMName -CheckpointType Disabled
Connect-VMNetworkAdapter -VMName $VMName -SwitchName External
#TPM
@dot-mike
dot-mike / gist:3dec5d3440c0ca8203670475a80ca700
Created December 2, 2024 17:43
haproxy true master for redis
frontend redis-read
bind *:6379
default_backend redis-online
frontend redis-write
bind *:6380
default_backend redis-primary