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 Merrimack Valley Library Consortium | |
# Jason Stephenson <[email protected]> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# |
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 | |
# Description: show dependency tree | |
# Author: damphat | |
if [ $# != 1 ]; then | |
echo 'Usage: apt-rdepends-tree <package>' | |
echo 'Required packages: apt-rdepends' | |
exit 1 | |
fi |
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
-- create a schema to record our batch changes | |
CREATE SCHEMA tadl_batch; | |
-- create a table for this set of changes | |
-- consider an approach with fewer tables | |
-- and use a batch_name column or similar | |
CREATE TABLE tadl_batch.acp_lost_in_migration ( | |
id SERIAL PRIMARY KEY, | |
copy BIGINT NOT NULL, | |
batchtime TIMESTAMPTZ |
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
-- A simple SQL to "reingest" your bib records in Evergreen. | |
-- Feel free to use it however you like, though the easiest way is to | |
-- save it into a file and do psql -f filename. | |
DO $$ | |
DECLARE | |
flag BOOLEAN; | |
BEGIN | |
SELECT enabled INTO flag | |
FROM config.internal_flag |
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
<?php | |
/** | |
* This is an example of a practical encoder and decoder for base-62 data in PHP | |
* It differs from the majority of examples in that it's fast enough for moderate data sizes, unlike multiprecision converters | |
* To be practical, base-62 encoding needs to use internal chunking and padding because base-62 does not fit exactly into any integral number of bits | |
* This means the output is not quite compatible with multiprecision conversions, | |
* but the encoded data retains all the desirable properties of base-62, so (unlike any base-64 encoding) it's URL, DNS, email address and pathname safe | |
* @author Marcus Bointon <[email protected]> | |
* @copyright 2011 Marcus Bointon | |
* @license http://www.opensource.org/licenses/mit-license.html MIT License |
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
# First, basic system stuff | |
$ uname -a | |
Linux cardinal 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:36:48 UTC 2010 i686 GNU/Linux | |
$ cat /etc/lsb-release | |
DISTRIB_ID=Ubuntu | |
DISTRIB_RELEASE=10.10 | |
DISTRIB_CODENAME=maverick | |
DISTRIB_DESCRIPTION="Ubuntu 10.10" |