This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function usage() { | |
echo "Usage: $0 -u DRIVERURL -c CTID0,CTID1,..." 1>&2; exit 0; | |
} | |
while getopts ":hu:c:" opt; do | |
case "$opt" in | |
u) driverurl="$OPTARG";; | |
c) containers="$OPTARG";; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from bs4 import BeautifulSoup | |
import requests | |
import json | |
import subprocess | |
import sys | |
import certifi | |
def log_error(e): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
usage() { echo "Usage: $0 -p <POOL> (-s|-l)" 1>&2; exit 1; } | |
while getopts ":p:sl" o; do | |
case "${o}" in | |
p) | |
p=${OPTARG} | |
;; | |
s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import requests | |
import argparse | |
import inquirer | |
import sys, select, os | |
import time | |
from colorama import Fore, Style | |
kickoff = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/vbash | |
# From https://wiki.vyos.net/wiki/Configuration_scripting | |
# Check for correct group | |
if [ "$(id -g -n)" != 'vyattacfg' ] ; then | |
echo "switching to vyattacfg group" | |
exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" | |
exit 0 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
NewerOlder