Skip to content

Instantly share code, notes, and snippets.

View nichtich's full-sized avatar
🦊
not a fox

Jakob Voß nichtich

🦊
not a fox
View GitHub Profile
@nichtich
nichtich / library-concepts.md
Last active January 28, 2026 14:19
Library Ontology

This file collects some concepts (classes and properties) of the Library Ontology. To refer to other ontolgies the following namespace prefixes are defined (all in Turtle syntax):

# RDF basics
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ns: <http://www.w3.org/2003/06/sw-vocab-status/ns#> .
@nichtich
nichtich / README.md
Last active September 12, 2025 05:54 — forked from oodavid/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)
@nichtich
nichtich / add-element-path-as-pi.xsl
Last active July 7, 2025 09:03
Add XML processing-instruction to track the location of each XML element as unique XPath expression
<?xml version="1.0" encoding="UTF-8"?>
<!--
Recursively copy XML document (without comments and processing instructions) and
add a processing-instruction "path" with an XPath expression to locate each element.
For instance:
<a>
<b>foo</b>
<b>bar</b>
#/bin/bash
# Directly install Raspberry OS to SD card
IMAGE=https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2020-12-04/2020-12-02-raspios-buster-armhf-full.zip
DEV=/dev/sdd
curl -o - $IMAGE | zcat | sudo dd bs=4M of=$DEV conv=fsync
# as one-liner
IMAGE=... DEV=/dev/sdd bash -c 'curl -o - $IMAGE | zcat | sudo dd bs=4M of=$DEV conv=fsync'
@nichtich
nichtich / viaflookup.pl
Created February 17, 2011 16:32
Make use of VIAF authority records
#!/usr/bin/perl
=head1 NAME
viaflookup.pl - How to make use of VIAF authority records
=head1 VERSION
Version 0.2 - 2011-02-18
@nichtich
nichtich / csv2quickstatements.pl
Created August 10, 2017 09:00 — forked from lunohodov/ral_classic.csv
RAL Standard Color Table (CSV)
#!/usr/bin/env perl
#
# Import RAL color table to Wikidata via QuickStatements
#
use v5.14;
my %color = (
de => 'Farbe',
en => 'color',
fr => 'couleur',
@nichtich
nichtich / README.md
Last active April 18, 2024 12:59
Ubuntu at Lenovo ThinkPad P14s

Install and setup Ubuntu at a new Lenovo ThinkPad P14s Gen 3 with NVIDIA T550.

Lenovo is certified for Ubuntu

Lenovo provides a short document how to install Ubuntu 20.04

  • Enter BIOS and disable secure boot, to boot from USB Stick
  • Install Ubuntu, with "Install third-party software" enabled to include NVIDIA drivers

Update firmware

A data-package is a dcat:dataset.

Aligned with DCAT-AP.

{
  "@type": "dcat:dataset",
  "name": {
  },
 "id": {
@nichtich
nichtich / wdquery
Last active November 22, 2023 09:27
Query Wikidata via SPARQL from command line
#!/bin/bash
#
# Run a Wikidata query from command line
#
# Usage examples:
#
# wdquery "DESCRIBE wd:Q42"
# wdquery - xml < query.sparql
# wdquery query.sparql json
#
@nichtich
nichtich / wiktionarylookup.html
Created November 12, 2010 19:10
Look up a word in Wiktionary via MediaWiki API and show the Wiktionary page
<html>
<head>
<script type="text/javascript" src="./jquery-1.4.3.min.js"></script>
<script type="text/javascript">
var baseURL = 'http://en.wiktionary.org';
function showPage(page,text) {
var sourceurl = baseURL + '/wiki/' + page;
$('#pagetitle').text(page);
$('#wikiInfo').html(text);
$('#sourceurl').attr('href',sourceurl);