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/perl -w | |
# Files containing current and max brightness values | |
my $cur_file = "/sys/class/backlight/intel_backlight/brightness"; | |
my $max_file = "/sys/class/backlight/intel_backlight/max_brightness"; | |
# About (See help() for more): | |
# Script to read and write to the backlight brightness file. Allows for easy control of the backlight without a proper backlight daemon (eg. when logged in to a console). | |
# Requires ownership/permissions for the brightness file. This can be automatically acquired with the following SystemD Unit: |
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/perl | |
use warnings; | |
use strict; | |
use Time::Local; | |
use JSON::XS; | |
use DBI; | |
my $file = "/path/to/export_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
#!/usr/bin/perl | |
# Manually trigger with `$0 -a` to log an exercise event for the day. | |
# Automatically run each morning with `$0 -c` to cycle out old data | |
# Simply outputs Bool for event today, count for the last 7 days and the goal | |
# Meant for a simple indicator widget so I know if a streak is at risk | |
use JSON::XS; | |
use Date::Calc; |
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/perl | |
use strict; | |
use warnings; | |
use WWW::Mechanize; | |
use JSON::XS; | |
use HTML::TreeBuilder; | |
my $pretty = 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
#!/usr/bin/perl | |
# This script fetches the performance data for various Tangerine Bank investment funds and exports them to: | |
# - CSVs called <fund_name>.csv with all historical data in format: "YYYY-MM-DD","12.34" | |
# - (optional) A single JSON file with trend data: {"Fund Name":{"0":12.34,"1":"12.56"...},"Fund Name":...} | |
# - (optional) PNG line chart | |
# All data is publicly available from: https://www.tangerine.ca/en/products/investing/performance | |
# This is just a handy way to use the data locally for various purposes. | |
# | |
# Should be run daily Tuesday-Saturday, such as with cron: |
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/perl | |
# Program to find all words from a given pool of letters. Written to solve the | |
# Android puzzle game "Wordscape". | |
use strict; | |
use warnings; | |
# Default Debian ispell dictionary | |
my $dict = "/etc/dictionaries-common/words"; |
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/perl | |
use strict; | |
use warnings; | |
use constant MONTH => sub{{ | |
'January' => 1, | |
'February' => 2, | |
'March' => 3, | |
'April' => 4, |
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/perl | |
# Note for GitHub: | |
# This script makes several assumptions based on the backup image I use. | |
# Mine is a freshly installed Debian image preconfigured just how I want it. | |
# The script relies on the name 'fresh-lxc' and IP '10.0.3.1' being set. | |
# It is also written with Debian Buster as the host, some paths may differ. | |
# Make changes appropriately. | |
use strict; |
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/perl | |
use strict; | |
use warnings; | |
use WWW::Mechanize; | |
use JSON::Any; | |
use HTTP::CookieJar::LWP; | |
my $user = 'username'; |
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/perl | |
use strict; | |
use warnings; | |
use JSON::XS; | |
# Checking for devices every time takes a few seconds, so store these | |
# settings in a file. Do so in /tmp so that it will be re-checked on reboot | |
my $tmp = '/tmp/cec-devices'; |