Skip to content

Instantly share code, notes, and snippets.


Jessie Keck jkeck

View GitHub Profile
jkeck / snippet.html
Created Feb 14, 2020
HTML snippet that will show you which bootstrap breakpoint the browser is currently at
View snippet.html
<span>Current breakpoint:</span>
<b class="d-sm-none">XS</b>
<b class="d-none d-sm-inline d-md-none">SM</b>
<b class="d-none d-md-inline d-lg-none">MD</b>
<b class="d-none d-lg-inline d-xl-none">LG</b>
<b class="d-none d-xl-inline">XL</b>
View atom-snippet.cson
'prefix': 'init'
'body': """
def initialize($1)
'prefix': 'req'
jkeck /
Last active Jan 13, 2017
A brief proposal (and some other notes) on implementing IIIF cropping in Spotlight

In order to support IIIF cropping of multi-image objects (which is currently supported in a non-IIIF way), we'll need to use IIIF manifests. Storing a list of info.json URLs will not be sufficient since the URL typically contains the file name of the item (at least in our case). This is potentially volatile in the case of remediations that changes file names. A IIIF manifest has references to the images contained within an object (as well as unique identifiers that we can use that will not change during remediation). This will require some changes that are outlined below.

Persisted Data

Currently we persist the URL to the masthead/thumbnail image itself (the act of submitting a crop selection for a masthead/thumbnail causes a fetch of the full image and does the image cropping server side). We still want to persist a URL to an image so we don't have to hit the IIIF service to get the cropped image URL, however we will need to persist some other data from the IIIF manifest to ensure that we're referencin

jkeck / test_faraday_timeout.rb
Last active May 18, 2016
Faraday Timeout Example
View test_faraday_timeout.rb
require 'faraday'
conn = 'http://localhost:3000') do |faraday|
faraday.request :url_encoded
faraday.response :logger
faraday.adapter Faraday.default_adapter
faraday.request :multipart
end do |req|
jkeck / svg-pie-chart.css
Created Nov 14, 2015
Simple SVG Pie Chart
View svg-pie-chart.css
svg {
width: 100px;
border-radius: 50%;
transform: rotate(-90deg);
circle {
fill: none;
stroke-width: 32;
jkeck / form.html
Last active Aug 29, 2015
SearchWorks Search Form
View form.html
<!-- Example: -->
<form action="" method="get">
<label for="q">SearchWorks</label>
<input type="text" name="q" id="q" />
<input type="submit" value="Search" />
jkeck / app.rb
Created Apr 17, 2015
Example configuration
View app.rb
config.libraries = {
'ARS' => 'Archive of Recorded Sound',
'ART' => 'Art & Architecture Library',
'BIOLOGY' => 'Biology Library (Falconer)',
'BUSINESS' => 'Business Library',
'CHEMCHMENG' => 'Chemistry & ChemEng Library (Swain)',
'CLASSICS' => 'Classics Library',
'EARTH-SCI' => 'Earth Sciences Library (Branner)',
'EAST-ASIA' => 'East Asia Library',
'EDUCATION' => 'Education Library (Cubberley)',
jkeck /
Last active Aug 29, 2015
Outline for Blacklight Customization Workshop at HydraConnect.

Basic Configuration

  • i18n (a lot of view overrides could be accomplished with i18n overrides)
  • blacklight_config (Controller Configuration)
    • Facets
    • Fields
    • Sorts
    • Search fields (search type drop-down)
    • Thumbnail by field

Advanced Configuration

View gist:b63922dc5a66fa368eba
(function($) {
jQuery plugin to render Google book covers for image elements
Usage: $(selector).renderGoogleBookCovers();
This plugin :
- collects all 'img.cover-image' elements and batches them
- using ISBN, OCLC & LCCN value(s) of image elements inside each batch,
Google cover images are added using Google Books API
View export.rb
def initialize(controller, response_docs)
@controller = controller
@response_docs = response_docs
def blacklight_maps_config
def type