Skip to content

Instantly share code, notes, and snippets.

@dadatuputi
dadatuputi / New-DSLoginPassword.ps1
Last active April 7, 2025 09:51
Powershell Script to generate new DS Login password
# Invoke-WebRequest -Uri "https://gist.github.com/dadatuputi/d2ead8ee219da5922bbcbf6b7325857f/raw/dfd62e47f3f022c3faddbf3aee5a029c770264ae/New-DSLoginPassword.ps1" -OutFile "New-DSLoginPassword.ps1"
param(
[int]$Length = 128,
[switch]$ProvideCurrentPassword,
[Parameter()]
[Alias('h', '?')]
[switch]$Help
)
@dadatuputi
dadatuputi / wise_to_ynab.py
Last active October 1, 2024 09:51
Wise CSV to YNAB CSV
import argparse
import pandas as pd
from enum import Enum
class Direction(Enum):
OUT = -1
IN = 1
# Get input and output file as arguments
parser = argparse.ArgumentParser(description="Convert Wise CSV to YNAB CSV")
@dadatuputi
dadatuputi / ancestornames.py
Created June 27, 2023 09:13
Convert a GED file to a list of first and last names - used in looking through a family tree for baby names
from gedcom.element.individual import IndividualElement
from gedcom.parser import Parser
import re, string
def valid_name(name):
if not name:
return False
name = name.strip()
if not name:
return False
@dadatuputi
dadatuputi / reception_hack_demo.py
Created January 27, 2023 16:27
Hack Demo for Reception-age
#!/usr/bin/env python3
import requests
import argparse
import inquirer
import sys, select, os
import time
from colorama import Fore, Style
kickoff = [
@dadatuputi
dadatuputi / amcrest_timelapse.py
Created July 22, 2022 19:32
Convert Amcrest images to Timelapse Video
import os
import shutil
# for root, dirs, files in os.walk('G:\\', topdown=False):
# if 'dav' in root:
# continue
# for name in files:
# if '.jpg' in name:
# _full = os.path.join(root, name)
@dadatuputi
dadatuputi / get-windscribe-port.py
Last active June 7, 2022 16:02
Uses Selenium to get (or refresh) your Windscribe ephemeral port, absent a proper API to do it. It does not require a gui, or even x to be installed.
#!/usr/bin/python3
# Step 1: install firefox: $ sudo apt install firefox
# Step 2: install selenium: $ pip3 install selenium
# Step 3: install geckodriver: https://github.com/mozilla/geckodriver/releases
from selenium.webdriver.firefox.options import Options as FirefoxOptions
from selenium.common.exceptions import NoSuchElementException
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
@dadatuputi
dadatuputi / nvidia-driver-update.sh
Last active January 21, 2025 13:08
Proxmox script to update nvidia driver on system and in containers
#!/bin/bash
function usage() {
echo "Usage: $0 -u DRIVERURL -c CTID0,CTID1,... [-p]" 1>&2; exit 0;
}
while getopts ":hu:c:b" opt; do
case "$opt" in
u) driverurl="$OPTARG";;
c) containers="$OPTARG";;
@dadatuputi
dadatuputi / pct-update.sh
Last active January 6, 2022 00:24
Update all Proxmox containers
#!/bin/bash
# update all containers
# modified from https://seantemple.com/proxmox/bash/admin/2017/10/01/update-all-containers.html
function update_container() {
container=$1
tmux new-window -t $2:$3 -n "$container" -d
tmux send-keys -t $2:$3 "pct exec $container -- bash -c 'apt update && apt upgrade -y && apt autoremove -y && apt clean' ; tmux wait-for -S $container" Enter
tmux wait-for $container
@dadatuputi
dadatuputi / import_milstar_pdf.py
Last active November 1, 2021 12:22
Mil Star Statement PDF to CSV
Moved to https://github.com/dadatuputi/import_milstar