Skip to content

Instantly share code, notes, and snippets.

View atz's full-sized avatar
:octocat:

Joe Atzberger atz

:octocat:
  • Corelight
  • Columbus, OH
View GitHub Profile
@atz
atz / retrieveById.xml
Created September 28, 2017 00:54
Web of Science input examples
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:woksearch="http://woksearch.v3.wokmws.thomsonreuters.com">
<soapenv:Header/>
<soapenv:Body>
<woksearch:retrieveById>
<databaseId>WOS</databaseId>
<uid>WOS:000270372400005</uid>
<uid>WOS:000075022300003</uid>
<queryLanguage>en</queryLanguage>
<retrieveParameters>
@atz
atz / proposal.txt
Last active June 5, 2017 17:40
Addressing Lease/Embargo (and other) Visibility constraints in Samvera
SAMVERA PROPOSAL:
"Scope of visibility" questions should resolve to (multivalued) date range fields:
~ visibility_public_drsim
~ visibility_institution_drsim
~ etc.
For each non-private vis. type the user has access to, queries of the form, e.g.:
"-visibility_public_drsim:[* TO *] OR visibility_public_drsim:NOW"
That is to say: "either it doesn't have visibility_public date period, or that period intersects now"
@atz
atz / hosts
Last active April 25, 2017 21:29
DNS/firewall/packetfilter issues w/ OSX, /etc/hosts file
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
127.0.1.1 foobar.localhost
127.0.2.1 zubaz.localhost
127.0.3.1 foo.localhost
@atz
atz / fail.txt
Created April 24, 2017 21:52
bundle exec rake assets:precompile #fail
hyku atz$ SOLR_URL="http://127.0.0.1:8985/solr/" DISABLE_REDIS_CLUSTER=true RAILS_ENV=production bundle exec rake assets:precompile
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <top (required)> at /Users/atz/repos/hyku/config/application.rb:8)
rake aborted!
ExecJS::RuntimeError:
(execjs):1
/Users/atz/.rvm/gems/ruby-2.3.1/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:219:in `exec_runtime'
/Users/atz/.rvm/gems/ruby-2.3.1/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in `exec'
/Users/atz/.rvm/gems/ruby-2.3.1/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:21:in `eval'
/Users/atz/.rvm/gems/ruby-2.3.1/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:46:in `call'
/Users/atz/.rvm/gems/ruby-2.3.1/gems/uglifier-3.2.0/lib/uglifier.rb:195:in `run_uglifyjs'
@atz
atz / byebug.txt
Last active January 13, 2017 19:50
where's my curation_concern?
[82, 91] in /Users/atz/repos/sufia/app/controllers/concerns/sufia/works_controller_behavior.rb
82: end
83: end
84:
85: def save_permissions
86: byebug
=> 87: @saved_permissions = curation_concern.permissions.map(&:to_hash)
88: end
89:
90: def permissions_changed?
@atz
atz / README.md
Last active January 5, 2017 01:03
Sufia/CurationConcerns CanCan notes

Context

The context is an application based on a Rails engine (actually, nested Rails engines: Sufia, CurationConcerns, Blacklight, et al. -- a matryoshka of engines) using CanCan permissions.

Use Case

The use case is permissioning the batch creation of items of different types. The types are already modeled and have established permissions. Ideally we would have a single batch model with an awareness of what item type it is batching, dynamically delegating permissions to that model. I.E., if you can create one object of a given type, you can create a batch of them.

The trick for the engine code is: we don't know how many item types will exist ahead of time. They are generated.

@atz
atz / icu_jars.list
Created October 31, 2016 21:39
The various Solr ICU jars I already have installed on my machine, with counts
29 icu4j-49.1.jar
8 icu4j-4_8_1_1.jar
11 icu4j-53.1.jar
4 icu4j-56.1.jar
19 lucene-analyzers-icu-4.0.0.jar
2 lucene-analyzers-icu-4.10.2.jar
3 lucene-analyzers-icu-4.10.4.jar
2 lucene-analyzers-icu-4.3.0.jar
6 lucene-analyzers-icu-4.9.0.jar
2 lucene-analyzers-icu-6.1.0.jar
@atz
atz / battle_for_control.txt
Last active October 28, 2016 23:15
binstubs needed?
generate blacklight:search_builder
Looks like your app's ./bin/rails is a stub that was generated by Bundler.
In Rails 4, your app's bin/ directory contains executables that are versioned
like any other source code, rather than stubs that are generated on demand.
Here's how to upgrade:
bundle config --delete bin # Turn off Bundler's stub generator
rake rails:update:bin # Use the new Rails 4 executables
@atz
atz / full_exception.txt
Last active October 20, 2016 22:45
deprecation warning
/Users/atz/.rvm/gems/ruby-2.3.1/gems/factory_girl-4.7.0/lib/factory_girl/linter.rb:12:in `lint!': The following factories are invalid: (FactoryGirl::InvalidFactoryError)
* uploaded_resource - DEPRECATION WARNING: Blacklight::Document#empty? is deprecated; use obj.to_h.empty? instead. (called from method_missing at /Users/atz/.rvm/gems/ruby-2.3.1/gems/activemodel-4.2.7.1/lib/active_model/attribute_methods.rb:430) (RuntimeError)
from /Users/atz/.rvm/gems/ruby-2.3.1/gems/factory_girl-4.7.0/lib/factory_girl.rb:67:in `lint'
from /Users/atz/repos/portfolios/spec/rails_helper.rb:56:in `block (2 levels) in <top (required)>'
from /Users/atz/.rvm/gems/ruby-2.3.1/gems/rspec-core-3.5.2/lib/rspec/core/example.rb:443:in `instance_exec'
from /Users/atz/.rvm/gems/ruby-2.3.1/gems/rspec-core-3.5.2/lib/rspec/core/example.rb:443:in `instance_exec'
from /Users/atz/.rvm/gems/ruby-2.3.1/gems/rspec-core-3.5.2/lib/rspec/core/hooks.rb:350:in `run'
from /Users/atz/.rvm/gems/ruby-2.3.1/gems/rspec-core-3.5.2/lib/rspec/core/configu
@atz
atz / output.txt
Created October 18, 2016 22:03
active_fedora-noid generator output during rake engine_cart:generate
Bundle complete! 13 Gemfile dependencies, 60 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
test_app
generate active_fedora:noid:install
info Installing ActiveFedora::Noid
rake active_fedora_noid_engine:install:migrations
Copied migration 20161018220117_create_minter_states.active_fedora_noid_engine.rb from active_fedora_noid_engine
rake db:migrate
== 20161018220117 CreateMinterStates: migrating ===============================
-- create_table(:minter_states, {})