Skip to content

Instantly share code, notes, and snippets.

@Dyrcona
Dyrcona / split-patch.py
Last active November 29, 2021 00:08
A simple program to split git diff patches into multiple files.
#!/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 / sip2status.c
Created May 4, 2021 11:50
A C program to check if a 3M SIP2 Protocol server is alive by sending the SC Status message.
/*
* 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 / version-stamp-files
Created June 17, 2022 20:10
A bash script to stamp versions in Evergreen files for a new release.
#!/bin/bash
# ---------------------------------------------------------------
# Copyright © 2022 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 / git-cherry-log
Created June 18, 2022 17:54
Use this like git cherry except it outputs the log messages of commits in head that are not in upstream. It could be useful for summarinzing changes or writing release notes.
#!/usr/bin/env python3
# -*- Mode: python; coding: utf-8 -*-
# ---------------------------------------------------------------
# Copyright © 2015, 2022 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.
#
@Dyrcona
Dyrcona / TestingServerAnonymization.sql
Created April 27, 2023 21:25
A SQL to Anonymize Patron Data for an Evergreen Test Database
-- Evergreen Test Data Anonymizaiton Query
-- Copyright (C) 2023 CW MARS, Inc.
-- Jason Stepenson <jstephenson@cwmars.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.
-- This program is distributed in the hope that it will be useful,
@Dyrcona
Dyrcona / while.lisp
Last active July 28, 2023 22:56
Common Lisp looping macros, written for practice that may be useful to someone.
;;; ------------------------------------------------------------------------
;;; Copyright © 2020, 2023 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 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 / make-db-upgrade
Last active February 8, 2024 16:37
A bash script to make custom database upgrade scripts for Evergreen ILS.
#!/bin/bash
# ---------------------------------------------------------------
# Copyright © 2018, 2021-2024 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,