Skip to content

Instantly share code, notes, and snippets.

View anarchivist's full-sized avatar
🐈‍⬛

María A. Matienzo anarchivist

🐈‍⬛
View GitHub Profile
@anarchivist
anarchivist / cage.sparql
Last active November 18, 2023 23:53
Wikidata query for Movies starring Nicolas Cage that are not direct to video/video on demand
# Films starring Nicolas Cage that are not direct to video/video on demand
# Intended to help making it easier to load this data into a Letterboxd list
# See https://letterboxd.com/about/importing-data/ for more info
SELECT ?item
?itemLabel
?LetterboxdURI
(?itemLabel AS ?Title)
(YEAR(MIN(?date)) AS ?Year)
(GROUP_CONCAT(DISTINCT ?directorLabel; SEPARATOR = ", ") AS ?Directors)
WHERE {
@anarchivist
anarchivist / slack_munin.sh
Last active May 3, 2022 19:21
Slack notification script for Munin
#!/bin/bash
# Slack notification script for Munin
# Mark Matienzo (@anarchivist)
#
# To use:
# 1) Create a new incoming webhook for Slack
# 2) Edit the configuration variables that start with "SLACK_" below
# 3) Add the following to your munin configuration:
#
@anarchivist
anarchivist / gist:672139
Created November 11, 2010 07:09
Setting Up Umich AFS On Ubuntu

NOTE: THIS INFORMATION IS LIKELY DEPRECATED AND HAS NOT BEEN UPDATED SINCE UBUNTU EDGY!

Setting Up Umich AFS On Ubuntu is surprisingly easy, as long as you have the proper configuration information. I used two resources to assist me in the process: your Ubuntu or Debian Box Athena-ish, which is specific to MIT's Athena environment, and Native AFS Support on OS X, which is specific to Michigan.

There are four main steps:

@anarchivist
anarchivist / gist:3003928
Created June 27, 2012 12:58
Mitsumi/Newtronics D509V3 Jumpers
DS0 - drive select
DS2 - drive select
MS - motor on vs. drive select
RDY - ready vs. disk change
LD - high / low (density?)
S2 - motor speed (360 RPM or 300/360 RPM dual speed)
@anarchivist
anarchivist / marc-tags.py
Created December 23, 2009 21:36
Provide statistics on files containing MARC/ISO2709 records (originally by Ed Summers)
#!/usr/bin/env python
# originally by edsu - original at http://inkdroid.org/bzr/bin/marc-tags
import pymarc
import sys
stats = {}
def tally(r):
@anarchivist
anarchivist / tomsawyer.json
Last active August 8, 2021 04:29
Troika character sheet
{
"skill": 5,
"stamina": {
"max": 18,
"remaining": 15
},
"name": "Tom Sawyer",
"background": "River Child",
"luck": {
"max": 8,
@anarchivist
anarchivist / resync-sync.txt
Created March 18, 2021 17:16
resync-sync error on pod
li-dl-7346-0256:tmp matienzo$ resync-sync -v --capability-list https://pod.stanford.edu/.well-known/resourcesync/normalized-capabilitylist/marcxml --access-token "eyJhbGciOiJIUzI1NiJ9.foobar" -b https://pod.stanford.edu/ pod
Reading capability list https://pod.stanford.edu/.well-known/resourcesync/normalized-capabilitylist/marcxml
Reading resource list https://pod.stanford.edu/organizations/normalized_resourcelist/marcxml
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/resync/client.py", line 101, in read_resource_list
resource_list.read(uri=uri)
File "/usr/local/lib/python3.9/site-packages/resync/list_base_with_index.py", line 99, in read
self.content_length = int(fh.info()['Content-Length'])
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
During handling of the above exception, another exception occurred:

Due to recent abusive intrusions into our channel, we may need to temporarily restrict participation to users who have registered accounts on Freenode. If you have received a Cannot send to channel message when attempting to talk, you can validate that you are not a malicious user and regain the ability to send messages to the channel by registering your account. Please see the link below for instructions, and don't hesitate to stop by #freenode to ask for help.

https://freenode.net/kb/answer/registration#nickname-setup

If you notice abusive activity in the channel, please notify one or more of our channel operators via private message. These people are: anarchivist, rsinger, and yo_bj.

@anarchivist
anarchivist / diskdefs
Created June 22, 2012 19:18
Revised diskdefs for cpmtools
diskdef ibm-3740
seclen 128
tracks 77
sectrk 26
blocksize 1024
maxdir 64
skew 6
boottrk 2
os p2dos
end
{
"links": {
"self": "https://spotlight.dev.dlmenetwork.org/catalog/81055%2Fvdc_100000000831.0x000044_dlme"
},
"data": {
"id": "81055/vdc_100000000831.0x000044_dlme",
"type": null,
"attributes": {
"date": {
"id": "https://spotlight.dev.dlmenetwork.org/catalog/81055%2Fvdc_100000000831.0x000044_dlme#date",