Skip to content

Instantly share code, notes, and snippets.

View awoods's full-sized avatar

Andrew Woods awoods

  • Harvard University
View GitHub Profile
@awoods
awoods / Bad string syntax
Created April 18, 2023 20:04
find . -name '*.py'|xargs grep -H '{}", e'
./jstor_aspace_publisher/app/jstor_publisher.py: current_app.logger.error("Error: unable to publish jstorforum records, {}", err)
./jstor_aspace_publisher/app/jstor_publisher.py: current_app.logger.error("Error: unable to publish aspace records, {}", err)
./jstor_aspace_publisher/app/jstor_publisher.py: current_app.logger.error("Error: unable to publish jstorforum records in itest, {}", err)
./jstor_aspace_publisher/app/jstor_publisher.py: current_app.logger.error("Error: unable to publish aspace records in itest, {}", err)
./jstor_aspace_publisher/app/jstor_publisher.py: current_app.logger.error("Error: unable to connect to mongodb, {}", err)
./jstor_aspace_publisher/app/jstor_publisher.py: current_app.logger.error("Error: unable to connect to mongodb, {}", err)
./jstor_aspace_publisher/app/jstor_publisher.py: current_app.logger.error("VIA/SSIO Publishing error: {}", err)
./jstor_a
@awoods
awoods / script
Created October 26, 2022 17:47
Sanity testing remediated JP2 images
for x in `cat JP2_loris_proxy_urls.txt`; do y=`echo -n $x | sed 's/full.*/info.json/' | sed 's/"//'` ; curl -s -I -o /dev/null -w "%{http_code}" ${y} ; echo " : '${y}'" ; done | tee results.txt
@awoods
awoods / Pipfile
Last active February 12, 2022 00:50
iiif_synchronizer_updater/Pipfile
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
flask="*"
flask_pymongo="*"
@awoods
awoods / workflow.xml
Created November 30, 2021 00:06
dspace/config/workflow.xml
<?xml version="1.0" encoding="UTF-8"?>
<wf-config>
<workflow-map>
<name-map collection="default" workflow="default"/>
<!--<name-map collection="123456789/4" workflow="selectSingleReviewer"/>-->
<!--<name-map collection="123456789/5" workflow="scoreReview"/>-->
</workflow-map>
<!--Standard workflow step-->
<workflow start="fundingreportstep" id="default">
@awoods
awoods / test-out.txt
Created January 25, 2021 20:52
VIVO Regression Test Output
awoods@silver:~/Documents/work/fedora/notes/tasks/vivo/2020/testing/regression-tests/GIT/vivo-regression-tests$ mvn exec:java
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< ca.uqam:vivo-regression-tests >--------------------
[INFO] Building VIVO Regression Test bench 1.11.2-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ vivo-regression-tests ---
[TestNGContentHandler] [WARN] It is strongly recommended to add "<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >" at the top of your file, otherwise TestNG may fail or not work as expected.
15:44:37 INFO HeadOfFacultyUnitTest_fr_CA :: Setup before Class
@awoods
awoods / bundle-exec-out.txt
Created December 21, 2020 19:14
Missing libcurl
PS C:\Users\awoods\Documents\cmhc> bundle exec rake --trace wax:pages cmhc
rake aborted!
LoadError: Could not open library 'libcurl': The specified module could not be found.
.
Could not open library 'libcurl.dll': The specified module could not be found.
.
Could not open library 'libcurl.so.4': The specified module could not be found.
.
Could not open library 'libcurl.so.4.dll': The specified module could not be found.
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ffi-1.14.2-x64-mingw32/lib/ffi/library.rb:145:in `block in ffi_lib'
@awoods
awoods / process-rdf-form-diff.txt
Created November 21, 2020 22:36
Diff required to allow page management
diff --git a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/ProcessRdfForm.java b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/ProcessRdfForm.java
index 406db61fe..668d65683 100644
--- a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/ProcessRdfForm.java
+++ b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/ProcessRdfForm.java
@@ -233,7 +233,8 @@ public class ProcessRdfForm {
literalsFromForm.replace(aKey, newLiteralFromForm);
}
- substituteInMultiLiterals( literalsFromForm, requiredAsserts, optionalAsserts, URLToReturnTo);
+ substituteInMultiLiterals( submission.getLiteralsFromForm(), requiredAsserts, optionalAsserts, URLToReturnTo);
@awoods
awoods / f4-test-objects.sh
Created November 4, 2020 18:40
Creating test containers
#!/usr/bin/bash
###
# Create Direct and Indirect containers
###
echo -e '@prefix pcdm: <http://pcdm.org/models#>\n\n<> a pcdm:Object .' | curl http://localhost:8080/rest/objects -v -H "Content-Type: text/turtle" -X PUT --data-binary @-
echo -e '@prefix pcdm: <http://pcdm.org/models#>\n\n<> a pcdm:Object .' | curl http://localhost:8080/rest/objects/raven -v -H "Content-Type: text/turtle" -X PUT --data-binary @-
echo -e '@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n@prefix ldp: <http://www.w3.org/ns/ldp#>\n@prefix pcdm: <http://pcdm.org/models#>\n\n<> a pcdm:Object ;\nrdf:type <http://www.w3.org/ns/ldp#DirectContainer>;\n
@awoods
awoods / tomcat.log
Created October 21, 2020 12:56
S3 error
Oct 20 20:17:58 ip-10-0-0-121 tomcat9[2316]: INFO 20:17:58.527 (FedoraLdp) POST to create resource with ID: /a9e77954-9c26-47ff-8570-f652a0133b6d, slug: null
Oct 20 20:17:58 ip-10-0-0-121 tomcat9[2316]: WARN 20:17:58.527 (WildcardExceptionMapper) Unmapped exception
Oct 20 20:17:58 ip-10-0-0-121 tomcat9[2316]: software.amazon.awssdk.services.s3.model.S3Exception: We encountered an internal error. Please try again. (Service: S3, Status Code: 500, Request ID: 7D51E077CEF2720D, Extended Request ID: b9jMFB5Lk+9MYhC2yekSyXmKJDKBknFtEfAQj2N1AXZ9iamxAuq9Y7YSxw7q1H5u6/mv5Sn52z8=)
Oct 20 20:17:58 ip-10-0-0-121 tomcat9[2316]: at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156)
Oct 20 20:17:58 ip-10-0-0-121 tomcat9[2316]: at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:106)
Oct 20 20:17:58 ip-10-0-0-121 tomcat9
@awoods
awoods / build-errors.txt
Created June 17, 2020 15:18
FedoraSearchIT Errors
[ERROR] Failures:
[ERROR] FedoraSearchIT.testSearchAllResources:78 results must contain all newly created resources: [http://localhost:36239/02af7084-b2d5-47e1-a2e5-69a592da0d6d, http://localhost:36239/04c6af52-55ed-46c4-8168-1265dd49ff30, http://localhost:36239/061b94dc-91ef-4280-befe-b283b7cc2ffb, http://localhost:36239/078f7233-5c63-4eb3-a460-710757e3fabd, http://localhost:36239/085c2cf3-04fe-40aa-b7c1-4fc1165fe491/x, http://localhost:36239/0867ce4a-310e-4689-86f7-f3b523d49a86, http://localhost:36239/0965b29d-d0b5-4db2-8384-8f7bab5c6e09, http://localhost:36239/0a915b66-1e66-4059-8e70-89c17a3633e8, http://localhost:36239/0d4b40f5-ebed-40a5-a91b-306f464a1155/x, http://localhost:36239/0ec3a8cd-4715-49a9-84ec-68d69d7dac81, http://localhost:36239/13e0254a-0688-4197-a76d-3b365e647bcd, http://localhost:36239/163b171d-a831-4a53-be46-812508bf62e8, http://localhost:36239/16fb6823-f072-4ea2-af7d-325f33ecdd33, http://localhost:36239/16fb6823-f072-4ea2-af7d-325f33ecdd33/ds1, http://localhost:36239/18031472-452d-4232