Skip to content

Instantly share code, notes, and snippets.

@bassettsj
bassettsj / comic-sans.js
Created June 23, 2013 17:38
Comic Sans Bookmarklet.
javascript:(function(){var x=document.styleSheets[document.styleSheets.length-1];x.insertRule('* { font-family: "Comic Sans MS" !important; }',x.cssRules.length);})()
@bassettsj
bassettsj / bash-command-notes.txt
Created July 19, 2013 15:01
Bash Command Notes
#extract
tar cvfz conf.tgz conf/
#!/bin/sh
# Prerequisites:
# 1. Check SOLR_DIR value is correct
# 2. daemon needs to be installed
# 3. Script needs to be executed by root
# This script will launch Solr in a mode that will automatically respawn if it
# crashes. Output will be sent to $LOG. A pid file will be
# created in the standard location.
<div class="breadcrumbs">
<span> <a href="/">Home</a> <span class="divider">/</span>
</span>
<span> <a href="http://localhost:3000/catalog?utf8=%E2%9C%93&amp;q=Big+Mountain">Back to search results</a> <span class="divider">/</span>
</span>
<span class="active"> Big Mountain
</span>
</div><!-- /breadcrumbs -->
<div id="search-results">
<ol class="catalog" start="1">
<li>
<h2>
<a href="/files/2n49t2245">Big Mountain</a>
<small>[<a href="/downloads/2n49t2245" target="_new">Download</a>]</small>
</h2>
<table class="table">
<tr>
<td rowspan="6" class="span20">
%h1
#{t('drs.product_name.short')}?
%small
#{t('drs.product_name')}?
%p
= t('sufia.product_name')
is a secure repository service enabling the #{t('sufia.institution_name')} community to share its research and scholarly work with a worldwide audience.
Faculty, staff, and students can use #{t('sufia.product_name')} to collect their work in one location and create a durable and citeable record of their papers,
presentations, publications, data sets, or other scholarly creations. Through this service, #{t('sufia.institution_name')} researchers can also comply with
grant-funding-agency requirements for sharing and managing research data.
@bassettsj
bassettsj / field_fetch_value.module
Created August 27, 2013 18:33
Don't use this script for a module!
<?php
/**
* Returns field values as actual entities where possible,
* also allows selection of individual items to be returned.
* Code from http://drupal7ish.blogspot.com/2011/03/getting-field-data-out-of-entities.html
* Modified to handle field collections, but the case where a field collection has multiple fields is not yet handled.
*/
function field_fetch_value_fetch($entity_type, $entity, $field_name, $get_delta = NULL, $get_key = NULL) {
$values = array();
$ rake --all
tables for vocabularies missing
Sufia-models is unable to load activerecord-import
/Users/steven/.rvm/gems/ruby-2.0.0-p247@sufia_fork_dev/gems/rubyzip-0.9.9/lib/zip/constants.rb:2: warning: already initialized constant Zip::VERSION
rake aborted!
Multiple migrations have the name ActsAsFollowerMigration
/Users/steven/.rvm/gems/ruby-2.0.0-p247@sufia_fork_dev/gems/activerecord-3.2.13/lib/active_record/migration.rb:637:in `block in migrations'
/Users/steven/.rvm/gems/ruby-2.0.0-p247@sufia_fork_dev/gems/activerecord-3.2.13/lib/active_record/migration.rb:629:in `map'
/Users/steven/.rvm/gems/ruby-2.0.0-p247@sufia_fork_dev/gems/activerecord-3.2.13/lib/active_record/migration.rb:629:in `migrations'
/Users/steven/.rvm/gems/ruby-2.0.0-p247@sufia_fork_dev/gems/activerecord-3.2.13/lib/active_record/migration.rb:734:in `migrations'
rake aborted!
cannot load such file -- zip/zip
/Users/steven/.rvm/gems/ruby-2.0.0-p247@sufia_fork_dev/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/Users/steven/.rvm/gems/ruby-2.0.0-p247@sufia_fork_dev/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/Users/steven/.rvm/gems/ruby-2.0.0-p247@sufia_fork_dev/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/Users/steven/.rvm/gems/ruby-2.0.0-p247@sufia_fork_dev/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/Users/steven/.rvm/gems/ruby-2.0.0-p247@sufia_fork_dev/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/Users/steven/.rvm/gems/ruby-2.0.0-p247@sufia_fork_dev/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/Users/steven/.rvm/gems/ruby-2.0.0-p247@sufia_fork_dev/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/Users/steven/drs-sufia-app/config/application.rb:7:in `<top (required)>'
source 'https://rubygems.org'
gem 'rails', '3.2.13'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'blacklight'