Skip to content

Instantly share code, notes, and snippets.

Dan Horst danhorst

Block or report user

Report or block danhorst

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
danhorst / microfilm.rb
Created Jun 20, 2012
Example Rails model that is indexed into Solr with Blacklight
View microfilm.rb
class Microfilm < ActiveRecord::Base
belongs_to :library
belongs_to :location
belongs_to :collection
after_save :update_solr unless ENV['DO_NOT_INDEX']
after_destroy :remove_from_solr
scope :with_shelf_mark, lambda { |*shelf_mark|
where("#{quoted_table_name}.`shelf_mark` LIKE ?", "%#{shelf_mark.flatten.first}%") unless shelf_mark.flatten.first.blank?
danhorst / gist:1207464
Created Sep 9, 2011
Looksee Gemspec for version 1.0.3
View gist:1207464
# -*- encoding: utf-8 -*- do |s| = %q{looksee}
s.version = "1.0.3"
s.required_rubygems_version =">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["George Ogata"] = %q{2011-09-05 00:00:00.000000000Z} = [""]
danhorst / form-baseline.css
Created Apr 15, 2011
Custom CSS for Google docs form
View form-baseline.css
* Userstyle can be applied using the Stylish Firefox extension
@namespace url(;
@-moz-document domain("") {
/** Page structure styles **/
.ss-form-container, .ss-container {border:3px solid #666 !important; margin:50px 0 0 400px !important; -moz-border-radius: 5px; padding:1.5em 1.5em 0 !important; width:580px !important;}
.ss-resp-card{border:none !important;}
View Simple link checker
View README.textile
danhorst / blackligth installtion
Created Feb 22, 2010
blacklight installation
View blackligth installtion
When I first tried to install blacklight not everything went smoothly.
These instructions are based on the documentation provided here:
Install the dependencies:
$ sudo gem install rails
$ sudo gem install test-unit --version=1.2.3
$ sudo gem install authlogic --version=2.1.2
$ sudo gem install marc --version=0.3.0
View CatalogPlus_Search.rb
require 'cgi'
require 'rubygems'
require 'highline/import'
def uri_escape(string)
View jQuery_example.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html lang="en-gb">
<title>Library Guides Home Page</title>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<meta name="description" content="Library Guides Home Page">
<!-- The jQuery library is included via the Google AJAX Libraries API
But could be installed locally by downloading it from the jQuery website
You can’t perform that action at this time.