This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bgrep { | |
ag "$@" $(bundle show --paths) . | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def cores_status | |
vars = { | |
action: "STATUS", | |
wt: "json"} | |
target_url = "#{self.solr_admin_url}/cores" | |
resp = Typhoeus.get(target_url, params: vars) | |
if resp.response_code == 200 | |
body = JSON.parse!(resp.response_body) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(-5..5).each do |v| | |
begin | |
puts 10 / v | |
rescue => e | |
puts "#{e.message}" | |
next | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13) Admin::StatsController statistics page top formats gathers formats | |
Failure/Error: json = open(query_url).read | |
ActionView::Template::Error: | |
404 Not Found | |
# ./app/models/system_stats.rb:99:in `top_data' | |
# ./app/models/system_stats.rb:57:in `top_formats' | |
# ./app/presenters/sufia/admin_stats_presenter.rb:22:in `top_formats' | |
# ./app/views/admin/stats/_top_data.html.erb:9:in `__home_grosscol_workspace_sufia_app_views_admin_stats__top_data_html_erb___3059809105315880374_47081691704000' | |
# ./app/views/admin/stats/index.html.erb:9:in `__home_grosscol_workspace_sufia_app_views_admin_stats_index_html_erb__4280599541274542522_47081693780540' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<solr> | |
<sharedLib>lib</sharedLib> | |
<solrcloud> | |
<str name="host">${host:}</str> | |
<int name="hostPort">${jetty.port:8983}</int> | |
<str name="hostContext">${hostContext:solr}</str> | |
<int name="zkClientTimeout">${zkClientTimeout:15000}</int> | |
<bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Removing sample rails app | |
Using rake 10.4.2 | |
Using i18n 0.7.0 | |
Using json 1.8.3 | |
Using minitest 5.8.1 | |
Using thread_safe 0.3.5 | |
Using tzinfo 1.2.2 | |
Using activesupport 4.2.4 | |
Using builder 3.2.2 | |
Using erubis 2.7.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If logging into tang, cd to dev | |
if [[ $HOSTNAME = 'tang.umdl.umich.edu' ]]; then | |
# Add rbenv init script evaluation | |
eval "$(rbenv init -)" | |
# Set rbenv version for this shell | |
rbenv shell 2.2.1 | |
# Alias bundle exec as bunx | |
alias bunx='bundle exec' | |
# Change to dev directory | |
cd /quod-dev/dev/grosscol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I either end up with a rubocop error or an rspec error. In each case, the travis build will not pass. | |
# Rubocop error: | |
# RSpec/DescribedClass: Use described_class instead of Hydra::Works::GenericFile::Characterization | |
describe Hydra::Works::GenericFile::Characterization do | |
let(:demo_class) do | |
Class.new(Hydra::Works::GenericFile::Base) do | |
include Hydra::Works::GenericFile::Characterization | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make a new rails application and drop this file in. | |
# | |
# Run from the command line with just plain ruby: | |
# bundle exec ruby doit.rb | |
# | |
# Run from the command line with rails: | |
# bundle exec rails runner "eval(File.read 'doit.rb')" | |
require 'active_fedora/noid' |