Skip to content

Instantly share code, notes, and snippets.

View 2shortplanks's full-sized avatar

Mark Fowler 2shortplanks

View GitHub Profile
@2shortplanks
2shortplanks / bytey
Last active December 19, 2015 02:08
#!/usr/bin/env perl -s
use strict;
use warnings;
use Term::ANSIColor qw(colored);
$::r = $::r ? "" : '(?![\\x{1b}]\\[\\d+m)';
while (<>) {
#!/usr/bin/env perl
use 5.012;
use warnings;
use JSON::XS qw(decode_json);
use Devel::Peek;
foreach (1..2) {
my $string = '{"a":false,"b":false}';
Things I would like my AppleTV to do:
0. Watch Amazon Prime
1. Have a system wide "kids mode" and "adult mode"
2. A remote App for the iPhone / iPad that mirrors the menu navigation on the iPhone / iPad screen
3. A remote App for the iPhone / iPad that shows me keyframes to navigate within an episode
@2shortplanks
2shortplanks / metaqq.pl
Created January 24, 2014 14:16
A script I use in TextExpander to insert 'print STDERR "zlonk bloop\n";' etc into my Perl scripts whenever I type 'metaqq' (for debugging)
#!/Users/mark/perl5/perlbrew/perls/perl-5.16.0/bin/perl
use 5.016;
use warnings;
use Acme::MetaSyntactic;
say 'print STDERR "',
join(' ', Acme::MetaSyntactic->new( 'batman' )->name(2)),
'\\n";'
@2shortplanks
2shortplanks / How Long Till Xmas.kmmacros
Created January 24, 2014 14:22
KeyboardMaestro example macro to speak how long until christmas.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>IsActive</key>
<true/>
<key>Macros</key>
@2shortplanks
2shortplanks / Guess My Number.kmmacros
Created January 24, 2014 14:24
Example KeyboardMaestro script to play Guess My Number
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>IsActive</key>
<true/>
<key>Macros</key>
@2shortplanks
2shortplanks / hence.kmmacros
Created January 24, 2014 14:27
KeyboardMaestro macro to insert the YYYY-MM-DD n days hence
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>IsActive</key>
<true/>
<key>Macros</key>
@2shortplanks
2shortplanks / Low Battery Alert.kmmacros
Created February 5, 2014 23:23
Keyboard Maestro Macro to pop open a big dialog when you're about to run out of power (rather than OSX 10.9's small notification)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>IsActive</key>
<true/>
<key>Macros</key>
mark@travis-5:~$ perl find2.pl /usr/share/dict/words
acalycine calycine calcine alcine aline line lie ie i
acalycine calycine calcine alcine aline line lie li i
acalycine calycine calcine alcine aline line lin in i
acalycine calycine calcine alcine aline line lin li i
acalycine calycine calcine alcine aline alin lin in i
acalycine calycine calcine alcine aline alin lin li i
acalycine calycine calcine alcine aline alin aln an a
acalycine calycine calcine alcine aline alin aln al a
acaridean caridean caridea carida carid arid rid id i
@2shortplanks
2shortplanks / dataprinterfatpack.pl
Created April 14, 2014 21:57
Fatpacked Data Printer
#!/usr/bin/perl
# This chunk of stuff was generated by App::FatPacker. To find the original
# file's code, look for the end of this BEGIN block or the string 'FATPACK'
BEGIN {
my %fatpacked;
$fatpacked{"Clone/PP.pm"} = <<'CLONE_PP';
package Clone::PP;