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
aalib | |
abseil-cpp | |
accountsservice | |
acl | |
adobe-source-code-pro-fonts | |
adwaita-cursors | |
adwaita-icon-theme | |
adwaita-icon-theme-legacy | |
alacritty | |
alsa-card-profiles |
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 | |
# Resource: https://pimylifeup.com/raspberrypi-hdmi-cec/ | |
# This will list all commands | |
# echo 'h' | cec-client -s -d 1 | |
echo 'triggering a HDMI-CEC scan to force the TV to properly identify all devices...' | |
echo 'scan' | cec-client -s -d 1 |
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
const SHORT_DELAY = 100; | |
const MEDIUM_DELAY = 250; | |
const LONG_DELAY = 500; | |
let messageChatIdx = 0 | |
let isRunning = false | |
let exceptionsInARow = 0 | |
const exceptionsInARowUntilNextChat = 40 |
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 | |
# This script converts DNG images to PNG images | |
# This should work with any raw image format that ImageMagick supports. | |
# And then compresses the PNG. | |
# | |
# This script is the result of trying to figure out how to convert | |
# Leica Q2 DNG files to PNG and compress them to save disk space | |
# In a way that can be ran as a cron job on a simple raspberry-pi NAS RAID | |
# As a self-managed backup solution. |
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 | |
# I am aware this can be handled via configuration instead. | |
# But sometimes, a script that solves the problem is better. | |
# This CAN cause issues if this runs while docker is appending logs to the file. | |
# It is possibly that if you use this, `docker logs` will throw an error due to a partial log entry being present and unparsable by docker. | |
# Don't use this if you don't understand what I just said in the line above. | |
LOG_PATH="$HOME/Library/Containers/com.docker.docker/Data/log/host" |
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 python3 | |
import time | |
import json | |
import requests | |
import psutil | |
from subprocess import Popen, PIPE | |
""" |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"City": "Holtsville", | |
"State short": "NY", | |
"State full": "New York", | |
"County": "SUFFOLK" | |
}, | |
{ | |
"City": "Adjuntas", |
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
# Beware! This file is rewritten by htop when settings are changed in the interface. | |
# The parser is also very primitive, and not human-friendly. | |
htop_version=3.3.0 | |
config_reader_min_version=3 | |
fields=0 124 48 45 6 5 17 18 38 39 2 46 47 49 1 | |
hide_kernel_threads=0 | |
hide_userland_threads=0 | |
hide_running_in_container=0 | |
shadow_other_users=0 | |
show_thread_names=0 |
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
''' | |
Might want to port this to C/C++ for a microcontroller in the future | |
I'm sure the arduino IDE has a `rand()` package for a better, more optimized version though, but was still fun | |
''' | |
# Custom random number generator parameters | |
custom_seed = 123456789 # The seed value | |
custom_a = 1664525 # Multiplier | |
custom_c = 1013904223 # Increment | |
custom_m = 4294967296 # Modulus, 2^32 |
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 python3 | |
from typing import Any | |
# Consider using the same binary lookup table approach a `switch` statement in C/C++ uses? | |
# NOTE: I know this is inefficient, I wrote this for fun / out of curiosity and did not allow myself to use any real hashing | |
# simply trying to leverage `hash()` felt like cheating, looking up hashing algo's also felt like cheating. | |
# Please don't assume I know nothing about hashing algo's from reading this |
NewerOlder