Skip to content

Instantly share code, notes, and snippets.

View palexander's full-sized avatar

Paul R Alexander palexander

View GitHub Profile
@palexander
palexander / review.rb
Created November 29, 2012 22:17
blank node error
module LinkedData
module Models
class Review < Goo::Base::Resource
model :review
validates :creator, :presence => true, :cardinality => { :maximum => 1 }
validates :created, :date_time_xsd => true, :presence => true, :cardinality => { :maximum => 1 }
validates :body, :presence => true, :cardinality => { :maximum => 1 }
validates :ontologyReviewed, :presence => true, :cardinality => { :maximum => 1 }
validates :usabilityRating, :cardinality => { :maximum => 1 }
validates :coverageRating, :cardinality => { :maximum => 1 }
@palexander
palexander / gist:3671163
Created September 8, 2012 01:26
BioPortal Prototype JSONP Proxy
@palexander
palexander / gist:2975305
Last active January 21, 2022 14:03
Compiling and running mosh on Dreamhost
# Thanks to @samsonjs for the cleaned up version:
# https://gist.github.com/samsonjs/4076746
PREFIX=$HOME
VERSION=1.2.3
# Install Protocol Buffers
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2
tar -xf protobuf-2.4.1.tar.bz2
cd protobuf-2.4.1
@palexander
palexander / gist:2938058
Created June 15, 2012 18:34
SemTech Wrapup
  • JSON-LD
  • OntoText Linked Life Data
  • W3C Semantic Web Activities
    • Audio/Video markup
    • SPARQL 1.1
# Adjust sessions so they work across subdomains
# This also will work if your app runs on different TLDs
# from: http://szeryf.wordpress.com/2008/01/21/cookie-handling-in-multi-domain-applications-in-ruby-on-rails/
# modified to work with Rails 2.3.0
module ActionControllerExtensions
def self.included(base)
base::Dispatcher.send :include, DispatcherExtensions
end
@palexander
palexander / gist:1573441
Created January 7, 2012 01:48
Wildcard subdomain setup
# Two new A records
*.stage.bioontology.org 171.67.213.48
*.bioportal.bioontology.org 171.67.213.45
### Apache configuration
#
# Your VirtualHosts section
#
@palexander
palexander / gist:1375271
Created November 18, 2011 01:35
Remove a password from Git's history
# Sync with the remote master
git pull
# Force your clone to look like HEAD
git reset --hard
# AGAIN, A WARNING: This can really break stuff!
# Run your filter branch command, replacing all instances of "password" with "your_password"
# The example looks for Ruby files ("*.rb"), you can change this to match your needs
java.lang.StackOverflowError
at java.util.HashSet.add(HashSet.java:200)
at org.coode.owlapi.rdf.model.RDFGraph.addTriple(RDFGraph.java:58)
at org.coode.owlapi.rdf.model.RDFTranslator.addTriple(RDFTranslator.java:54)
at org.coode.owlapi.rdf.model.RDFTranslator.addTriple(RDFTranslator.java:38)
at org.coode.owlapi.rdf.model.AbstractTranslator.addSingleTripleAxiom(AbstractTranslator.java:764)
at org.coode.owlapi.rdf.model.AbstractTranslator.addSingleTripleAxiom(AbstractTranslator.java:746)
at org.coode.owlapi.rdf.model.AbstractTranslator.visit(AbstractTranslator.java:470)
at uk.ac.manchester.cs.owl.owlapi.OWLDataPropertyAssertionAxiomImpl.accept(OWLDataPropertyAssertionAxiomImpl.java:73)
at org.coode.owlapi.rdf.model.AbstractTranslator.processIfAnonymous(AbstractTranslator.java:941)
2011-09-28 11:11:19,771 DEBUG [org.ncbo.stanford.obs.service.annotator.impl.AnnotatorServiceImpl] - textToAnnotate = [melanoma heart brain ]
2011-09-28 11:11:19,775 DEBUG [org.ncbo.stanford.obs.service.annotator.impl.AnnotatorServiceImpl] - mgrepResults size = 128
2011-09-28 11:11:19,775 DEBUG [org.ncbo.stanford.obs.service.annotator.impl.AnnotatorServiceImpl] - Computing direct annotations.....
2011-09-28 11:11:20,167 DEBUG [org.ncbo.stanford.obs.service.annotator.impl.AnnotatorServiceImpl] - [Duration for DIRECT Annotations for 'OBA_RESULT_9f10' = 00 hours, 00 minutes, 00 seconds.]
2011-09-28 11:11:20,167 DEBUG [org.ncbo.stanford.obs.service.annotator.impl.AnnotatorServiceImpl] - Computing ISA_CLOSURE expanded annotations.....
2011-09-28 11:11:21,159 DEBUG [org.ncbo.stanford.obs.service.annotator.impl.AnnotatorServiceImpl] - [Duration for ISA Annotations for 'OBA_RESULT_9f10' = 00 hours, 00 minutes, 00 seconds.]
2011-09-28 11:11:21,159 DEBUG [org.ncbo.stanford.obs.service.annotator.impl.AnnotatorServiceImpl
import os, sys, pygame, random, math
from pygame.locals import *
if not pygame.font: print 'Warning, fonts disabled'
if not pygame.mixer: print 'Warning, sound disabled'