Skip to content

Instantly share code, notes, and snippets.

View mcritchlow's full-sized avatar

Matthew Critchlow mcritchlow

  • UC San Diego
  • San Diego
View GitHub Profile
@mcritchlow
mcritchlow / solus-highlight.yml
Last active April 9, 2017 21:24
Solus Package
name : highlight
version : 3.36
release : 1
source :
- http://www.andre-simon.de/zip/highlight-3.36.tar.bz2 : 34cd5bcf52714f83364460c0c3551320564c56ff4e117353034e532275792171
license : GPL-3.0
component : programming.tools
summary : Convert source code to formatted text with syntax highlighting
description: |
Highlight converts source code to HTML, XHTML, RTF, LaTex, TeX, SVG, BBCode and terminal escape sequences with coloured syntax highlighting. Language definitions and colour themes are customizable.
@mcritchlow
mcritchlow / install.md
Last active April 17, 2025 18:54
Installing Zoom on Solus OS
@mcritchlow
mcritchlow / bundle.out
Created May 17, 2017 20:56
activesupport conflict - hyrax
[EngineCart] Unable to find test application dependencies in /home/mcritchlow/projects/ucsd/hydra-projects/hyrax/.internal_test_app/Gemfile, using placeholder dependencies
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...........................................
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
hyrax was resolved to 2.0.0.alpha, which depends on
active-fedora (>= 11.1.3) was resolved to 11.1.3, which depends on
activesupport (< 6, >= 4.2.4)
@mcritchlow
mcritchlow / eopkg-check.txt
Created June 21, 2017 02:55
result of eopkg check
Checking integrity of linux-lts Broken
Corrupted file: /lib/modules/4.9.32-30.lts/modules.alias
Corrupted file: /lib/modules/4.9.32-30.lts/modules.alias.bin
Corrupted file: /lib/modules/4.9.32-30.lts/modules.dep
Corrupted file: /lib/modules/4.9.32-30.lts/modules.dep.bin
Corrupted file: /lib/modules/4.9.32-30.lts/modules.symbols
Corrupted file: /lib/modules/4.9.32-30.lts/modules.symbols.bin
..
..
Checking integrity of mariadb-libs Broken
@mcritchlow
mcritchlow / config.ru
Last active July 3, 2017 16:25
Slack Ruby Bot - Server Hooks
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'dotenv'
Dotenv.load
require 'slack_library_bot'
require 'web'
Thread.abort_on_exception = true
@mcritchlow
mcritchlow / braindump.md
Last active August 25, 2017 18:24
Google Calendar / Confluence Integration thoughts

Assumptions

From what I can gather, here are the desired outcomes of having a community google calendar for the intranet

  1. Quick access to entire calendar via LiSN home page (already exists)
  2. Ability to place single event instances in the weekly update with ability for staff to easily add a single event to their personal calendar

(2) is currently the pain point, as the steps involved are very tedious. I wonder if this should be thought of differently, either way we need to leverage the google calendar more imo.

Potential solution(s) - leverage Google Calendar API

A starting point for this might be to look into using the Google Calendar API as follows (via a Confluence macro):

At UC San Diego we have a few use cases that require us to make a distinction between access control on a source file (original file) and derivatives. Most of these are related to traditonal digitized library collections where there is a donor or content provider agreement that the source files cannot be made publicly available for view/download.

Our discussion started with a post on Samvera Tech [1]. Essentially the core use case is as follows:

  1. upload a source file (tiff, wav, etc.)
  2. mark that object with the visibility of "public"
  3. mark the source file with visibility of "private" does not exist

Current Behavior:

@mcritchlow
mcritchlow / base.rb
Last active February 15, 2018 16:06
Hyrax::Analytics API Ideas
module Hyrax
module Analytics
# @abstract Base class for Analytics services that support statistics needs in Hyrax.
# Implementing subclasses must define `#connection` `#remote_statistics` and `#to_graph`
class Base
# Establish connection with the analytics service
def self.connection
raise NotImplementedError, "#{self.class}#connection is unimplemented."
end
@mcritchlow
mcritchlow / terminus_install.sh
Last active April 1, 2023 04:43
Install terminus as console font for Solus
# install terminus console fonts (only)
wget https://sourceforge.net/projects/terminus-font/files/terminus-font-4.46/terminus-font-4.46.tar.gz/download -O terminus.tar.gz
tar -xvf terminus.tar.gz
cd terminus-font-4.46
./configure --prefix=/usr
make -j4 psf
sudo make install-psf
# add kernel parameter for vconsole.font
echo 'vconsole.font=ter-v32n' | sudo tee /etc/kernel/cmdline
@mcritchlow
mcritchlow / modeling.md
Last active February 27, 2018 16:56
Hyrax Analytics Modeling Options

Summary

The current model pattern for Google Analytics statistics support in Hyrax follows essentially the following database format:

  create_table "work_view_stats", force: :cascade do |t|
    t.datetime "date"
    t.integer "work_views"
    t.string "work_id"
    t.datetime "created_at", null: false
 t.datetime "updated_at", null: false