Skip to content

Instantly share code, notes, and snippets.

View UZziell's full-sized avatar

uzziell UZziell

View GitHub Profile
@UZziell
UZziell / warp4google.sh
Last active March 21, 2023 10:08
Install and setup warp on debian based distros. Only routes Google, AWS Cloudfront traffic through warp.
#!/usr/bin/env bash
WG_CONFIG_DIR="/etc/wireguard"
WG_CONFIG_FILE="/etc/wireguard/wg0.conf"
function print_ok() {
echo -e "\033[0;32m[OK] $1 \033[0m"
}
function print_error() {
@UZziell
UZziell / CF-addRecord.sh
Created January 26, 2023 08:26
Add an A record to given cloudflare domains using API
#!/usr/bin/env bash
DOMAINS="example.com|example.info"
# Global API Key and email
EMAIL="userCF@email.com";
KEY="XXX";
# New Record details
SUB="subdomain"
@UZziell
UZziell / change-transaction-default-timeout.cli
Last active November 9, 2021 11:17
A working keycloak/mysql docker-compose
embed-server --server-config=standalone-ha.xml --std-out=echo
echo Changing transaction default timeout
/subsystem=transactions/:write-attribute(name=default-timeout,value=3600)
echo Done
stop-embedded-server
@UZziell
UZziell / allow-flash.py
Last active October 8, 2020 09:19
Allow certain urls to run flash using chromedriver and selenium
# Tested on Chrome Version 86.0.4240.75 (Official Build) (64-bit)
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
prefs = {
"profile.default_content_setting_values.plugins": 1,
"profile.managed_plugins_allowed_for_urls": ["https://example.com", "https://www.whatismybrowser.com:443"],
"plugins.run_all_flash_in_allow_mode": True,
@UZziell
UZziell / indenter.py
Created October 8, 2020 09:07
Read compressed json file and write indented json to another file.
import json
import time
FILE_NAME = "Preferences"
with open(FILE_NAME, "r") as rfp:
data = json.load(rfp)
with open(FILE_NAME+"-indented.json", "w") as wfp:
wfp.write(json.dumps(data, indent=4, sort_keys=True))