Skip to content

Instantly share code, notes, and snippets.

View eddies's full-sized avatar

Edwin Shin eddies

  • TRA
  • in the space-time continuum
View GitHub Profile
@eddies
eddies / patch-github-oauth.txt
Created July 3, 2013 07:21
Updating an existing GitHub authorization via HTTP PATCH to public_repo only (e.g. prose.io, which defaults to the more permissive "repo").
# List your authorizations (substituting your own GitHub username for <user>)
curl -u <user> https://api.github.com/authorizations
# Update the scope of a specific authorization (substitute a specific id for <id>) to "public_repo"
curl -u <user> --request PATCH https://api.github.com/authorizations/<id> --header "Content-Type:application/json" --data '{"scopes":["public_repo"]}'
# Reference: http://developer.github.com/v3/oauth/#oauth-authorizations-api
@eddies
eddies / Install Graphite on Ubuntu 12.04.md
Last active December 17, 2015 22:38 — forked from bhang/install_graphite_statsd_ubuntu_precise.sh
Installation notes for Graphite on Ubuntu 12.04

Installation of Graphite on Ubuntu 12.04

Prerequisites

  • Apache 2

System level dependencies for Graphite

sudo apt-get install memcached python-dev python-pip sqlite3 libcairo2 \
 libcairo2-dev python-cairo pkg-config
@eddies
eddies / graphite.md
Last active April 14, 2018 13:08 — forked from caged/graphite.md

Installation of Graphite on OS X Mountain Lion (30 May 2013)

Prerequisites

Install Python

brew install python --framework
pip install --upgrade distribute
@eddies
eddies / FCREPO-1191
Last active December 16, 2015 22:09
addRelationship debug output of POST to fcrepo 3.6.2
1 * Client out-bound request
1 > POST http://localhost:9090/fedora/objects/test-rest:1/relationships/new?subject=info:fedora/test-rest:1&predicate=urn:foo/testAddRelationship&object=urn:foo/%ED%95%9C
1 * Client in-bound response
1 < 200
1 < Date: Thu, 02 May 2013 19:25:37 GMT
1 < Content-Length: 4
1 < Set-Cookie: JSESSIONID=1F9DDDB40836F0819F73288AEC7D312B; Path=/fedora/; HttpOnly
1 < Content-Type: text/html
1 < Server: Apache-Coyote/1.1
1 <
@eddies
eddies / gist:5483316
Created April 29, 2013 17:42
org.fcrepo.binary.PolicyDecisionPoint exception
ERROR 01:36:23.156 (ContextLoader) Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.fcrepo.services.DatastreamService#0': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: org.fcrepo.binary.PolicyDecisionPoint org.fcrepo.services.DatastreamService.storagePolicyDecisionPoint; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.fcrepo.binary.PolicyDecisionPoint] is defined: expected single matching bean but found 2: [storagePolicyBean, org.fcrepo.binary.PolicyDecisionPoint#0]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:288) ~[spring-beans-3.2.0.RELEASE.jar:3.2.0
@eddies
eddies / gist:5010180
Created February 22, 2013 02:00
jruby sequencer stacktrace
ERROR 09:50:31.645 (sequencers) Unable to initialize the sequencer "{ "description" : "Example fcrepo sequencer in JRuby\'" , "classname" : "org.fcrepo.example.ReverseContentSequencer" , "pathExpressions" : [ "fedora:/jruby/(.*)[jcr:content/@jcr:data] => fedora:/jruby/$1" ] }" for repository "repo": org.fcrepo.example.ReverseContentSequencer
java.lang.ClassNotFoundException: org.fcrepo.example.ReverseContentSequencer
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0-u10-b09]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0-u10-b09]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0-u10-b09]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0-u10-b09]
at java.lang.ClassLoader.loadClass(ClassLoader.java:423) ~[na:1.7.0-u10-b09]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) ~[na:1.7.0-u10-b09]
at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ~[na:1.7.0-u10-b09]
at java.lang.Class.forName0(Native
@eddies
eddies / settings.xml
Created February 11, 2013 00:53
Mirror settings for fedora4lib attendees. Add the following to your ~/.m2/settings.xml
<mirrors>
<mirror>
<id>fedora4lib</id>
<mirrorOf>central,jboss-public-repository-group,maven2-repository.dev.java.net</mirrorOf>
<url>http://maven.fedora4lib.org:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
@eddies
eddies / paster_output.txt
Created January 15, 2013 15:21
rdfdatabank paster error
$ paster setup-app development.ini
Traceback (most recent call last):
File "/home/foo/workspace/RDFDatabank/bin/paster", line 8, in <module>
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File "/home/foo/workspace/RDFDatabank/lib/python2.7/site-packages/paste/script/command.py", line 93, in run
commands = get_commands()
File "/home/foo/workspace/RDFDatabank/lib/python2.7/site-packages/paste/script/command.py", line 135, in get_commands
plugins = pluginlib.resolve_plugins(plugins)
File "/home/foo/workspace/RDFDatabank/lib/python2.7/site-packages/paste/script/pluginlib.py", line 82, in resolve_plugins
pkg_resources.require(plugin)
@eddies
eddies / rightsMetadata.xsd
Created September 11, 2012 14:47
Sample schema for rightsMetadata (not authoritative)
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://hydra-collab.stanford.edu/schemas/rightsMetadata/v1" xmlns:v1="http://hydra-collab.stanford.edu/schemas/rightsMetadata/v1">
<xs:element name="rightsMetadata">
<xs:complexType>
<xs:sequence>
<xs:element ref="v1:copyright"/>
<xs:element maxOccurs="unbounded" ref="v1:access"/>
<xs:element ref="v1:use"/>
</xs:sequence>
</xs:complexType>
@eddies
eddies / org.fcrepo.test.api.TestRISearch.txt
Created July 5, 2012 18:23
riSearch test failure (configB, postgres & mptstore)
-------------------------------------------------------------------------------
Test set: org.fcrepo.test.api.TestRISearch
-------------------------------------------------------------------------------
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 13.753 sec <<< F
AILURE!
testSpringTripleGenerators(org.fcrepo.test.api.TestRISearch) Time elapsed: 0.02
9 sec <<< FAILURE!
junit.framework.AssertionFailedError: Expected 1 results from SPO query <info:fe
dora/demo:5> <info:fedora/fedora-system:test/tests#tripleGenerator> "true", but
got 0 expected:<1> but was:<0>