Skip to content

Instantly share code, notes, and snippets.

View camillevilla's full-sized avatar

Camille Villa camillevilla

View GitHub Profile
@camillevilla
camillevilla / widget.html
Last active September 3, 2021 23:19
libcal widget example
<script>
jQuery.getScript("https://stanforduniversity.libcal.com/js/myscheduler.min.js", function() {
jQuery("#mysched_89018").LibCalMySched({iid: 5247, lid: 0, gid: 0, uid: 89018, width: 560, height: 680, title: 'Make an appointment - ', domain: 'https://stanforduniversity.libcal.com'});
});
</script>
<!-- Place the following link anywhere in your page. Make sure the id "mysched_89018" matches with the above code: jQuery("#mysched_89018") //-->
<button id="mysched_89018" href="#">Schedule an appointment</button>
<!-- Below is optional button styling //-->
<style>
@camillevilla
camillevilla / export.json
Created December 12, 2020 03:16
Cats n' friends Mirador workspace export
{
"catalog": [
{
"manifestId": "https://damsssl.llgc.org.uk/iiif/2.0/1556378/manifest.json",
"provider": "The National Library of Wales"
},
{
"manifestId": "https://damsssl.llgc.org.uk/iiif/2.0/1487439/manifest.json"
},
{
@camillevilla
camillevilla / From the Page manifest fetch
Last active January 4, 2022 23:08
From the Page manifest fetchin'
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'http'
gem 'byebug'
end
puts 'Gems installed and loaded!'
@camillevilla
camillevilla / transifex.yml
Last active May 11, 2020 21:43
Mirador Transifex-GitHub integration config - languages with country codes
filters:
- filter_type: file
file_format: KEYVALUEJSON
source_language: en
source_file: src/locales/en/translation.json
translation_files_expression: src/locales/<lang>/translation.json
settings:
# these mappings are necessary because Mirador translation files use camel case instead of snake case for languages with country codes
language_mapping:
pt_BR: ptBr
@camillevilla
camillevilla / transifex.yml
Last active April 28, 2020 23:09
Transifex generic YML examples
# Example config from sul-dlss/dlme-transform
# all supported i18n types: https://docs.transifex.com/formats
filters:
- filter_type: file
file_format: YAML_GENERIC
source_language: en
source_file: lib/translation_maps/norm_has_type_to_en.yaml
translation_files_expression: lib/translation_maps/norm_has_type_to_<lang>.yaml
- filter_type: file
file_format: YAML_GENERIC
@camillevilla
camillevilla / transifex.yml
Last active April 28, 2020 00:07
Transifex-GitHub integration config for Rails i18n YAML files
# example from projectblacklight/spotlight
filters:
- filter_type: file
file_format: YML
source_language: en
source_file: config/locales/en.yml
translation_files_expression: config/locales/<lang>.yml
- filter_type: file
file_format: YML
source_language: en
@camillevilla
camillevilla / manifest.json
Last active October 22, 2019 18:59
Manifest for an item uploaded to test Spotlight instance w/ modified image service
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@type": "sc:Manifest",
"@id": "https://exhibits-stage.stanford.edu/external-iiif-and-upload-images-test-august-2019/catalog/107-6912/manifest",
"label": "morning glory uploaded - manifest from Camille's github gist",
"description": "This manifest has a modified image service URL.",
"sequences": [{
"@type": "sc:Sequence",
"@id": "https://exhibits-stage.stanford.edu/external-iiif-and-upload-images-test-august-2019/catalog/107-6912/manifest/sequence/normal",
"rendering": [],
@camillevilla
camillevilla / manifest.json
Created June 7, 2019 00:03
poetry sequence example
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "http://71b3deb8-e12b-452f-a961-def6179114fd",
"@type": "sc:Manifest",
"label": "[Click to edit label]",
"metadata": [],
"description": [
{
"@value": "[Click to edit description]",
"@language": "en"
@camillevilla
camillevilla / example.html
Created June 6, 2019 21:00
A Mirador 2 instance configured to show Collection tree browser
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="mirador/css/mirador-combined.css">
<title>Mirador Viewer</title>
<style type="text/css">
#viewer {
width: 100%;
@camillevilla
camillevilla / marcie.json
Created June 6, 2019 20:58
A sample IIIF Collection featuring 🐱
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "http://localhost:8080/mycollection/top",
"@type": "sc:Collection",
"label": "Marcie",
"description": "Pictures of Marceline the Vampire Queen",
"attribution": "Camille Villa",
"manifests": [
{
"@id": "http://free.iiifhosting.com/iiif/2ccd8d79021fea909a8195abcf7c2128250e5b62c56fd3ded8a36a3ef2252890/manifest.json",