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
#!/usr/bin/env bash | |
# Check if user is NOT root | |
if [ "$id -u" = 0 ]; then | |
echo "Please DO NOT run this script as root" | |
sleep 3 | |
exit 1 | |
fi | |
# Base devel |
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
Invoke-Expression (&starship init powershell) | |
########### | |
# MODULES # | |
########### | |
# PSReadLine | |
Import-Module PSReadLine | |
# Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward | |
# Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward | |
# Set-PSReadLineKeyHandler -Key Tab -Function Complete |
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 | |
# Get current charge start threshold (in percent) | |
charge_start=$(cat /sys/class/power_supply/BAT0/charge_start_threshold) | |
echo "Current charge start threshold: $charge_start%" | |
# Get current charge end threshold (in percent) | |
charge_end=$(cat /sys/class/power_supply/BAT0/charge_end_threshold) | |
echo "Current charge end threshold: $charge_end%" |
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
import json | |
import datetime | |
# Open the JSON file | |
with open('timeline.json') as f: | |
data = json.load(f) | |
# Open a new GPX file for writing | |
with open('timeline.gpx', 'w') as gpx_file: | |
# Write the GPX file header |