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/perl | |
use strict; | |
use warnings; | |
use List::MoreUtils qw(uniq); | |
sub get_generations { | |
my $person = shift; | |
my $last = pop @generations if $person !~ /mother|father/; | |
my @generational_people = map("${_}$person", @generations); |
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
package Fancy::Sort::Split; | |
use v5.8.8; | |
use strict; | |
use warnings FATAL => qw( all ); | |
use Exporter qw(import); | |
our $VERSION = '1.0'; | |
our @EXPORT_OK = qw(split_sort); | |
sub split_sort { |
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
sub fancy_open { | |
my ($filename, $opt) = @_; | |
my $encoding = $opt->{'encoding'} // 'utf-8'; | |
open my $fh, "<:encoding($encoding)", $filename or die "Can't open $filename. $!"; | |
my @array; | |
my $before = $opt->{'before'} // ""; | |
my $after = $opt->{'after'} // ""; | |
while ( my $line = <$fh> ) { |
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
package Util::WordFind; | |
use strict; | |
use warnings FATAL => qw(all); | |
use Exporter qw(import); | |
our @EXPORT_OK = qw(word_find); | |
use CGI::Carp qw(fatalsToBrowser); | |
use File::Basename; | |
use IO::All; |
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/perl | |
use strict; | |
use warnings; | |
use Text::CSV; | |
use Data::Dumper; | |
my $csv = Text::CSV->new({ | |
sep_char => '|', | |
quote_char => undef, |
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
sub textify { | |
my ($text, $opt) = @_; | |
my $root_link = base_path('link'); | |
$text =~ s/$root_link\///; | |
$text =~ s/_/ /g; | |
$text =~ s/(?<!Rev\s)\b([DMSJ][rsx]|Mrs|Rev)\b(?!\.)/$1./g; | |
$text =~ s/\s&\s/ & /g; | |
$text =~ s/\.{3}/…/g; | |
$text =~ s/(\w|\b|\s|^)'(\w|\b|\s|$)/$1ʼ$2/g; | |
$text =~ s/<.+?>//g unless ($opt->{'html'} && $opt->{'html'} =~ /^[ytk1]/); |
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
my $movies_data = movie('data'); | |
my $search; | |
my @movies; | |
if ( $title || $year || $media || $genre || $source || $alpha ) { | |
my @selections; | |
push @selections, $title if $title; | |
push @selections, $year if $year; | |
push @selections, $media if $media; | |
push @selections, $genre if $genre; | |
push @selections, $source if $source; |
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
next if $media && $movie->{'media'} ne $media; | |
next if $genre && !$movie->{'genre'}{$genre}; | |
next if $source && (!$movie->{'source'} || $movie->{'source'} !~ /\b$source(?!ing)/i); | |
next if $title && lc($movie->{'title'}) !~ /\L$title\E/i; | |
next if $alpha && first_alpha($movie->{'title'}) ne $alpha; |
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
/******************************************************************* | |
* Credits go to: (all members in irc.freenode.net ##javascript * | |
* inimino (complete adjustments) * | |
* Maggi (lots of troubleshooting help) * | |
* Typos_King (input on troubleshooting) * | |
* Mordof (compiling final efforts into this document) * | |
*******************************************************************/ | |
function load() { | |
document.getElementById('site_menu').addEventListener('click', list_onclick); |
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
<infobox> | |
<data source="mother"><label>Mother</label></data> | |
<data source="father"><label>Father</label></data> | |
<data source="partners"><label>Partners</label></data> | |
<group layout="stacked" collapse="closed"> | |
<header>{{{name}}}'s siblings</header> | |
<data source="sibling 1"> | |
<label>First sibling</label> | |
<format>{{{sibling 1}}} {{#if: {{{sibling 1 coparent|}}} | by {{{sibling 1 coparent}}} }} {{#if: {{{sibling 1 gender|}}} | ({{#switch: {{{sibling 1 gender}}} | male = brother | female = sister | #default = }})}}</format> |