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
#!/usr/bin/env ruby | |
# | |
# @file | |
# This script takes an RDF file containing multiple rdf:Description elements | |
# with the same rdf:about attribute, combines them into a single | |
# rdf:Description for each rdf:about, and outputs the resultant RDF. | |
# | |
require 'nokogiri' |
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
require 'fog/core/connection' | |
# Place this in a Rails initializer | |
module Fog | |
module Core | |
class Connection | |
include ActiveSupport::Benchmarkable | |
alias_method :super_request, :request | |
def request(params, &block) |
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
{ | |
"object": { | |
"services": [ | |
{ | |
"about": "http://www.e-codices.unifr.ch/loris/vad/vad-0342/vad-0342_008.jp2", | |
"id": { | |
"inc": -312135832, | |
"timeSecond": 1473424540, | |
"machine": -458205733, | |
"timestamp": 1473424540, |
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
<!doctype html> | |
<!-- | |
A minimal example showing how to display a IIIF manifest for a Europeana record | |
in the Leaflet-IIIF viewer. | |
Before running this, you need to change "YOUR_API_KEY" to your actual Europeana | |
API key. Get one at <http://labs.europeana.eu/api/registration>. | |
This example builds on Jack Reed's Leaflet-IIIF plugin example at | |
<http://mejackreed.github.io/Leaflet-IIIF/examples/iiif-manifest-example.js> |
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
curl https://www.europeana.eu/api/v2/record/9200211/en_list_one_vad_0342.json?wskey=YOUR_API_KEY |
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
mkdir -p ${HOME}/.cf/${JOB_NAME} && export CF_HOME=${HOME}/.cf/${JOB_NAME} |
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
set +x && cf login -a ${BLUEMIX_CF_API} -u ${CF_USER} -p ${CF_PASS} -o ${BLUEMIX_CF_ORG} -s test && set -x |
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
# Given an app with mirrors web-blue and web-green in the CF test space with hostname www.example.org... | |
# Find which mirror is already active, which to switch to | |
export OLD_MIRROR=$(cf routes | sed -nr 's/^(test\s+)?www\s+example\.org\s+web-(blue|green).*$/\2/p') | |
if [ "$OLD_MIRROR" = "blue" ]; then | |
export NEW_MIRROR="green" | |
elif [ "$OLD_MIRROR" = "green" ]; then | |
export NEW_MIRROR="blue" | |
else | |
export OLD_MIRROR="green" |
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
/* eslint-disable camelcase */ | |
export default ({ $auth, redirect }) => { | |
const redirectUrl = $auth.options.redirect.login; | |
const axiosInstance = $auth.ctx.app.$axios; | |
const refreshAccessToken = async(requestConfig) => { | |
const refreshToken = $auth.getRefreshToken($auth.strategy.name); | |
const options = $auth.strategy.options; | |
// Nuxt Auth stores token type e.g. "Bearer " with token, but refresh_token |
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
# Source Redis database | |
SRC_HOST= | |
SRC_PASSWORD= | |
SRC_PORT= | |
# Destination Redis database | |
DST_HOST= | |
DST_PASSWORD= | |
DST_PORT= |