Skip to content

Instantly share code, notes, and snippets.

@Dyrcona
Dyrcona / sip2status.c
Created May 4, 2021
A C program to check if a 3M SIP2 Protocol server is alive by sending the SC Status message.
View sip2status.c
/*
* Copyright © 2021 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 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
@Dyrcona
Dyrcona / split-patch.py
Last active Nov 29, 2021
A simple program to split git diff patches into multiple files.
View split-patch.py
#!/usr/bin/env python3
# ------------------------------------------------------------------------
# Copyright (c) 2021 Jason Stephenson <jason@sigio.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
@Dyrcona
Dyrcona / make-db-upgrade
Last active Mar 15, 2021
A bash script to make custom database upgrade scripts for Evergreen ILS.
View make-db-upgrade
#!/bin/bash
# ---------------------------------------------------------------
# Copyright © 2018, 2021 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.
#
# This program is distributed in the hope that it will be useful,
@Dyrcona
Dyrcona / lookup_user.pl
Last active Dec 10, 2020
Perl script to test NCIPServer with Evergreen. It sends a LookupUser message to see if the servier is running and configuration is OK.
View lookup_user.pl
#!/usr/bin/perl
# ---------------------------------------------------------------
# Copyright © 2019 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@Dyrcona
Dyrcona / while.lisp
Created Nov 28, 2020
Common Lisp looping macros, written for practice that may be useful to someone.
View while.lisp
;;; ------------------------------------------------------------------------
;;; Copyright © 2020 Jason Stephenson <jason@sigio.com>
;;;
;;; Permission to use, copy, modify, and distribute this software for any
;;; purpose with or without fee is hereby granted, provided that the above
;;; copyright notice and this permission notice appear in all copies.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
;;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
;;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@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 / 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.
#
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 / 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