Skip to content

Instantly share code, notes, and snippets.

View freitzzz's full-sized avatar

João Freitas freitzzz

View GitHub Profile
from krita import *
import random
application = Krita.instance()
currentDoc = application.activeDocument()
currentDocWidth = currentDoc.width()
currentDocHeight = currentDoc.height()
# gets layers that are not nested
adb root
adb remount
adb reboot
adb root
adb remount
@freitzzz
freitzzz / list-gradle-dependencies-java-version.sh
Last active February 15, 2024 11:31
(Gradle) List all dependencies Java version
tmpd=$(mktemp -d); (cd $tmpd; (find ~/.gradle/caches/transforms-3/ -name "*.jar" -print0 | xargs -0 -I F cp F .); (for i in *.jar; do unzip "$i" -d "${i%%.jar}"; done); (find . -name "*.class" -print0 | xargs -0 file > ~/Desktop/classes.txt); cd -; rm -rf $tmpd)
https://5c65286fc6ace.streamlock.net/cancaonova/CancaoNova/playlist.m3u8
#!/usr/bin/env python3
import sys
import json
formatted = list(map(lambda x: x.replace('"', '\"'), sys.stdin.read().splitlines()))
print(json.dumps(formatted, indent=2))
@freitzzz
freitzzz / clear_pass_configure.bash
Last active August 18, 2023 14:57
(debian/ubuntu) One click Clear Pass configuration script
#!/usr/bin/env bash
# This is an one-click install script to configure ClearPass OnGuard. This script is intended to be run on Debian / Ubuntu based systems.
banner="
__
____/ /__ ___ _____ ___ ___ ____ ___
/ __/ / -_) _ `/ __/ / _ \/ _ `(_-<(_-<
\__/_/\__/\_,_/_/ / .__/\_,_/___/___/
/_/
@freitzzz
freitzzz / scrcpy_install.bash
Created August 15, 2023 15:25
(debian/ubuntu) One click Scrcpy Install script
#!/usr/bin/env bash
# This is an one-click install script using the instructions listed on the official scrcpy repo: https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md
# This script is intended to be run on Debian / Ubuntu based systems.
banner="
____________ __________ __
/ __/ ___/ _ \/ ___/ _ \ \/ /
_\ \/ /__/ , _/ /__/ ___/\ /
/___/\___/_/|_|\___/_/ /_/
@freitzzz
freitzzz / dlt_viewer_install.bash
Last active August 15, 2023 10:30
(debian/ubuntu One click DLT Viewer Install script
#!/usr/bin/env bash
# This is an one-click install script using the instructions listed on the official dlt-viewer repo: https://github.com/COVESA/dlt-viewer/blob/master/INSTALL.md
# This script is intended to be run on Debian / Ubuntu based systems.
banner="
___ __ ______ _ __ ____ ____ _ __ ____ ___
/ _ \ / / /_ __/____| | / // _// __/| | /| / // __// _ \
/ // // /__ / / /___/| |/ /_/ / / _/ | |/ |/ // _/ / , _/
/____//____//_/ |___//___//___/ |__/|__//___//_/|_|
@freitzzz
freitzzz / docker_install.bash
Last active August 14, 2023 19:15
(debian/ubuntu/elementaryos) One click Docker Install script
#!/usr/bin/env bash
# This is an one-click install script using the instructions listed on the official Docker docs: https://docs.docker.com/engine/install/debian/
# This script is intended to be run on Debian / Ubuntu based systems.
banner=" _____ __
/__ / ____ _____/ /_____ _____
/ / / __ \/ ___/ //_/ _ \/ ___/
/ /__/ /_/ / /__/ ,< / __/ /
/____/\____/\___/_/|_|\___/_/
@freitzzz
freitzzz / snoweffect.js
Created January 5, 2023 12:58
Plug n Play Global DOM Snow Effect
https://embed.im/snow/?utm_source=tldrnewsletter
<script src="https://app.embed.im/snow.js" defer></script>
/* https://embed.im/snow */
var embedimSnow = document.getElementById("embedim--snow");
if (!embedimSnow) {
function embRand(a, b) {
return Math.floor(Math.random() * (b - a + 1)) + a
}