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
use strict; | |
use warnings; | |
use 5.010; | |
use Path::Iterator::Rule; | |
use File::Slurp; | |
die "Usage: $0 DIRs" if not @ARGV; | |
my $rule = Path::Iterator::Rule->new; |
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
use strict; | |
use warnings; | |
use 5.010; | |
use Path::Iterator::Rule; | |
use File::Slurp; | |
die "Usage: $0 DIRs" if not @ARGV; | |
my $rule = Path::Iterator::Rule->new; |
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
function substitute { | |
if [ -z "$1" -o -z "$2" ]; then | |
echo "Usage: substitue FROM_STRING TO_STRING [OPTION]..." | |
echo | |
echo "Replace all occurances of FROM_STRING (a sed-compatible regular" | |
echo "expression) with TO_STRING in all files for which ack-grep matches" | |
echo "FROM_STRING." | |
echo | |
echo "Any additional options are passed directly to ack-grep (e.g.," | |
echo " --type=html would only run the substitution on html files)." |
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
#!/bin/sh | |
# This file was generated by the xmeta commons-launcher maven plugin. | |
# Do not edit this file directly. | |
myPath=`dirname $0` | |
case `uname` in | |
CYGWIN*) # cygwin-specific stuff here | |
myPath=`cygpath -w "$myPath"` | |
;; | |
esac |
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
use strict; | |
use warnings; | |
use 5.010; | |
use Carp; | |
use English qw(-no_match_vars); | |
use FindBin '$RealBin'; | |
use Log::Log4perl qw(:easy); | |
use open qw/:std :utf8/; | |
use Path::Iterator::Rule; |
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
#! /bin/bash | |
# To make this work, you will need Vroom 0.28 or later. Slide notes are optional, but | |
# recommended. Slide titles won't be used for this application. | |
# | |
# Earlier versions of Vroom will work if you add the dashes in front of the vroom commands | |
# (e.g. `vroom -compile` and `vroom -html`). But the HTML is formatted a bit differently, so | |
# I make no promises that it will come out looking as good as the newest versions. | |
# You'll also need wkhtmltopdf. If you don't have it, you can get it here: |
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 5.016; | |
use common::sense; | |
use utf8::all; | |
# Use fast binary libraries | |
use EV; | |
use Web::Scraper::LibXML; | |
use YADA 0.039; |
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
use v6; | |
=begin pod | |
=TITLE Get list of files matching a pattern | |
=AUTHOR stmuk | |
You want a list of filenames matching a pattern | |
=end pod | |
sub MAIN(:$dir = ".") { | |
my @perl-files = dir $dir, test => /\.pl/; |
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
use FindBin '$RealBin'; | |
use Log::Log4perl qw(:easy); | |
my $log_file = $RealBin . "/show_image.log"; | |
#Init logging | |
Log::Log4perl->easy_init( | |
{ level => $DEBUG, | |
file => ":utf8>>$log_file", | |
layout => '%d %p> %m%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/bin/env perl | |
use feature qw{ say state unicode_eval unicode_strings } ; | |
use strict ; | |
use warnings ; | |
use utf8 ; | |
use Data::Dumper ; | |
use Mojo::DOM ; | |
use Web::Query ; |