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 | |
# 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 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 | |
# Not proud of this one. It had multi-battery supported shunted on when I got a new laptop and Waybay output taped on too. Could use to be cleanud up a lot, but it does the job. | |
my $output; | |
my $bar = 0; | |
if ($ARGV[0] eq '-h' || $ARGV[0] eq '--help') { | |
print' | |
pow.pl - Power Status Script |
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 Data::Dump qw | dump |; | |
use LWP::UserAgent; | |
use JSON::XS; | |
my $ua = LWP::UserAgent->new(); |
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 Net::Ping; | |
my $file = "/tmp/amihome"; | |
my $host = "192.168.2.127"; |
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 | |
# Accompanying SystemD Unit file compatible with these locations/user: https://gist.github.com/JohnMertz/c6bb4a9298dd3dc53b8030ff50466226 | |
# | |
# Expects the following minecraft directories: | |
# ./ The PWD is taken dynamically. In the SystemD unit, it is /var/lib/minecraft | |
# current The latest version. This will be the executable directory. | |
# 1.16.2 Directories will be created for every old version | |
# update_minecraft.pl This script | |
# |
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
[Unit] | |
Description=Minecraft | |
After=network.target | |
[Service] | |
Type=simple | |
User=minecraft | |
Group=minecraft | |
WorkingDirectory=/var/lib/minecraft/current | |
ExecStart=java -jar -Xmx2G -Xms1G server.jar --nogui |
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 | |
######################################################################## | |
# Dependencies | |
######################################################################## | |
# | |
# Depends on JSON::XS and Proc::ProcessTable | |
# | |
# Debian: | |
# apt install libjson-xs-perl libproc-processtable-perl |
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; | |
# Dependencies | |
use LWP::UserAgent; # Usually pre-installed, available on CPAN | |
use XML::Hash::XS; # CPAN or libxml-hash-xs-perl on Debian | |
# Feeds that should be used if no arguments are provided |