sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
import os | |
from time import sleep | |
path = os.getcwd() | |
files = os.listdir(path) | |
#install package | |
os.system('sudo apt install calibre -y && sudo apt update') | |
#remove espacos e insere _ |
Install k3s + MetalLB in a cluster with RaspberryPi.
/boot/cmdline.txt
file and the configuration at the end of line: cgroup_memory=1 cgroup_enable=memory
TOKEN=`python3 -c "import secrets; print(secrets.token_hex(32))"`
----------------- SD CARD Sandisk 32GB Class 4 ---------------- | |
pi@raspberrypi:~ $ cat /proc/cpuinfo | grep Model | |
Model : Raspberry Pi Zero Rev 1.3 | |
pi@raspberrypi:~ $ ./test_disk_size.sh | |
Variable local not set, default will be /tmp/test_disk_speed | |
Variable size not set, default will be 1000 | |
Testing writing speed... | |
500+0 records in | |
500+0 records out | |
524288000 bytes (524 MB, 500 MiB) copied, 67.8816 s, 7.7 MB/s |
#!/bin/bash | |
local=$1 | |
size=$2 | |
if [[ ! -n $local ]]; then | |
echo "Variable local not set, default will be /tmp/test_disk_speed" | |
local='/tmp/test_disk_speed' | |
fi |
mkdir -pv /home/$USER/.local/bin && \ | |
cd /tmp && wget -c https://install.speedtest.net/app/cli/ookla-speedtest-1.1.1-linux-armhf.tgz && \ | |
tar -xvf ookla-speedtest-1.1.1-linux-armhf.tgz && \ | |
chmod +x speedtest && \ | |
mv speedtest /home/$USER/.local/bin && \ | |
speedtest --accept-license --accept-gdpr |
sudo apt install curl gnupg -y | |
curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/jellyfin.gpg | |
echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/$( awk -F'=' '/^ID=/{ print $NF }' /etc/os-release ) $( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release ) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list | |
sudo apt update && sudo apt install jellyfin -y |
#!/usr/bin/env groovy | |
/** | |
* List all Git branches of a repo. | |
* @author thabet.amer@gmail.com | |
* @since Jenkins 2.204.1 | |
* @params String url for Git repo URL, String credentialID, Bool activeChoice if ActiveChoice plugin used, String defaultBranch | |
* @return String array of branch names | |
* | |
* Dependencies: |
# Fabfile to: | |
# - update the remote system(s) | |
# - download and install an application | |
from fabric import Connection | |
from fabric import task | |
import os | |
import environ | |
root = environ.Path(__file__) - 1 # one folder back (/manage - 3 = /) |
# Board | |
# https://s.click.aliexpress.com/e/_9IDl91 | |
# ESPHome docs: | |
# - https://esphome.io/components/display/waveshare_epaper.html | |
# - https://esphome.io/components/spi.html#spi | |
# - https://esphome.io/components/display/index.html#formatted-text | |
substitutions: | |
esphome_name: esp32_ttgo_t5 |