Skip to content

Instantly share code, notes, and snippets.

View datavikingr's full-sized avatar

Alex Haskins datavikingr

  • Tektronix
  • Baltimore, MD
View GitHub Profile
@datavikingr
datavikingr / crostinititlebars.txt
Created October 23, 2023 18:30
Chromebook Crostini (Linux) Titlebars
# Open a terminal on your chromebook
# Create the service file
mkdir -p ~/.config/systemd/user/sommelier-x@0.service.d
# Populate the service with the color override of choice
echo -e '[Service]\nEnvironment="SOMMELIER_FRAME_COLOR=#3c3f41"' > ~/.config/systemd/user/sommelier-x@0.service.d/override.conf
# REBOOT THE CHROMEBOOK
@datavikingr
datavikingr / tryuntilsuccess.txt
Created January 20, 2023 16:13
Python: Try until Success loop
# Dead simple try-until-success blob.
# I do a lot of OCR based web-scraping for work, and waiting on Java frontends to load consistently breaks my automation.
# This bug-fixes the OCR library not finding the object to click, well enough enough to complete the whole pass without restarts.
import time
while True:
    try:
        #some code
    except:
@datavikingr
datavikingr / gist:f03db5a9c9ce947af51ef0d94cc8e4ce
Created August 16, 2022 01:01
cat pipe into /usr (copying data into sudo/root-spaces via script)
#Establish the test file
#sudo touch /usr/share/xsessions/test-delete.desktop
#Commented the above. File now exists.
#Test 1
#cat << EOF > /usr/share/xsessions/test-delete.desktop
#[Desktop Entry]
#Encoding=UTF-8
#Name=test
#Comment=test - any window manager