Skip to content

Instantly share code, notes, and snippets.

View mreidsma's full-sized avatar

Matthew Reidsma mreidsma

View GitHub Profile
@mreidsma
mreidsma / addasteroids.html
Created May 31, 2012 13:08
Add Kick-Ass (Asteroids game) to your website with a simple link.
<a href="javascript:var%20KICKASSVERSION='2.0';var%20s%20=%20document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='//hi.kickassapp.com/kickass.js';void(0);">_</a>
@mreidsma
mreidsma / about.markdown
Created August 25, 2015 19:09
Reformat silly tables in WebPAC Pro Advanced Search

In III's terrible OPAC, WebPAC Pro, the Advanced Search screen has all these little nested tables that just hold one label in a table cell and an imput in another. There is no reason they should be tables! So I wrapped each of the tokens in the Web Master with an id, and then wrote this silly function to remove the table markup and just give me labels and form elements. Then I used CSS to make it look the way it should, since this is 2015 and not 1997.

The fact that I had to write this function boggles my mind.

@mreidsma
mreidsma / .htaccess
Created July 13, 2012 20:22
Simple click tracking script
// .htaccess
//
// Add this to the directory where your write.php will be stored
// This is an easy way to do an HTTP request to the script with the data
<IfModule mod_rewrite.c>
RewriteEngine On
# Change the following to the base directory of this file
RewriteBase /clickstats/
@mreidsma
mreidsma / logtodayone.scpt
Created July 15, 2013 19:06
Log completed Taskpaper tasks to DayOne and move them from my main todo list into an "Archive file"
set archivedTasks to ""
tell application "TaskPaper"
tell front document
-- don't care which file your log entry came from?
-- comment the next line out
set archivedTasks to "## " & name & return
repeat with _task in search with query "project != Archive and @done"
if entry type of _task is not project type then
-- remove common tags that won't matter after archiving
repeat with _tag in {"na", "next", "priority", "waiting"}
@mreidsma
mreidsma / all_full_text.js
Last active March 6, 2020 15:55
Simple script to add link to link resolver in Summon results
setTimeout(function() {
libMyScope = angular.element('html').scope();
libScope( );
}, 1000);
function libScope(){
console.log('initialising...');
// WATCH FOR RESULTS FEED CHANGES...
libMyScope.$watchCollection('feed', function(){
var errMsg = document.getElementById('search_error').innerText;
if(errMsg.trim() === 'NO ENTRIES FOUND') {
var searchQuery = document.getElementById('st1').value;
document.getElementById('search_error').innerHTML = '<div class="alert alert-warning"> <h1 class="h2 center">Your search returned 0 results</h1> <hr /> <div class="span1 col-8 col-md-12 col-sm-12"> <h3>Revise your search</h3> <ul> <li>Broaden your search below, or remove search terms</li> <li>Check your spelling</li> <li>If searching for a title or author, select the title or author search</li> </ul><!--/div><div class="span1 col-5 col-md-6 col-sm-12"--> <h3>Search other libraries</h3> <p>Free access to over 400 Michigan libraries, with materials delivered quickly to GVSU through MeLCat:<br /> <a href="https://elibrary.mel.org/search/X?' + encodeURIComponent(searchQuery) + '&SORT=D&backlink=https://library.catalog.gvsu.edu:443/search~S19?/X?' + encodeURIComponent(searchQuery) + '&SORT=D" id="melLink" target="_blank"> <span class="btn btn-defaul
@mreidsma
mreidsma / What it does.markdown
Created June 26, 2013 16:42
Make Illiad renewal confirmations less terrible.

Make Illiad's renewal confirmations less terrible

We use Illiad for ILL, and have heavily modified it. One thing that came up this week was how bad the renewal confirmations are. I wrote a quick script to fix that. Here's what it does:

Default renewal confirmation screen at GVSU:

Original Illiad Screen

Why yes, it is useful to have 2 separate alerts there. Thank you.

@mreidsma
mreidsma / README.markdown
Last active August 20, 2018 12:26
Automator Workflow for Writing Environment

Automator Workflow for Writing Environment

The internet is a distracting place, and when you work there, it makes getting things done difficult. Especially things like writing a book (or two). So I made an automator script to help me out. Here's how it works:

  • It quits every application but iTunes, Writedown (my Markdown editor of choice), and Tictoc (my time tracking tool).
  • It shuts off Wifi so the Internet goes away.
  • It sets the computer's volume to an appropriate level.
  • It plays an iTunes playlist of ambientish music that is perfect background for writing.
  • It makes Writedown go full screen so I don't get distracted by other things.
@mreidsma
mreidsma / mdtech_connect.markdown
Created August 6, 2018 13:44
Title and abstract for upcoming keynote talk at Maryland Tech Connect

Accurate, Objective, Relevant, and Other Lies We Tell About Library Search

In the past four years we've seen search engines—and Google in particular—make racist, sexist, and homophobic search results into headlines about algorithmic bias in our everyday tools. Library search tools—from discovery to catalogs to research databases—are often called more accurate, relevant, and objective than general search engines like Google. But is library search better? Think again. Our expensive, exclusive tools are just as full of bias and hate as Google, but the stories we tell ourselves about their objectivity keep their problems hidden from us—but not from our users.

@mreidsma
mreidsma / README.markdown
Last active March 22, 2018 18:24
Clone Course Workflow Improvements in Ares

Function to improve course cloning workflow for Ares Course Reserve system

Overview

Usability testing of faculty as well as historical support requests show that faculty do not understand the distinction that Atlas Systems has created between "Adding a new class" and "Cloning a class." Often, faculty choose to Add a new class rather than clone a class, and then find themselves too late with an empty class. This results either in faculty manually adding all of the items they meant to copy over to the new class, creating yet another new class through cloning, or calling Course Reserves staff to intervene and move the items over.

Testing and prototyping show that inserting a little friction into the course adding process can help direct faculty to the best way to get their new course created. This code adds a modal window to the "Add a new class" action that pulls up to the most recent 3 courses the instructor has created in course reserves (if they have used the service before) and offers to opportunity