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
# Copyright (c) 2023 Gonçalo Baltazar <[email protected]> | |
# MIT License | |
# this macro can be used to manipulate face geometry (scale and origin vertex) | |
# it was specially made to rescale imported faces (e.g. svg) | |
# imported geometry may have undesired scale and position, depending on the | |
# original file (positions, translations, dpi etc.) | |
# after importing, select a single face vertex and run the macro |
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 | |
# Copyright (c) 2022 Gonçalo Baltazar <[email protected]> | |
# MIT License | |
# Extract music/audio from 'Bully: Scholarship Edition' on PC. | |
# This script expects the game to be installed on Linux using Steam. | |
# Use Proton to install Bully on Steam, then run the script: | |
# - Open the game properties |
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
// control a hue lights group from a shelly device, without the cloud | |
// for shelly gen2 devices that have script support | |
// author: goncalomb <[email protected]> | |
// year: 2022 | |
// 1. use the hue debugger (clip.html) to create a new username (POST to /api), see below | |
// 2. change HUE_URL and HUE_USERNAME | |
// 3. optionally change HUE_GROUP, SHELLY_INPUT and EDGE_SWITCH | |
// 4. add the script to your shelly (web ui) | |
// 5. done |
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/env python3 | |
# Copyright (c) 2022 Gonçalo Baltazar <[email protected]> | |
# MIT License | |
import os, argparse, shutil, tempfile, requests, zipfile | |
import xml.etree.ElementTree as ET | |
tmp_dir = os.path.join(tempfile.gettempdir(), 'ps-names') | |
datfile_list = [ |
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 | |
set -e | |
# check if is valid repo | |
git rev-parse HEAD >/dev/null | |
# cd to top level | |
cd -- "$(git rev-parse --show-toplevel)" |
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 | |
# Copyright (c) 2021 Gonçalo Baltazar <[email protected]> | |
# MIT License | |
# pip3 install --upgrade youtube-dl | |
# ffmpeg -y -loglevel repeat+info -i file:video.xyz -i file:audio.xyz -c copy -map 0:v:0 -map 1:a:0 file:out.mkv | |
set -eo pipefail | |
cd -- "$(dirname -- "$0")" |
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 | |
set -ex | |
mkdir -p snapraid | |
cd snapraid | |
REL_JSON=$(curl -sS "https://api.github.com/repos/amadvance/snapraid/releases/latest" | grep browser_download_url) | |
if [[ ! "$REL_JSON" =~ \"browser_download_url\":\ \"https:\/\/github.com\/[^\"]+\/releases\/download\/v([^\"]+)\/(snapraid-[^\"]+.tar.gz)\" ]]; 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 | |
# Copyright (c) 2020 Gonçalo Baltazar <[email protected]> | |
# MIT License | |
# download all youtube channel videos with maximum information | |
# pip3 install --upgrade youtube-dl | |
# ffmpeg -y -loglevel repeat+info -i file:video.xyz -i file:audio.xyz -c copy -map 0:v:0 -map 1:a:0 file:out.mkv |
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/sh | |
# Copyright (c) 2019 Gonçalo Baltazar <[email protected]> | |
# MIT License | |
# Open a root shell on a Kubernetes cluster Node (no ssh). | |
# It uses a privileged container to unlock Linux capabilities and chroot to | |
# change into the root filesystem of the Node for full access. |
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 | |
# Copyright (c) 2019 Gonçalo Baltazar <[email protected]> | |
# MIT License | |
# Grafana Dashboard Kiosk using Google Chrome (or Chromium) | |
# opens an independent google chrome instance with a custom | |
# extension that injects Authorization headers for grafana |
NewerOlder