Skip to content

Instantly share code, notes, and snippets.

@Dyrcona
Dyrcona / add_translations.py
Last active September 2, 2015 16:55
A program to assist with the process of adding new po and pot files into the Evergreen git repository.
#!/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 August 21, 2015 14:58
A little fun with git, LibreOffice, and Python3....
#!/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 July 28, 2015 14:38
A small script to fix DVD and possibly Blu-ray MARC records that say they are laserdisc in the 007.
#!/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 December 28, 2015 10:39
A utility to run a list of commands from a file.
#!/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 October 23, 2023 09:06
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.
#!/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 December 6, 2012 22:10
Some kind of statement about perl
#!/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 January 1, 2017 21:44
My emacs cperl-mode configuration that conforms to the Evergreen coding guidelines.
;; 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 March 11, 2016 19:06
A simple, little SQL script to reingest bibs in Evergreen.
-- 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