Skip to content

Instantly share code, notes, and snippets.

View cbeer's full-sized avatar

Chris Beer cbeer

View GitHub Profile
{
"@context": "http://iiif.io/api/image/2/context.json",
"@id": "https://gist.githubusercontent.com/cbeer/dcd7b120bf211aa5e87a6140baca450b/raw/2fb919751a9a86b536211fdb20fc957c58470796/iiif-example.json",
"height": 3393,
"profile": [
"http://iiif.io/api/image/2/level2.json"
],
"protocol": "http://iiif.io/api/image",
"service": {
"@context": "http://iiif.io/api/auth/1/context.json",
@cbeer
cbeer / main.rb
Created May 30, 2017 23:48 — forked from coorasse/main.rb
CanCanCan Issue
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', '5.1.0' # use correct rails version

Keybase proof

I hereby claim:

  • I am cbeer on github.
  • I am cbeer (https://keybase.io/cbeer) on keybase.
  • I have a public key ASBTnRdXnwr4Tl54H5ESYNubL0mw7TpbARvBfut3vkwBmQo

To claim this, I am signing this object:

@cbeer
cbeer / LICENSE.txt
Last active February 9, 2017 21:28 — forked from mejackreed/LICENSE.txt
Leaflet-IIIF Cropping
MIT License
Copyright (c) 2016 Jack Reed
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@cbeer
cbeer / 1_nw1
Last active February 9, 2016 22:51
# curl -X PUT "http://localhost:4567/netWorth/nw1/" -d @nw1 -H "Content-Type: text/turtle"
<> a <http://example.org/ontology#NetWorth> .
@cbeer
cbeer / _urls.md
Last active August 29, 2015 14:15
@cbeer
cbeer / license.sh
Created August 14, 2014 20:53
Apply license file to all repositories
#/bin/bash
# Dependencies:
# jq: https://github.com/stedolan/jq
# hub: https://github.com/defunkt/hub
cat > /tmp/LICENSE <<EOF
©yyyy The Board of Trustees of the Leland Stanford Junior University.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@cbeer
cbeer / gist:c62d364c10e3150bbdf1
Created July 16, 2014 15:47
Logstash to Piwik
input { stdin { } }
filter {
grok {
match => { "message" => "%{COMMONAPACHELOG} %{QS:agent} %{QS:referrer}" }
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
module BlacklightConfigurationHelper
include Blacklight::ConfigurationHelperBehavior
def default_sort_field
if params.has_key? :q
active_sort_fields.select { |k,config| config.default_for_user_query }.first || super
else
super
end