This file contains hidden or 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/env bash | |
| set -euo pipefail | |
| # 1) Install acpid if missing | |
| if ! dpkg -s acpid >/dev/null 2>&1; then | |
| apt-get update | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y acpid | |
| fi | |
| # 2) Enable/start it if needed |
This file contains hidden or 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/env bash | |
| set -euo pipefail | |
| # Check if running as root, if not, re-run with sudo | |
| if [ "$EUID" -ne 0 ]; then | |
| echo "This script needs to read grub.cfg and modify boot settings." | |
| echo "Re-running with sudo..." | |
| exec sudo "$0" "$@" | |
| fi |
This file contains hidden or 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
| rem to disable private dns | |
| adb shell settings put global private_dns_mode off | |
| rem to enable private dns with hostname (example with dns.adguard.com) | |
| adb shell settings put global private_dns_mode hostname | |
| adb shell settings put global private_dns_specifier dns.adguard.com |
This file contains hidden or 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 | |
| set -o pipefail | |
| # Install 1Password password manager | |
| sudo apt update && sudo apt install 1password -y | |
| # Install vanilla GNOME desktop environment (without Ubuntu modifications) | |
| sudo apt purge pipewire-alsa pipewire-audio -y | |
| sudo apt install vanilla-gnome-desktop vanilla-gnome-default-settings -y |
This file contains hidden or 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
| # WIP | |
| # The script is compatible with Canonical Ubuntu (Always Free Eligible) Minimal | |
| sudo apt update | |
| sudo apt install wireguard | |
| # ifconfig to check your interfae | |
| # for Ubuntu 20.04 Minimal 2021.03.25-0 it's ens3 | |
| # Generate keys (WIP) |
This file contains hidden or 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 | |
| FILEPATH="" | |
| for arg in $@ | |
| do | |
| FILEPATH="${FILEPATH}${arg}" | |
| if [[ -f $FILEPATH ]]; then | |
| echo "Converting $FILEPATH to mp4" | |
| FILENAME_W_EXTENSION=$(basename "$FILEPATH") | |
| FILENAME="${FILENAME_W_EXTENSION%.*}" |
This file contains hidden or 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
| const crossConcatReducer = (acc, cur, idx) => { | |
| const gap = idx + 1; | |
| cur.forEach((element, i) => { | |
| const indexToInsert = (i + 1) * gap - 1; | |
| acc.splice(indexToInsert, 0, element); | |
| }); | |
| return acc; | |
| }; |
This file contains hidden or 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/python | |
| from sense_hat import SenseHat | |
| import os | |
| def get_cpu_temp(): | |
| res = os.popen('vcgencmd measure_temp').readline() | |
| return float(res.replace("temp=", "").replace("'C\n", "")) | |
This file contains hidden or 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
| # You need jq and curl installed: | |
| # sudo apt install jq curl -y | |
| #!/bin/bash | |
| # CHANGE THESE | |
| auth_email="[email protected]" | |
| auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # find in cloudflare account settings | |
| zone_identifier="023e105f4ecef8ad9ca31a8372d0c353" # get zone ID via API | |
| # Get zone ID |
This file contains hidden or 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
| // Test Webhook | |
| // https://app.mailgun.com/app/webhooks | |
| // WTFPL License | |
| import Foundation | |
| // Postbin URL | |
| let urlString = "http://bin.mailgun.net/d806fafc" | |
| // Sample Parameter: signature |