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 perl | |
use v5.28; | |
use warnings; | |
use Path::Tiny; | |
use String::ShellQuote; | |
my $dir = path(shift // '..'); | |
# Convert the .opus files by piping to opusdec first. |
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 perl | |
# Would it be worth replacing this Perl code? | |
# https://oylenshpeegul.gitlab.io/from-perl-to-rust/traits.html | |
use v5.32; | |
use Object::Pad; | |
role Area { | |
requires area; |
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
{"ANA":{"Adam Henrique":{"lastName":"Henrique","nationality":"CAN"},"Ben Hutton":{"lastName":"Hutton","nationality":"CAN"},"Cam Fowler":{"lastName":"Fowler","nationality":"USA"},"Carter Rowney":{"lastName":"Rowney","nationality":"CAN"},"Danton Heinen":{"lastName":"Heinen","nationality":"CAN"},"Derek Grant":{"lastName":"Grant","nationality":"CAN"},"Hampus Lindholm":{"lastName":"Lindholm","nationality":"SWE"},"Isac Lundestrom":{"lastName":"Lundestrom","nationality":"SWE"},"Jacob Larsson":{"lastName":"Larsson","nationality":"SWE"},"Jakob Silfverberg":{"lastName":"Silfverberg","nationality":"SWE"},"Jani Hakanpaa":{"lastName":"Hakanpaa","nationality":"FIN"},"John Gibson":{"lastName":"Gibson","nationality":"USA"},"Josh Mahura":{"lastName":"Mahura","nationality":"CAN"},"Josh Manson":{"lastName":"Manson","nationality":"CAN"},"Kevin Shattenkirk":{"lastName":"Shattenkirk","nationality":"USA"},"Max Comtois":{"lastName":"Comtois","nationality":"CAN"},"Max Jones":{"lastName":"Jones","nationality":"USA"},"Nicolas Deslaurie |
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 perl | |
use v5.28; | |
use warnings; | |
use experimental qw(signatures); | |
use Data::Printer; | |
use Encode qw(encode); | |
use Getopt::Long::Descriptive; | |
use Interpolation E => 'eval'; | |
use Mojo::JSON qw(decode_json encode_json); |
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
;; Use some Perl to insert the date. | |
(defun myday () | |
"print the date" | |
(interactive) | |
(call-process "perl" nil t nil "-e" " | |
# perl code here | |
my @Monat = qw(Januar Februar Maerz April Mai Juni Juli August | |
September Oktober November Dezember); | |
my @Tag = qw(Sonntag Montag Dienstag Mittwoch Donnerstag Freitag |
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 perl | |
use v5.16; | |
use warnings; | |
use Devel::Refcount qw(refcount); | |
my $href = {}; | |
say "BEGIN:" . refcount($href); |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
) | |
func main() { |
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 python | |
import argparse | |
import json | |
import jsonschema | |
parser = argparse.ArgumentParser( | |
description='validate the json file against the json schema') | |
parser.add_argument( | |
'datafile', type=argparse.FileType('r'), |
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 perl | |
# Download all the files in a daily playlist from tunes.io | |
# | |
# https://gist.github.com/3734797 | |
$ENV{MOJO_MAX_MESSAGE_SIZE} = 30_000_000; | |
use v5.16; | |
use warnings; |
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
$ notes init | |
Initializing notes (/home/tim/.notes)... | |
Initialized empty Git repository in /home/tim/.notes/.git/ | |
$ notes add Hello World | |
Waiting for Emacs... | |
fatal: No configured push destination. | |
Either specify the URL from the command-line or configure a remote repository using | |
git remote add <name> <url> |
NewerOlder