Skip to content

Instantly share code, notes, and snippets.

View larsgw's full-sized avatar

Lars Willighagen larsgw

View GitHub Profile
@hubgit
hubgit / citation-schema.json
Last active May 2, 2022 08:57
Mapping of Highwire/Google Scholar citation_* meta fields to schema.org properties, as a JSON-LD context document. Definitions starting with "#" are invalid.
{
"@context": {
"_links": "http://stateless.co/hal_specification.html#links",
"title": "http://schema.org/name",
"description": "http://schema.org/description",
"publisher": "#http://schema.org/publisher > http://schema.org/Organization > http://schema.org/name",
"firstpage": "http://schema.org/pageStart",
"doi": "#http://schema.org/sameAs (URL)",
"volume": "#http://schema.org/isPartOf > http://schema.org/PublicationVolume > http://schema.org/volumeNumber",
"volume": "#http://schema.org/isPartOf > http://schema.org/PublicationIssue > http://schema.org/issueNumber",
@rbnvrw
rbnvrw / LaTeXScaleBars.md
Last active July 29, 2022 14:40
Adding scalebars to images in LaTeX

Scalebar with background

Scalebar with background

To change the backgroundcolor, adjust the scalebgcolor variable to use the desired color. Add the following code to your preamble:

\usepackage{tikz}
\usepackage[usenames, dvipsnames]{color}
\definecolor{scalebgcolor}{rgb}{0.08,0.52,0.80}
@Kasama
Kasama / eduroam.md
Last active November 5, 2025 17:26
login into eduroam wifi network via terminal

To login into eduroam from the command line you'll need to have wpa_supplicant package installed. It is part of the core of most Linux distributions, to check if you have it run wpa_supplicant -v

Create profile file

Start by creating a profile file for the network:

wpa_passphrase  <ssid> > <ssid>.profile
var incognito = function(require, module, exports) {
"use strict";
function isWebkitRequestFileSystem() {
return !!window.webkitRequestFileSystem
}
function isFirefoxIndexedDB() {
return !!window.indexedDB && /Firefox/.test(window.navigator.userAgent)
}
function isIE10PlusOrEdge() {
if (document.documentMode) {
#!/usr/bin/env python3
import zipfile
import sys
import re
import xml.etree.ElementTree as ET
namespaces = {
'a': 'http://schemas.openxmlformats.org/drawingml/2006/main',
'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',
@Cyberes
Cyberes / How to re-implement remove-background in ocrmypdf.md
Last active October 21, 2025 20:26
Re-implement --remove-background in OCRmyPDF

I needed --remove-background so I re-implemented this feature myself.

https://github.com/ocrmypdf/OCRmyPDF

Build Dependencies

Leptonica

This feature requires Leptonica, an image processing and analysis library. You have to build it from source, which is why it was removed from OCRmyPDF.