Skip to content

Instantly share code, notes, and snippets.

View dkinzer's full-sized avatar

David Kinzer (he/him) dkinzer

View GitHub Profile

Blacklight Search (deep dive):

I want to derive a mental picture of a blacklight search. I know that I submit a form and that a query is made against a solr db, the result of which is processed and returnd to me. However, I need a more detailed picture of the interim steps.

Specically I want to get at:

  1. What is the function that first receives the forms input?

SSH Tunneling A Multiple Node Span With MacOsX

I needed to get some work done on a jenkins server that unfortunately was behind a firewall, and was inaccessible even with my VPN turned on.

Fortunately I had SSH access to a machine inside the firewall that also had SSH access to the jenkins server. So I knew that there was a way to use SSH tunnelling to get to the jenkins server.

Tunnel between the localhost and the first node.

@dkinzer
dkinzer / commands
Created April 18, 2012 16:30
Building Mutt that works with Gmail on Centos.
wget ftp://ftp.mutt.org/mutt/devel/mutt-1.5.21.tar.gz
tar -xzvf mutt-1.5.21.tar.gz
cd mutt-1.5.21
yum install ncurses-devel tokyocabinet-devel openssl-devel cyrus-sasl-devel
./configure --enable-imap --enable-smtp --enable-hcache --with-ssl --with-sasl | grep error
make
make install
@dkinzer
dkinzer / 0001-Update-references-to-master-branch.patch
Last active November 9, 2021 20:11
Patch for BL Wiki. Updates "master" references to "main"
From 755639b062052ed6b752ab08e220c9ed9857d69a Mon Sep 17 00:00:00 2001
From: David Kinzer <dtkinzer@gmail.com>
Date: Tue, 9 Nov 2021 14:54:55 -0500
Subject: [PATCH] Update references to 'master' branch.
---
Adding-new-document-actions.md | 4 ++--
Atom-Responses.md | 2 +-
Blacklight-configuration.md | 14 +++++++-------
Blacklight-on-Heroku.md | 4 ++--
FROM harbor.k8s.temple.edu/library/alpine:3.13
CMD [ "echo", "hello world" ]
# build this with:
# docker build --tag=harbor.k8s.temple.edu/tulibraries/hello_world_dkinzer:latest .
# push this with:
# docker push harbor.k8s.temple.edu/tulibraries/hello_world_dkinzer:latest
hello world
@dkinzer
dkinzer / pry20201022-13879-1prluqv.rb
Last active October 23, 2020 01:38
compose in Ruby defined as a reduction of its arguments.
def compose(*args)
identity = ->(x) { x }
args.reduce(identity) do |a, b|
if b.is_a? Proc
a >> b
else
a >> method(b)
end
end
@dkinzer
dkinzer / template.py
Last active April 27, 2020 20:06
Versioned Templated Dag Example
from datetime import datetime, timedelta
import os
from airflow.operators.bash_operator import BashOperator
DEFAULT_ARGS = { "retries": 0, catchup: False, max_active_runs: 1, schedule_interval: None }
def create_dag(env, version):
dag_id = "hello_" + env
# frozen_string_literal: true
RSpec.describe Traject::Indexer::NokogiriIndexer do
let(:settings) { {
"nokogiri.each_record_xpath" => "/oai:OAI-PMH/oai:ListRecords/oai:record",
"nokogiri.namespaces" => { "oai" => "http://www.openarchives.org/OAI/2.0/" },
"solr_writer.commit_on_close" => "false",
} }
let(:records) { Traject::NokogiriReader.new(StringIO.new(