-
Open a Terminal window
-
Install Xcode command line tools:
xcode-select --install
(Follow pop-up prompts to install command-line tools)
-
Install the homebrew package manager:
defmodule ULID.Data do | |
defstruct time: nil, random: nil | |
def from_binary(<<time::integer-size(48), random::binary-size(10)>>) do | |
time | |
|> DateTime.from_unix(:millisecond) | |
|> parse(random) | |
end | |
def from_string(ulid) do |
Open a Terminal window
Install Xcode command line tools:
xcode-select --install
(Follow pop-up prompts to install command-line tools)
Install the homebrew package manager:
class ElasticSnapshot | |
attr_accessor :host, :repository, :region | |
def initialize(host:, repository:, region: 'us-east-1') | |
@host = host | |
@repository = repository | |
@region = region | |
end | |
def list_repositories |
require 'net/https' | |
require 'uri' | |
class Decommissioner | |
attr_reader :auth_cert, :auth_key, :pe_server | |
def initialize(pe_server, auth_cert, auth_key) | |
@pe_server = pe_server | |
@auth_cert = OpenSSL::X509::Certificate.new(auth_cert) | |
@auth_key = OpenSSL::PKey::RSA.new(auth_key) |
t2.xlarge
instance typenulib/fcrepo4:s3fix
def check | |
return false if work.nil? | |
attached_titles = work.ordered_members.to_a.collect { |fs| fs.title.first } | |
expected_titles = attribute_hash[:file].collect { |fn| File.basename(fn) } | |
extra_titles = attached_titles - expected_titles | |
missing_titles = expected_titles - attached_titles | |
return true if extra_titles.empty? && missing_titles.empty? | |
yield(work: work, missing: missing_titles, extra: extra_titles) | |
false | |
end |
def move_old_pyramids | |
bucket = Settings.aws.buckets.pyramids | |
FileSet.find_each do |fs| | |
begin | |
file_id = fs.original_file.id | |
old_file_id = file_id.split(%r{/files/}).last | |
new_file_id = file_id.split(%r{/files/}).first | |
old_key = IiifDerivativeService.s3_key_for(old_file_id) | |
new_key = IiifDerivativeService.s3_key_for(new_file_id) |
ActiveFedora::Base.class_eval do | |
def self.reindex_everything(batch_size: 50, softCommit: true, progress_bar: false, final_commit: false) | |
$stderr.puts "We're at it again, jerks!" | |
# skip root url | |
descendants = descendant_uris(ActiveFedora.fedora.base_uri, exclude_uri: true) | |
batch = [] | |
progress_bar_controller = ProgressBar.create(total: descendants.count, format: "%t: |%B| %p%% %e") if progress_bar |
user www-data; | |
worker_processes 1; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 2048; | |
multi_accept on; | |
use epoll; | |
} |
arch | avalon | donut | glaze | |
---|---|---|---|---|
cantaloupe | X | X | ||
db | O | O | O | |
elasticproxy | X | |||
elasticsearch | X | X | X | X |
fedora | X | X | X | |
hls | X | |||
kibana | X | |||
matterhorn | X |