Skip to content

Instantly share code, notes, and snippets.

View jcoyne's full-sized avatar

Justin Coyne jcoyne

  • Stanford University Libraries
  • Minneapolis, MN
View GitHub Profile
irb(main):012:0> GenericFile.create! { |f| f.apply_depositor_metadata('jcoyne') }
LocalAuthority Load (0.2ms) SELECT "local_authorities".* FROM "local_authorities" WHERE "local_authorities"."name" = 'lc_subjects' LIMIT 1
LocalAuthority Load (0.2ms) SELECT "local_authorities".* FROM "local_authorities" WHERE "local_authorities"."name" = 'lexvo_languages' LIMIT 1
LocalAuthority Load (0.1ms) SELECT "local_authorities".* FROM "local_authorities" WHERE "local_authorities"."name" = 'lc_genres' LIMIT 1
D, [2014-12-10T07:32:53.785350 #71031] DEBUG -- : HTTP POST (104.89ms) http://127.0.0.1:8983/fedora/rest/dev
D, [2014-12-10T07:32:53.785494 #71031] DEBUG -- : Request body
<> <http://id.loc.gov/vocabulary/relators/dpt> "jcoyne";
<info:fedora/fedora-system:def/model#hasModel> "GenericFile" .
D, [2014-12-10T07:32:53.785555 #71031] DEBUG -- : Response status Net::HTTPCreated (201)
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.global.ssl.fastly.net/gems/extlib-0.9.16.gem)
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.global.ssl.fastly.net/gems/jwt-1.2.0.gem)
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.global.ssl.fastly.net/gems/acts_as_follower-0.2.1.gem)
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.global.ssl.fastly.net/gems/json-1.8.1.gem)
@jcoyne
jcoyne / gist:97d20110c5ed386056f1
Created December 2, 2014 18:32
Unable to start solr
Found one Java-level deadlock:
=============================
"coreLoadExecutor-5-thread-2":
waiting to lock monitor 0x00007fa0a3c59040 (object 0x00000007e2b96a08, a org.apache.log4j.spi.RootLogger),
which is held by "coreLoadExecutor-5-thread-1"
"coreLoadExecutor-5-thread-1":
waiting to lock monitor 0x00007fa0a3c5c6b8 (object 0x00000007e2c887e0, a org.eclipse.jetty.webapp.WebAppClassLoader),
which is held by "coreLoadExecutor-5-thread-2"
Java stack information for the threads listed above:
@jcoyne
jcoyne / gist:1243e34a89436c9f030a
Last active August 29, 2015 14:10
Potential Solr bug for `fl` parameter when there is a colin in the field name.
, [2014-12-01T11:31:42.417498 #3478] DEBUG -- : HTTP POST (5.29ms) http://localhost:8983/solr/test/update?wt=ruby
D, [2014-12-01T11:31:42.417644 #3478] DEBUG -- : Request body <?xml version="1.0" encoding="UTF-8"?><add><doc><field name="id">123</field><field name="foo:bar_ssi">Hmm</field></doc></add>
D, [2014-12-01T11:31:42.417719 #3478] DEBUG -- : Response status Net::HTTPOK (200)
D, [2014-12-01T11:31:42.417787 #3478] DEBUG -- : Response body {'responseHeader'=>{'status'=>0,'QTime'=>2}}
D, [2014-12-01T11:31:54.376250 #3478] DEBUG -- : HTTP POST (19.05ms) http://localhost:8983/solr/test/update?wt=ruby
D, [2014-12-01T11:31:54.376355 #3478] DEBUG -- : Request body <?xml version="1.0" encoding="UTF-8"?><commit/>
D, [2014-12-01T11:31:54.376416 #3478] DEBUG -- : Response status Net::HTTPOK (200)
D, [2014-12-01T11:31:54.376508 #3478] DEBUG -- : Response body {'responseHeader'=>{'status'=>0,'QTime'=>16}}
HTTP GET (6.43ms) http://localhost:8983/fedora/rest/test/14/68/cd/bf/1468cdbf-35e9-4bd4-9c2f-61e110f6c842
Response status Net::HTTPOK (200)
Response body
@prefix nt: <http://www.jcp.org/jcr/nt/1.0> .
@prefix ns001: <http://purl.org/dc/terms/> .
@prefix fcrepo: <http://fedora.info/definitions/v4/repository#> .
@prefix ns002: <http://projecthydra.org/ns/auth/acl#> .
@prefix test: <info:fedora/test/> .
@prefix ns003: <http://www.w3.org/ns/auth/acl#> .
HTTP POST (12.25ms) http://localhost:8983/fedora/rest/test
Request body
```
<> <http://fedora.info/definitions/v4/rels-ext#hasModel> "Hydra::AccessControls::Permission";
<http://www.w3.org/ns/auth/acl#accessTo> <http://localhost:8983/fedora/rest/test/11/e6/3c/05/11e63c05-0c76-4774-a146-7a29cc4d6070>;
<http://www.w3.org/ns/auth/acl#agent> <http://projecthydra.org/ns/auth/person#[email protected]>;
<http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Write> .
```
HTTP POST (8.92ms) http://localhost:8983/fedora/rest/test
Request body
[ <http://fedora.info/definitions/v4/rels-ext#hasModel> "BarHistory2"] .
Response status Net::HTTPCreated (201)
Response body http://localhost:8983/fedora/rest/test/63/c7/01/30/63c70130-1102-4127-be9f-b6f5d00a8fd2
HTTP GET (7.23ms) http://localhost:8983/fedora/rest/test/63/c7/01/30/63c70130-1102-4127-be9f-b6f5d00a8fd2
HTTP HEAD (2.49ms) http://localhost:8983/fedora/rest/test/jh/34/3s/47/jh343s47m
Response status Net::HTTPNotFound (404)
HTTP PUT (3.00ms) http://localhost:8983/fedora/rest/test/jh/34/3s/47/jh343s47m
Request body
<> <http://fedora.info/definitions/v4/rels-ext#hasModel> "GenericFile";
<http://id.loc.gov/vocabulary/relators/dpt> "[email protected]" .
Response status Net::HTTPGone (410)
Richard Cyganiak
9:14 AM (0 minutes ago)
to me
Justin,
In the RDF 1.1 abstract syntax, there is no such thing as "foo" because *every* literal has a datatype. A string literal in RDF 1.1 would be "foo"^^xsd:string.
The notion of "simple literal" exists in RDF 1.1 to explain how to interpret legacy specifications that are written in terms of the old 2004 abstract syntax. If such specifications talk about literals without datatype or language tag, this should be interpreted as "syntactic sugar" for xsd:string typed literals.
class MySearcher
include Blacklight::SolrHelper
def blacklight_config
# provide an instance of blacklight config here
CatalogController.blacklight_config
end
def run
find('abc', {})