Skip to content

Instantly share code, notes, and snippets.

View real_bib_delete.sql
/*
* real_bib_delete.sql
* Copyright (c) 2014 Bibliomation, Inc.
* Copyright (c) 2014 Jason Stephenson <jason@sigio.com>
*
* 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.
*
@Dyrcona
Dyrcona / acceptitem.xml
Last active Dec 4, 2015
POST a file to a web URL. Intended to be used to test the NCIPServer NCIP responder for Evergreen/Koha.
View acceptitem.xml
<?xml version="1.0" encoding="utf-8"?>
<NCIPMessage version="http://www.niso.org/schemas/ncip/v2_02/ncip_v2_02.xsd" xmlns="http://www.niso.org/2008/ncip">
<AcceptItem>
<InitiationHeader>
<FromAgencyId>
<AgencyId></AgencyId>
</FromAgencyId>
<ToAgencyId>
<AgencyId></AgencyId>
</ToAgencyId>
@Dyrcona
Dyrcona / add_translations.py
Last active Sep 2, 2015
A program to assist with the process of adding new po and pot files into the Evergreen git repository.
View add_translations.py
#!/usr/bin/env python3
# -*- Mode: python; coding: utf-8 -*-
# ---------------------------------------------------------------
# Copyright © 2015 Jason J.A. Stephenson <jason@sigio.com>
#
# 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 3 of the License, or
# (at your option) any later version.
#
@Dyrcona
Dyrcona / cherrylog.py
Created Aug 21, 2015
A little fun with git, LibreOffice, and Python3....
View cherrylog.py
#!/usr/bin/env python3
# -*- Mode: python; coding: utf-8 -*-
# ---------------------------------------------------------------
# Copyright © 2015 Jason J.A. Stephenson <jason@sigio.com>
#
# 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 3 of the License, or
# (at your option) any later version.
#
@Dyrcona
Dyrcona / laserdisc_fix.plx
Created Jul 28, 2015
A small script to fix DVD and possibly Blu-ray MARC records that say they are laserdisc in the 007.
View laserdisc_fix.plx
#!/usr/bin/perl
# ---------------------------------------------------------------
# Copyright © 2015 Merrimack Valley Library Consortium
# Jason Stephenson <jstephenson@mvlc.org>
#
# 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.
#
@Dyrcona
Dyrcona / disbatcher.pl
Last active Dec 28, 2015
A utility to run a list of commands from a file.
View disbatcher.pl
#!/usr/bin/perl
# Copyright © 2013 Jason J.A. Stephenson <jason@sigio.com>
#
# disbatcher.pl 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 3 of the
# License, or (at your option) any later version.
#
# disbatcher.pl is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
@Dyrcona
Dyrcona / quickpick
Last active Sep 14, 2020
A bash script to batch git cherry-pick of many commits from a single source branch. It can become a new git command if you save it in your path with a name like git-quickpick. Then, you can run it like so `git quickpick foo/bar'. Very handy, that.
View quickpick
#!/bin/bash
# Author: Thomas Berezansky <tsbere@mvlc.org>
# Author: Jason Stephenson <jason@sigio.com>
#
# Feel free to use and to share this script in anyway you like.
# This script is intended as a shortcut for the git cherry-pick
# command when you have several commits that you want to cherry-pick
# into your local branch from another branch. It often results in a
@Dyrcona
Dyrcona / stoopid.pl
Created Dec 6, 2012
Some kind of statement about perl
View stoopid.pl
#!/usr/bin/perl
# Like all art, the interpretation is up to the viewer.
# Written 2012 by Jason Stephenson and Thomas Berezansky.
use strict;
use Data::Dumper;
@Dyrcona
Dyrcona / cperl_snippet.el
Last active Jan 1, 2017
My emacs cperl-mode configuration that conforms to the Evergreen coding guidelines.
View cperl_snippet.el
;; Use cperl-mode by default
(defalias 'perl-mode 'cperl-mode)
;; cperl-mode doesn't have an add-style command, so we create our
;; style in a defun.
(defun evergreen-perl-style ()
"Set cperl-mode for Evergreen coding guidelines."
(setq cperl-indent-level 4
cperl-brace-offset 0
cperl-continued-brace-offset 0
@Dyrcona
Dyrcona / reingest_bibs.sql
Last active Mar 11, 2016
A simple, little SQL script to reingest bibs in Evergreen.
View reingest_bibs.sql
-- 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
You can’t perform that action at this time.