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/perl | |
use Digest::SHA qw( sha512_hex ); | |
use Test::More; | |
use Modern::Perl; | |
use utf8; | |
my $digest1 = uc sha512_hex( 'The quick brown fox jumps over the lazy dog' ); | |
my $truth1 = '07E547D9586F6A73F73FBAC0435ED76951218FB7D0C8D788A309D785436BBB642E93A252A954F23912547D1E8A3B5ED6E1BFD7097821233FA0538F3DB854FEE6'; | |
is( $digest1, $truth1, 'Fox OK' ); |
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/perl | |
# Copyright 2015 Magnus Enger Libriotech | |
=head1 NAME | |
dvd.pl - Turn CSV into MARC. | |
=head1 SYNOPSIS |
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
" .vimrc for Magnus Enger | |
" Show line numbers | |
set number | |
" Turn on syntax highlighting | |
syntax on | |
" Indentation | |
set expandtab |
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/perl | |
use Catmandu::Importer::Atom; | |
use Catmandu::Store::ElasticSearch; | |
use Data::Dumper; | |
use Modern::Perl; | |
my $feed = 'http://planet.code4lib.org/atom.xml'; | |
# Set up importer and store |
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/perl | |
use Catmandu::Importer::Atom; | |
use Catmandu::Store::ElasticSearch; | |
use Data::Dumper; | |
use Modern::Perl; | |
my $feed = 'http://planet.code4lib.org/atom.xml'; | |
my $importer = Catmandu::Importer::Atom->new( url => $feed ); |
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/perl | |
# Copyright 2013 Magnus Enger Libriotech | |
=head1 NAME | |
tab2marc.pl - Convert some tab-delimited data to MARCXML. | |
=head1 SYNOPSIS | |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset=UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
</body> | |
</html> |
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/perl | |
use Catmandu::Importer::MARC; | |
use Catmandu::Exporter::RDF; | |
use Modern::Perl; | |
my $records = Catmandu::Importer::MARC->new( | |
file => 'sample_records.marcxml', | |
type => 'XML', | |
); |
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
#!/bin/bash | |
# Check that the user is root | |
if [ "$(whoami)" != "root" ]; then | |
echo "Sorry, you are not root." | |
exit 1 | |
fi | |
die() { | |
echo "$@" 1>&2 |
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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: kbzb | |
# Required-Start: $mysql $all | |
# Required-Stop: $mysql | |
# Default-Start: 2 | |
# Default-Stop: | |
# Short-Description: Reboot all Backgroundrb and Zebra for Kete instances | |
### END INIT INFO |
NewerOlder