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 requests | |
import json | |
def get_folder_structure(token, base_url, debug_mode=False, path="/api/assets"): | |
if debug_mode: | |
print(f"Fetching folder structure from {base_url}{path}") | |
else: | |
print(".", end="", flush=True) | |
headers = { |
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
## https://jwstanly.com/blog/article/Port+Forwarding+WSL+2+to+Your+LAN/ | |
## Execute with: powershell.exe -File "C:\Users\wunsch\Bridge-WslPorts.ps1" | |
Start-Transcript -Path "C:\Users\wunsch\Bridge-WslPorts.log" -Append | |
$ports = @(80, 443, 1234, 3000, 4502, 4503, 4326, 4327, 5000, 10000, 25565, 25575); | |
$wslAddress = bash.exe -c "ifconfig eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'" | |
if ($wslAddress -match '^(\d{1,3}\.){3}\d{1,3}$') { |
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 | |
import requests | |
import json | |
def load_config(filename="config.json"): | |
try: | |
with open(filename, 'r') as file: | |
config = json.load(file) | |
return config |
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
version: "3.8" | |
## Set-up help | |
## - https://containers.fan/posts/setup-minecraft-server-on-docker/ | |
services: | |
rcon: | |
image: itzg/rcon | |
container_name: rcon | |
restart: unless-stopped |
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
systemctl list-units --type=service |
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 | |
# Check if pv is installed | |
if ! command -v pv &> /dev/null; then | |
echo "Error: 'pv' command not found. Please install it before running the script." | |
exit 1 | |
fi | |
# Check if jq is installed | |
if ! command -v jq &> /dev/null; then |
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 | |
SHELLY_KEY=<shelly-key from https://home.shelly.cloud/index.html#/user_settings> | |
SHELLY_CLOUD_SERVER=<shelly-cloud-server from https://home.shelly.cloud/index.html#/user_settings eg. https://shelly-61-eu.shelly.cloud> | |
DEVICE_ID= <device-id from https://home.shelly.cloud> | |
CSV_OUTPUT_FILE=shelly_values.csv | |
curl -s -X POST $SHELLY_CLOUD/device/status -d "id=$DEVICE_ID&auth_key=$SHELLY_KEY" | jq -r '.data.device_status."em:0" | del(.["user_calibrated_phase"]) | [.]' | \ | |
jq -r '(map(keys) | add | unique) as $cols | map(. as $row | $cols | map($row[.])) as $rows | $cols, $rows[] | @csv' > file.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
// this code is the same as the servlet but for grovy console: https://github.com/OlsonDigital/aem-groovy-console | |
// OPTIONS | |
def PATH = '/content/dam' | |
def query = createQuery([path:PATH, type:'nt:file', 'p.limit':'99999999999999999']) | |
def result = query.getResult(); | |
long totalSizeInKB = 0 | |
result.getHits().each{ | |
def node = it.node |
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
<?xml version="1.0" encoding="utf-8"?> | |
<packages> | |
<package id="7zip"/> | |
<package id="adobe-creative-cloud"/> | |
<package id="ant"/> | |
<package id="asio4all"/> | |
<package id="astrogrep"/> | |
<package id="atom"/> | |
<package id="bluejeansapp"/> | |
<package id="brackets"/> |
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
mvn clean install -Dmaven.test.skip=true -Dbaseline.skip=true -Dmaven.javadoc.skip=true -Dcheckstyle.skip | |
## test.skip -> skip tests | |
## baseline.skip -> consinstency check if version you compile is "valid", when creating "non-existing" or sample builds - this can/should be turned off | |
## javadoc.skip -> skip javadoc generation (makes it faster) |
NewerOlder