(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/bash | |
# | |
# Ansible role test shim. | |
# | |
# Usage: [OPTIONS] ./tests/test.sh | |
# - distro: a supported Docker distro version (default = "centos7") | |
# - playbook: a playbook in the tests directory (default = "test.yml") | |
# - role_dir: the directory where the role exists (default = $PWD) | |
# - cleanup: whether to remove the Docker container (default = true) | |
# - container_id: the --name to set for the container (default = timestamp) |
# namespaces | |
@prefix dcterms: http://purl.org/dc/terms/ | |
@prefix edm: http://www.europeana.eu/schemas/edm/ | |
@prefix hydrarights: http://projecthydra.org/ns/auth/acl# | |
@prefix premis: http://www.loc.gov/premis/rdf/v1# | |
@prefix premiscopy: <http://id.loc.gov/vocabulary/preservation/copyrightStatus/ | |
@prefix rsdotorg: http://rightsstatements.org/vocab/path/tba/ | |
@prefix skos: http://www.w3.org/2004/02/skos/core# | |
@prefix ucsd: http://library.ucsd.edu/ontology/dams4.2# | |
@prefix xx: # either dcterms or edm pending discussions |
# lib/models/datastream.rb | |
class CHODatastream < ActiveFedora::NtriplesRDFDatastream | |
property :title, predicate: RDF::DC.title | |
property :creator, predicate: RDF::DC.creator | |
property :date, predicate: RDF::DC.date | |
property :location, predicate: RDF::DC.spatial | |
end |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
source 'https://rubygems.org' | |
gem 'active-fedora', github: 'projecthydra/active_fedora', branch: 'master' | |
gem 'linkeddata' |
source 'https://rubygems.org' | |
gem 'zipruby' |
require 'linkeddata' | |
include RDF | |
# args | |
@ns = 'http://library.ucsd.edu/ontology/dams/#' | |
@class_name = 'UCSD_DAMS' | |
@i = 'https://raw.github.com/ucsdlib/dams/master/ontology/dams.owl' | |
@o = 'ucsd_dams.rb' | |
# |
class Work < ActiveFedora::Base
has_metadata "descMetadata", type: ArticleMetadataDatastream
section :required_information, label: "Required Information" do |section|
section.attribute :title, datastream: :descMetadata, required: true
end
section :secondary_information, label: "Secondary Information" do |section|
section.attribute :contributor, datastream: :descMetadata
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/