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
@echo off | |
setlocal | |
: -------------------------------------------------- | |
: Avoiding the built in B2 backend according to the docs, and I could not make pruning work with the S3 api (lifecycle delete rule did absolutely nothing). | |
: It's a bit clunky, but wokrs for me. Check this for more info: https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#backblaze-b2. | |
: You have to create the bucket and initialize the repository before running the script. | |
: -------------------------------------------------- |
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
#SingleInstance, Force | |
SendMode Input | |
SetWorkingDir, %A_ScriptDir% | |
#F:: | |
Run, Explorer | |
return | |
#S:: | |
ComplexRunner("Code.exe", "C:\path\to\Code.exe") |
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 | |
url="raw.githubusercontent.com" | |
echo "$(openssl s_client -connect $url:443 2>/dev/null </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'| openssl x509 -noout -fingerprint -sha1)" | sed "s/:/ /g" |
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
# automate reporting after homlab starts with below cronjob: | |
# @reboot sleep 60 && python3 <path_to_script> | |
import logging | |
import requests | |
import shutil | |
from datetime import datetime | |
target = '<mount_path>' | |
ts_format = '%Y.%m.%d %H:%M:%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
I had to build VLC 3.x from src, and the below steps was the only way that I could achieve this in late 2020. | |
After many hours, I faced the problem that most of the tutorials out there are so outdated that they just cant work nowdays. | |
I builded it for Windows x64, on a Pop_os 20.04 VM using a builder container. | |
I don't know if it works with dev or not, and I can't even trust it to work after like half year, but here it is. | |
Tip: check build.sh manual for options. | |
BUILD STEPS: | |
1. install docker (https://gist.github.com/danielbene/98d7a5b08fd5c2c18d4883f250e4b6c6) | |
2. cd ~ | |
3. mkdir win64 |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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 | |
DIST_BASE="ubuntu" | |
apt update | |
apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
curl -fsSL https://download.docker.com/linux/$DIST_BASE/gpg | sudo apt-key add - | |
apt-key fingerprint 0EBFCD88 |
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 | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
apt-get install apt-transport-https | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
apt-get update | |
apt-get install sublime-text |