Skip to content

Instantly share code, notes, and snippets.

View inukshuk's full-sized avatar

Sylvester Keil inukshuk

View GitHub Profile
@inukshuk
inukshuk / style-gen.rb
Last active September 21, 2018 14:50
require 'anystyle'
require 'citeproc/ruby'
require 'csl/styles'
# Load all dependent CSL styles and create a Renderer
# Those should be cached!
styles = CSL::Style.list.map { |id| CSL::Style.load id }.reject { |s| s.bibliography.nil? }
cp = CiteProc::Ruby::Renderer.new
# Parse a reference to CSL/JSON
@inukshuk
inukshuk / convert.rb
Last active April 21, 2020 12:08
Import Annotated Images Into Tropy
#!/usr/bin/env ruby
require 'json'
input = ARGV[0]
items = []
def create_item(title)
{
'template' => 'https://tropy.org/v1/templates/generic',
@inukshuk
inukshuk / find-photos.sh
Created November 15, 2019 08:36
Find Missing Tropy Photos
#!/bin/bash
set -e
if [ $# -lt 2 ]; then
echo
echo "Usage: $0 PROJECT SEARCH_PATH"
echo "Find missing photos in your Tropy project"
echo
echo "Please specify the Tropy PROJECT file and a folder as the SEARCH_PATH"
@inukshuk
inukshuk / tropy-items-simplified-for-import.json
Last active June 17, 2020 08:12
Tropy JSON items export/import examples
[
{
"@type": "Item",
"template": "https://tropy.org/v1/templates/dc",
"http://purl.org/dc/elements/1.1/title": "Veduta di Castel St Angelo. S. Pietro",
"http://purl.org/dc/elements/1.1/creator": " Eugène Constant",
"http://purl.org/dc/elements/1.1/type": "Foto",
"http://purl.org/dc/elements/1.1/source": " Gilman Collection, Museum Purchase, 2005 ",
"http://purl.org/dc/elements/1.1/rights": "Public Domain",
"http://purl.org/dc/elements/1.1/identifier": "2005.100.799 (9)",
@inukshuk
inukshuk / README.md
Last active December 21, 2020 21:54
Jekyll-Scholar Bibliography Template Example

This is a sample Jekyll-Scholar bibliography template. The file bibliography.html should be placed in the _layouts directory. Furthermore, this assumes you have a ./pdf directory: this directory contains all you PDFs or Postscripts (possibly in sub-directories of ./pdf), e.g.: ./pdf/Bartlett-2010-ICML.pdf and ./pdf/talks/Wood-2004-EMBS.pdf both work. You can specify the repository root folder using the repository configuration option.

The bibliography template assumes you have Bootstrap configured on your site.

@inukshuk
inukshuk / july21.xml
Created July 13, 2021 13:00
Training data sample from anystyle.io
<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<sequence><author>Mathews, Jay</author><date>(2009):</date><title>Work Hard. Be Nice.: How Two Inspired Teachers Created the Most Promising Schools in America.</title><location>Chapel Hill:</location><publisher>Alconquin Books</publisher><date>2009</date><edition>Kindle Edition</edition><note>Mathews, Jay: Work Hard. Be Nice.: How Two Inspired Teachers Created the Most Promising Schools in America. Chapel Hill: Alconquin Books. Kindle Edition.</note></sequence>
<sequence><author>Maier, Uwe/ Hofmann, Florian/ Zeitler, Sigrid</author><date>(2012):</date><title>Formative Leistungsdiagnostik. Grundlagen und Praxisbeispiele.</title><location>München:</location><publisher>Oldenbourg.</publisher><journal>In: Schulmanagement Handbuch 141.</journal></sequence>
<sequence><author>Maier, Uwe</author><date>(2010):</date><title>Formative Assessment - Ein erfolgversprechendes Konzept zur Reform von Unterricht und Leistungsmessung?</title><journal>In: Zeitschrift für Erziehung
@inukshuk
inukshuk / _config.yml
Created January 21, 2015 11:59
Jekyll-Scholar: Highlight Author
gems:
- 'jekyll/scholar'
scholar:
bibliography_template: "{{ reference | replace_first: 'Zelle, R. M.', '<b>Zelle, R. M.</b>' }}"
@inukshuk
inukshuk / .npmrc
Last active July 13, 2023 12:53
tropy-libvips-crash
sharp_libvips_binary_host=https://github.com/tropy/sharp-libvips/releases/download
sharp_install_force=true
@inukshuk
inukshuk / README.md
Last active September 26, 2023 08:58
Repro for electron#39701

Repro for electron/electron#39701

To Test:

  1. gh gist clone https://gist.github.com/inukshuk/7374963a8bc966d5da72a38da3402d70
  2. cd 7374963a8bc966d5da72a38da3402d70
  3. npm install
  4. npm run build
  5. npm start

For comparison with older Electron: