This file contains hidden or 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 perl | |
| use v5.40; | |
| my @nato = qw ( alfa | |
| bravo | |
| charlie | |
| delta | |
| echo | |
| foxtrot | |
| golf |
This file contains hidden or 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
| # Fix the Google Maps URLs in the MS 150 cue sheet | |
| # | |
| # $ python fix_ms150_waypoint.py 'https://www.google.com/maps?q=N%252039%C3%82%C2%B0%252037.980%2520W%2520074%C3%82%C2%B0%252050.632' | |
| # https://www.google.com/maps?q=N+39°+37.980+W+074°+50.632 | |
| from sys import argv | |
| print(argv[1].replace('%2520', '+').replace('%C3%82%C2%B0', '')) |
This file contains hidden or 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 perl | |
| use strict; | |
| use warnings; | |
| use feature qw(:5.34); | |
| use experimental qw(signatures); | |
| use Algorithm::Combinatorics qw(permutations combinations); | |
| # solve BUNNY + BUNNY = RABBIT | |
| my @var = split '', 'BUNYRAIT'; |
This file contains hidden or 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
| 19:08 < Aloveth> Hi, Linode. Can i pay by JCB or UnionPay card? | |
| 19:09 -!- bencc1 [~bencc1@2a00:a040:197:3af:b3ae:86f:9c41:32fd] has quit [Ping timeout: 480 seconds] | |
| 19:11 < file> payment methods are on the site, https://www.linode.com/docs/guides/how-linode-billing-works/#payment-methods | |
| 19:11 < file> JCB or UnionPay are not directly in that list | |
| 19:15 -!- Aloveth [~oftc-webi@85.140.93.69] has quit [Remote host closed the connection] | |
| 19:20 -!- Aloveth [~oftc-webi@85.140.93.69] has joined #linode | |
| 19:20 < Aloveth> Hi, Linode. Can i pay by UnionPay card? | |
| 19:21 < file> payment methods are on the site, https://www.linode.com/docs/guides/how-linode-billing-works/#payment-methods | |
| 19:21 < file> JCB or UnionPay are not directly in that list | |
| 19:21 < Aloveth> Will you update list?) |
This file contains hidden or 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
| Feb 11 19:42:41 scruffy dbus-daemon[1908]: [system] Reloaded configuration | |
| Feb 11 19:42:41 scruffy dbus-daemon[1908]: message repeated 2 times: [ [system] Reloaded configuration] | |
| Feb 11 19:42:41 scruffy systemd[1]: Reloading. | |
| Feb 11 19:42:41 scruffy systemd[1]: /lib/systemd/system/plymouth-start.service:17: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed. | |
| Feb 11 19:42:41 scruffy systemd[1]: /lib/systemd/system/dbus.service:12: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed. | |
| Feb 11 19:42:41 scruffy systemd[1]: /lib/systemd/system/rpc-statd.serv |
This file contains hidden or 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
| (defun wrap-tex-region (cmd) | |
| "Wraps the region in a TeX command" | |
| (interactive "*") | |
| (exchange-point-and-mark) | |
| (insert "\\" cmd "{") | |
| (exchange-point-and-mark) | |
| (insert "}") | |
| ) | |
| (defun emph-region () |
This file contains hidden or 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 math | |
| import re | |
| def sieve(upto): | |
| primes = set(range(2,upto+1)) | |
| for i in range(2, int(math.sqrt(upto)+1)): | |
| if i in primes: | |
| primes -= set(range(i**2, upto, i)) | |
| return list(primes) |
This file contains hidden or 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/local/bin/perl -w | |
| # $Id: watch-http,v 1.3 2007/03/26 11:58:59 waltman Exp $ | |
| use strict; | |
| use LWP::Simple; | |
| my $dir = "$ENV{HOME}/.watch-http"; | |
| chdir $dir | |
| or die "Can't chdir to $dir: $!\n"; |
This file contains hidden or 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/local/bin/perl | |
| # send out a warning email if it's $N days before a PLUG meeting | |
| use strict; | |
| use warnings; | |
| use feature qw(:5.30); | |
| use experimental qw(signatures); | |
| use Date::Manip; | |
| my $N = 3; |
This file contains hidden or 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 | |
| # PLUG North is on the 2nd Tueday of the month, and PLUG Central | |
| # is on the 1st Wednesday of the month. North is always the Tuesday | |
| # after Central unless, like in May 2019, the first of the month is | |
| # a Wednesday. I argued that this only happens 1/7 of the time. This | |
| # is an attempt to demonstrate it programmatically. | |
| def months_starting_on_wed(jan1, year): | |
| days_in_month = [ |
NewerOlder