Skip to content

Instantly share code, notes, and snippets.

View tingletech's full-sized avatar

Brian Tingle tingletech

View GitHub Profile
[registry@dsc-registry-stg record_cleanup]$ export PYTHONPATH=.
[registry@dsc-registry-stg record_cleanup]$ cat needs-id-fix.txt | xargs -I {} nxls --recursive-objects "{}" --show-custom-function fix_file
[registry@dsc-registry-stg record_cleanup]$ pwd
/apps/registry/from-nuxeo/code/nuxeo-load/record_cleanup
diff --git a/Gruntfile.js b/Gruntfile.js
index 6846188..ed662fb 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -233,7 +233,8 @@ module.exports = function (grunt) {
// additional tasks can operate on them
useminPrepare: {
options: {
- dest: '<%= config.dist %>'
+ dest: '<%= config.dist %>',
$ git fetch ucldc master
From https://github.com/ucldc/public_interface
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> ucldc/master
 
$ git checkout remotes/ucldc/master
Note: checking out 'remotes/ucldc/master'.

You are in 'detached HEAD' state. You can look around, make experimental
@Grab('com.hp.hpl.jena:jena:2.6.4')
@Grab('com.hp.hpl.jena:arq:2.8.8')
import groovy.sparql.Sparql
// Can also take a Jena model as an argument
def sparql = new Sparql("http://dbpedia.org/sparql")
def query = """
SELECT ?abstract
CONSTRUCT {
?subject gvp:prefLabelGVP ?GVP .
?subject <http://www.w3.org/2008/05/skos-xl#altLabel> ?al .
?subject <http://www.w3.org/2008/05/skos-xl#prefLabel> ?pl .
}
WHERE {
{
?subject rdf:type gvp:Subject.
?subject rdf:type skos:Concept.
}
nuxeo=> select * from ucldc_schema_alternativetitle where id='04efcf49-a328-41e1-8641-fe74dfbaec73';
                  id                  | pos | item 
--------------------------------------+-----+------
 04efcf49-a328-41e1-8641-fe74dfbaec73 |   0 | 梅花
(1 row)

--> rest API json returns ��

@tingletech
tingletech / full_path.txt
Last active February 29, 2016 23:33 — forked from aturner/gist:8c7594e7de0d0464d56d
List of files referenced in UCI's Canto Cumulus metadata records, where we didn't obtain/receive a copy of the file on the hard drive (and hence the file is not in Nuxeo).
"/asset-library/UCI/SCA_UniversityArchives/Collection/AS-055/AS-055_b1_f6_001.tif"
"/asset-library/UCI/SCA_UniversityArchives/Collection/AS-055/AS-055_b1_f6_013.tif"
"/asset-library/UCI/SCA_UniversityArchives/Collection/AS-055/AS-055_b1_f6_028.tif"
"/asset-library/UCI/SCA_UniversityArchives/Faculty_Chancellors/Rowland,_F._Sherwood/UCI_A.mov"
"/asset-library/UCI/SCA_UniversityArchives/Collection/AS-136/UCI_AS_136.mp4"
"/asset-library/UCI/SCA_UniversityArchives/Faculty_Chancellors/Rowland,_F._Sherwood/UCI_B.mov"
"/asset-library/UCI/SCA_UniversityArchives/Faculty_Chancellors/Rowland,_F._Sherwood/UCI_C.mov"
"/asset-library/UCI/SCA_UniversityArchives/Faculty_Chancellors/Rowland,_F._Sherwood/UCI_D.mov"
"/asset-library/UCI/SCA_UniversityArchives/Faculty_Chancellors/Rowland,_F._Sherwood/UCI_E.mov"
"/asset-library/UCI/SCA_UniversityArchives/Faculty_Chancellors/Rowland,_F._Sherwood/UCI_F.mov"

~/.pynuxrc

pynux and nxcli use the same config file format

since the configuration contains access credientials for Nuxeo, it is a good practice to make the file so that it can only be read by the current user, espcialy on multiuser systems. In unix, run this command. (other platforms...?)

chmod 600 ~/.pynuxrc
curl -H 'X-Authentication-Token: ...' -k "https://ucldc-solr-stage.elasticbeanstalk.com/solr/query?facet=true&facet.field=repository_name&facet.field=type_ss&rows=0&facet.sort=index&facet.limit=1000"
sudo yum install git
git clone -b ec2 https://github.com/ucldc/appstrap.git
./appstrap/stacks/licensed.yum.sh
./appstrap/stacks/stack_licensed
# log out, and log back in
monit
monit start all