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 ruby | |
# Makes a class globally configurable, e.g. in a Rails initializer. | |
# Usage: | |
# `class MyClass | |
# include Configurable | |
# create_config do | |
# # url attribute has a default value, which is the return value of the block | |
# url { 'http://www.example.com'} | |
# # name attribute is allowed but has no default value |
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 groovy | |
@Grapes( | |
@Grab(group='org.marc4j', module='marc4j', version='2.8.3') | |
) | |
import org.marc4j.MarcStreamReader | |
import org.marc4j.MarcXmlReader | |
import org.marc4j.MarcXmlWriter | |
import org.marc4j.marc.Record | |
import org.marc4j.converter.impl.AnselToUnicode |
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 | |
cat << 'END_OF_PUBKEY' > my_gpg_key.pub | |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v2 | |
blah blah | |
-----END PGP PUBLIC KEY BLOCK----- | |
END_OF_PUBKEY |
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
from __future__ import (absolute_import, division, print_function) | |
__metaclass__ = type | |
__doc__ = """Ansible Action Plugin that downloads (various) Apache projects | |
to the local machine, for easy deployment to managed machines via the `copy` | |
or `unarchive` modules. Fetches projects from nearest mirror and validates | |
their sha1 sum against the values downloaded from the main Apache site. | |
This plugin _requires_ the `requests` module be installed for all HTTPish | |
activities. |
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
module MarcToArgot | |
# namespace for institution-specific macros to be used in Traject config files | |
module Macros | |
autoload :Shared, 'marc_to_argot/macros/shared_macros' | |
autoload :NCSU, 'marc_to_argot/macros/ncsu_macros' | |
end | |
end |
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 python3 | |
# NB Python 3 | |
# need boto3, attr, and tabulate python libraries. | |
# all installable via pip; your linux distribution | |
# may also supply them via its package installer | |
# usage -- you should have already configured the AWS CLI | |
# before using this. Mostly it's a wrapper around some common |
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
{ | |
"add-requesthandler" : { | |
"name" : "/document", | |
"class" : "solr.SearchHandler", | |
"defaults" : { | |
"echoParams" : "explicit", | |
"fl" : "*", | |
"rows" : 1, | |
"q" : "{!term f= id v = $id}" | |
} |
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 | |
# you need the yaz tools installed, these are readily available on many Linux distros | |
# via the package manager or on Macs via homebrew | |
yaz-marcdump -i marc -o marcxml -f marc8 -t utf8 -l 9=97 mar21encodedasmarc8.mrc > marcxmlencodedasutf8.xml |
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 python3 | |
# NB Python 3 | |
# need boto3, attr, and tabulate python libraries. | |
# all installable via pip; your linux distribution | |
# may also supply them via its package installer | |
# usage -- you should have already configured the AWS CLI | |
# before using this. Mostly it's a wrapper around some common |
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 python3 | |
import threading | |
import time | |
from queue import Queue | |
eq = Queue() | |
class Dead(Exception): |