Skip to content

Instantly share code, notes, and snippets.

View anarchivist's full-sized avatar
🐈‍⬛

María A. Matienzo anarchivist

🐈‍⬛
View GitHub Profile
@anarchivist
anarchivist / strip-oac-attribs.xslt
Last active June 15, 2018 17:34
Strip OAC attributes from EAD
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output indent="yes"/><xsl:param name="removeAttributesNamed" select="'|C-ORDER|MAX-C-ORDER|score|cdlpath:parent|cdlpath:grandparent|xmlns:cdlpath|'"/><xsl:template match="node()|@*" name="identity"><xsl:copy><xsl:apply-templates select="node()|@*"/></xsl:copy></xsl:template><xsl:template match="@*"><xsl:if test= "not(contains($removeAttributesNamed, concat('|', name(), '|') ) ) "><xsl:call-template name="identity"/></xsl:if></xsl:template></xsl:stylesheet>
@anarchivist
anarchivist / stanford_arts.geojson
Created January 17, 2018 18:36
Stanford Arts Map as GeoJSON
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@anarchivist
anarchivist / beehive.conf
Last active January 8, 2018 07:51
Beehive configuration for causing successful, production Netlify deploy events to fire off an update to a PuSH hub
{
"Bees": [
{
"Name": "Superfeedr",
"Class": "httpbee",
"Description": "Superfeeder PuSH endpoint",
"Options": []
},
{
"Name": "Netlify",
tsukemono:matienzo.org mark$ webmention http://matienzo.org/2018/004/quake/
Finding links on http://matienzo.org/2018/004/quake/
Found 7 links:
http://matienzo.org
https://earthquake.usgs.gov/earthquakes/eventpage/nc72948801
https://chaos.social/@anarchivist/99294237499617350
https://twitter.com/anarchivist/status/949065781597298688
https://news.indieweb.org/en
http://matienzo.org/2018/004/quake/
http://microformats.org/wiki/h-event
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "https://purl.stanford.edu/ff447jh7479/iiif/manifest",
"@type": "sc:Manifest",
"label": "Kitāb al-tashrīḥ al-ʻāmm",
"attribution": "Copyright © Stanford University. All Rights Reserved.",
"logo": {
"@id": "https://stacks.stanford.edu/image/iiif/wy534zh7137%2FSULAIR_rosette/full/400,/0/default.jpg",
"service": {
"@context": "http://iiif.io/api/image/2/context.json",
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "https://purl.stanford.edu/ff447jh7479/iiif/manifest",
"@type": "sc:Manifest",
"label": "Kitāb al-tashrīḥ al-ʻāmm",
"attribution": "Copyright © Stanford University. All Rights Reserved.",
"logo": {
"@id": "https://stacks.stanford.edu/image/iiif/wy534zh7137%2FSULAIR_rosette/full/400,/0/default.jpg",
"service": {
"@context": "http://iiif.io/api/image/2/context.json",
@anarchivist
anarchivist / rails_new_with_template.out
Created September 3, 2017 00:07
ArcLight/Bundler 1.15.4 issues
curtido:tmp matienzo$ rails new my-app -m https://raw.githubusercontent.com/sul-dlss/arclight/master/template.rb
create
create README.md
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/config/manifest.js
create app/assets/javascripts/application.js
@anarchivist
anarchivist / demo.rb
Created August 16, 2017 22:01
rosette_api demo
[7] pry(main)> require 'rosette_api'
=> true
[8] api = RosetteAPI.new('XXXXXX')
=> #<RosetteAPI:0x007fa1f9ae9910
@alternate_url="https://api.rosette.com/rest/v1",
@http_client=#<Net::HTTP api.rosette.com:443 open=false>,
@url_parameters=nil,
@user_key="XXXXXX">
[9] pry(main)> params = NameTranslationParameters.new('فاتن حمامة', 'eng', target_script: 'Latn')
=> #<NameTranslationParameters:0x007fa1f8a0e960
@anarchivist
anarchivist / gist:7fe62e59081b46f2339fa06b5b737904
Created April 12, 2017 16:44
Index a sample EAD for ArcLight
curtido:arclight matienzo$ cd .internal_test_app
curtido:.internal_test_app matienzo$ SOLR_URL=http://localhost:8983/solr/blacklight-core bundle exec rails c
Loading development environment (Rails 5.0.2)
irb(main):001:0> require 'solr_ead'
=> true
irb(main):002:0> indexer = SolrEad::Indexer.new
=> #<SolrEad::Indexer:0x007f7ff6ef42f0 @solr=#<RSolr::Client:0x007f7ff6ef4160 @uri=#<URI::HTTP http://localhost:8983/solr/blacklight-core/>, @proxy=nil, @connection=#<RSolr::Connection:0x007f7ff6ef4188>, @update_path="update", @options={:url=>"http://localhost:8983/solr/blacklight-core"}>, @options={}>
irb(main):003:0> indexer.create(File.new('/Users/matienzo/Google Drive/Stanford/ArcLight/Sample Data/Stanford/SPEC/a0122.xml'))
/Users/matienzo/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/solrizer-3.1.1/lib/solrizer/field_mapper.rb:169: warning: constant ::Fixnum is deprecated
/Users/matienzo/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/solrizer-3.1.1/lib/solrizer/field_mapper.rb:169: warning: constant ::Fixnum is d
@anarchivist
anarchivist / keybase.md
Created December 22, 2016 17:49
Keybase verification

Keybase proof

I hereby claim:

  • I am anarchivist on github.
  • I am anarchivist (https://keybase.io/anarchivist) on keybase.
  • I have a public key ASDArDXDHyr-KOpRwot503KzEX8wrjcBJ1GVZhwMcS8Bnwo

To claim this, I am signing this object: