Skip to content

Instantly share code, notes, and snippets.

View mtribone's full-sized avatar

Michael Tribone mtribone

View GitHub Profile
@mtribone
mtribone / ShareNotifyDeleteJob.txt
Created July 29, 2019 15:06
ShareNotify Error
ssjobs1prod-new:29907 on share_notify at about an hour ago
Retry or Remove
Class
ShareNotifyDeleteJob (via ActiveJob)
Arguments
---
job_class: ShareNotifyDeleteJob
job_id: 6566bfc0-79b7-4a57-8fc0-a10e60ed8664
provider_job_id:
@mtribone
mtribone / autocomplete.js
Last active July 2, 2019 17:05
JS bits for the Autocomplete HTML
Autocomplete.prototype.onTextBoxType = function(e) {
// only show options if user typed something
if(this.textBox.val().trim().length > 0) {
// get options based on value
var options = this.getOptions(this.textBox.val().
trim().toLowerCase());
// build the menu based on the options
this.buildMenu(options);
// show the menu
this.showMenu();
@mtribone
mtribone / autocomplete.html
Created July 2, 2019 16:11
HTML with Enhanced Code for JS
<div class="field">
<label for="destination">
<span class="field-label">Destination</span>
</label>
<select name="destination" aria-hidden="true" tabindex="-1" class="visually-hidden">
<!-- options here -->
</select>
<div class="autocomplete">
<input aria-owns="autocomplete-options--destination" autocapitalize="none" type="text" autocomplete="off" aria-autocomplete="list" role="combobox" id="destination" aria-expanded="false">
<svg focusable="false" version="1.1" xmlns="http://www.w3.org/2000/svg">
2019-05-13 14:19:04 DEBUG Webdrivers Looking for Site: https://chromedriver.storage.googleapis.com
2019-05-13 14:19:04 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-05-13 14:19:04 DEBUG Webdrivers Found Site: https://chromedriver.storage.googleapis.com
2019-05-13 14:19:04 DEBUG Webdrivers Looking for Site: https://chromedriver.storage.googleapis.com
2019-05-13 14:19:04 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-05-13 14:19:04 DEBUG Webdrivers Found Site: https://chromedriver.storage.googleapis.com
2019-05-13 14:19:04 DEBUG Webdrivers Browser executable: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
2019-05-13 14:19:04 DEBUG Webdrivers Browser executable: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
2019-05-13 14:19:04 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-05-13 14:19:04 DEBUG Webdrivers Latest version available: 74.0.3729.6
@mtribone
mtribone / gist:b07828bd49948fc8fe6b4e172ce09f3b
Created September 19, 2017 18:54
Page 2 Works pagination
2017-09-19 14:21:09 -0400 (21060) Started GET "/concern/generic_works/qjq085k900?page=2" for ::1 at 2017-09-19 14:21:09 -0400
2017-09-19 14:21:09 -0400 (21060) Processing by CurationConcerns::GenericWorksController#show as HTML
2017-09-19 14:21:09 -0400 (21060) Parameters: {"page"=>"2", "id"=>"qjq085k900"}
2017-09-19 14:21:09 -0400 (21060) User Load (0.6ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 ORDER BY `users`.`id` ASC LIMIT 1
2017-09-19 14:21:09 -0400 (21060) Usergroups are ["public", "umg/eis", "umg/psu.smo.snow_users", "umg/psu.tsb.firstfloor", "umg/up.dlt.applicationsteam", "umg/up.dlt.archivesphere-admin-viewers", "umg/up.dlt.archivesphere-admin-viewers.admin", "umg/up.dlt.archivesphere-admin.admin", "umg/up.dlt.archivesphere-project-team", "umg/up.dlt.gamma-ci", "umg/up.dlt.scholarsphere-admin", "umg/up.dlt.scholarsphere-admin-viewers", "umg/up.dlt.scholarsphere-admin-viewers.admin", "umg/up.dlt.scholarsphere-admin.admin", "umg/up.dlt.staff", "umg/up.iam.survey-recipients", "umg/u
rake server:development --trace
** Invoke server:development (first_time)
** Execute server:development
rake aborted!
Net::OpenTimeout: execution expired
/Users/mtribone/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:880:in `initialize'
/Users/mtribone/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:880:in `open'
/Users/mtribone/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:880:in `block in connect'
/Users/mtribone/.rbenv/versions/2.3.3/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
/Users/mtribone/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:878:in `connect'
@mtribone
mtribone / catalog_helper.rb
Created December 12, 2016 16:15
Overriding the image options set by image_tag helper for accessibility and adding aria-hidden = true.
##
# Render the thumbnail, if available, for a document and
# link it to the document record.
#
# @param [SolrDocument] document
# @param [Hash] image_options to pass to the image tag
# @param [Hash] url_options to pass to #link_to_document
# @return [String]
def render_thumbnail_tag(document, image_options = {}, url_options = {})
image_options[:alt] = ""
@mtribone
mtribone / sufia_helper_behavior.rb
Last active August 11, 2016 17:23
TypeError - no implicit conversion of Array into String
{:document=>#<SolrDocument:0x007fb5c05e5e70 @_source={"system_create_dtsi"=>"2016-08-11T13:31:58Z", "system_modified_dtsi"=>"2016-08-11T13:32:02Z", "has_model_ssim"=>["GenericWork"], "id"=>"gx41mh86p", "object_profile_ssm"=>["{\"id\":\"gx41mh86p\",\"head\":[{\"id\":\"http://127.0.0.1:8984/rest/dev/gx/41/mh/86/gx41mh86p/list_source#g70126505349120\"}],\"tail\":[{\"id\":\"http://127.0.0.1:8984/rest/dev/gx/41/mh/86/gx41mh86p/list_source#g70126505349120\"}],\"depositor\":\"mat141@psu.edu\",\"title\":[\"Half-Life 2\"],\"date_uploaded\":\"2016-08-11T13:31:58.671+00:00\",\"date_modified\":\"2016-08-11T13:31:58.691+00:00\",\"owner\":null,\"label\":null,\"relative_path\":null,\"import_url\":null,\"part_of\":[],\"resource_type\":[\"Software or Program Code\"],\"creator\":[\"Valve Corporation\"],\"contributor\":[],\"description\":[\"Half-Life 2 (stylized as HλLF-LIFE2) is a first-person shooter video game and the sequel to Half-Life (1998). Developed by Valve Corporation, it was released on November 16, 2004, following
@mtribone
mtribone / _index_list_default.html.erb_spec.rb
Created June 15, 2016 15:12
LoadError trying to run test from .internal_test_app
bundle exec rake spec spec/views/catalog/_index_list_default.html.erb_spec.rb
/Users/mtribone/.rbenv/versions/2.3.0/bin/ruby -I/Users/mtribone/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.4/lib:/Users/mtribone/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-support-3.4.1/lib /Users/mtribone/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.4/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
/Users/mtribone/workspace/sufia/.internal_test_app/spec/actors/curation_concerns/actors/generic_work_actor_spec.rb:3:in `require': cannot load such file -- rails_helper (LoadError)
from /Users/mtribone/workspace/sufia/.internal_test_app/spec/actors/curation_concerns/actors/generic_work_actor_spec.rb:3:in `<top (required)>'
from /Users/mtribone/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `load'
from /Users/mtribone/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `block