Skip to content

Instantly share code, notes, and snippets.

View crowesn's full-sized avatar

Sean Crowe crowesn

View GitHub Profile
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win10/NT
; Author: Sean Crower <crowesn@ucmail.uc.edu>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;
2019-05-21 18:07:37.199 INFO (OverseerStateUpdate-72058468137369601-172.20.0.10:8983_solr-n_0000000000) [ ] o.a.s.c.o.SliceMutator createReplica() {
"operation":"ADDREPLICA",
"collection":"157ac730-c59c-4b7e-b55a-b2b63ae79f91",
"shard":"shard1",
"core":"157ac730-c59c-4b7e-b55a-b2b63ae79f91_shard1_replica_n1",
"state":"down",
"base_url":"http://172.20.0.10:8983/solr",
"type":"NRT"}
2019-05-21 18:07:37.673 INFO (qtp1690716179-13) [ ] o.a.s.h.a.CoreAdminOperation core create command qt=/admin/cores&coreNodeName=core_node2&collection.configName=hyku&newCollection=true&name=157ac730-c59c-4b7e-b55a-b2b63ae79f91_shard1_replica_n1&action=CREATE&numShards=1&collection=157ac730-c59c-4b7e-b55a-b2b63ae79f91&shard=shard1&wt=javabin&version=2&replicaType=NRT
2019-05-21 18:07:37.684 ERROR (qtp1690716179-13) [ ] o.a.s.c.CorePropertiesLocator Couldn't persist core properties to /opt/solr/server/solr/157ac730-c59c-4b7e-b55a-b2b63ae79f91_shard1_replica_n1/core.properties: /opt/solr/server/solr/157ac730-c5
2019-05-20 19:49:35.510 INFO (qtp375466577-13) [c:775ca18d-9e33-443c-a6b6-2e8819bc77f5 s:shard1 r:core_node2 x:775ca18d-9e33-443c-a6b6-2e8819bc77f5_shard1_replica_n1] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/cores params={qt=/admin/cores&coreNodeName=core_node2&collection.configName=hyku&newCollection=true&name=775ca18d-9e33-443c-a6b6-2e8819bc77f5_shard1_replica_n1&action=CREATE&numShards=1&collection=775ca18d-9e33-443c-a6b6-2e8819bc77f5&shard=shard1&wt=javabin&version=2&replicaType=NRT} status=400 QTime=1343
2019-05-20 19:49:35.514 ERROR (OverseerThreadFactory-9-thread-3-processing-n:172.18.0.10:8983_solr) [ ] o.a.s.c.a.c.OverseerCollectionMessageHandler Error from shard: http://172.18.0.10:8983/solr
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://172.18.0.10:8983/solr: Error CREATEing SolrCore '775ca18d-9e33-443c-a6b6-2e8819bc77f5_shard1_replica_n1': Unable to create core [775ca18d-9e33-443c-a6b6-2e8819bc77f5_shard1_replica_n1] Caused by: solr
import xml.etree.ElementTree as ET
tree = ET.parse('thorpe.xml')
root = tree.getroot()
for item in root.iter('DISS_para'):
abstract = (item.text)
myList = [abstract.split('\t')]
''.join(map(str,myList))
print(abstract)
external_urls = {
"testpid1" => ["pv63g024f", "http://unique-url.com"],
"testpid2" => ["pv63g024f", "http://duplicate-url1"],
"testpid3" => ["pv63g024f", "http://duplicate-url2"],
"testpid4" => ["pv63g024f", "http://duplicate-url3"]
}
external_urls.each do |lr_pid, values|
work = ActiveFedora::Base.find values.first
urls = work.related_url
@crowesn
crowesn / gist:9336e31a997cbf42920381b639f07a8a
Created September 28, 2017 19:50
file_actor tweak for browse-everything
module Hyrax
module Actors
# actions for a file identified by file_set and relation (maps to use predicate)
class FileActor
attr_reader :file_set, :relation, :user
# @param [FileSet] file_set the parent FileSet
# @param [String] relation the type/use for the file.
# @param [User] user the user to record as the Agent acting upon the file
def initialize(file_set, relation, user)
@crowesn
crowesn / get_orcid_ids.rb
Last active September 22, 2017 16:28
Script for the console to gather all Orcid IDs from production
status_processor = Orcid::ProfileStatus.method(:for)
orcids = []
User.where(User.arel_table[:email].does_not_match('%guest%')).each do |r|
status_processor.call(r) do |on|
on.authenticated_connection do |profile|
orcids << profile.orcid_profile_id
end
end
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3,udp 192.168.33.1:/Users/crowesn/development /home/vagrant/development
Stdout from the command:

Cincy DSA twitter takeover

  1. Taft dynasty
    • Alphonso Taft cofounding the skull and bones
    • William Howard fat jokes
    • Bob Taft failson
    • Mr. Republican
  2. Willich tweets are sweet
  3. Cincinnati Reds - team of the DSA (red scare, etc)
  4. Jerry Springer
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<http://dummyuri/232144783035948358100> a foaf:Person ;
foaf:name "Bierce, Ambrose, 1842-1914?" .
<http://dummyuri/5431789082754235> a foaf:Person ;
foaf:name "Walsh, Elizabeth, 1872-1895" .