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 / README.md
Last active May 5, 2024 18:13 — 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 / 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

@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',

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);
@nichtich
nichtich / bibtex.bib
Last active July 30, 2023 19:30
Get CSL-Data for a given DOI
@article{Williams_2010,
doi = {10.1371/journal.pone.0010676},
url = {http://dx.doi.org/10.1371/journal.pone.0010676},
year = 2010,
month = {may},
publisher = {Public Library of Science ({PLoS})},
volume = {5},
number = {5},
pages = {e10676},
author = {Jeffrey T. Williams and Kent E. Carpenter and James L. Van Tassell and Paul Hoetjes and Wes Toller and Peter Etnoyer and Michael Smith},
@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 / beacon2nt.awk
Created December 6, 2011 16:38
Simple awk scripts to convert between BEACON format and N-Triples
# Simple awk script to convert BEACON format to N-Triples
# First published at https://gist.github.com/gists/1438869
# hereby put into public domain
BEGIN {
FS = "|"
link = "http://www.w3.org/2000/01/rdf-schema#seeAlso"
header = 1
}
{
if (header && $1 ~ /^(\xef\xbb\xbf)?[ \t]*#/) { # may contain UTF-8 BOM!