Skip to content

Instantly share code, notes, and snippets.

View kba's full-sized avatar

Konstantin Baierer kba

View GitHub Profile
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<!--
Author: Rod Page
Source: http://iphylo.blogspot.com/2011/07/correcting-ocr-using-hocr-firefox.html#comment-400434491
-->
<xsl:output method='html' version='1.0' encoding='utf-8' indent='yes'/>
<xsl:variable name="scale" select="800 div //page/@width" />
function getPathTo(element) {
if (element.id!=='')
return 'id("'+element.id+'")';
if (element===document.body)
return element.tagName;
var ix= 0;
var siblings= element.parentNode.childNodes;
for (var i= 0; i<siblings.length; i++) {
var sibling= siblings[i];
@Zehkul
Zehkul / Convert Script – README.md
Last active December 16, 2023 07:19
Script to quickly convert and crop videos from within mpv

#README:

This script for mpv intends to offer the fastest and simplest way to convert parts of a video—while you’re watching it and not really more work intensive than making a screenshot. A short demonstration: https://d.maxfile.ro/omdwzyhkoa.webm

##Installation:

You need:

  • yad (at least 0.26) (AUR)
@tarruda
tarruda / jobcontrol.vim
Created July 9, 2014 10:49
Neovim job control demo
" Demo of Neovim job control feature.
"
" It starts two netcat processes listening on the same TCP port,
" the second process will exit immediately since the port will be
" unavailable(Used to demonstrate the stderr/exit events)
" To play with this, use two terminals
"
" On terminal 1: `nvim -S jobcontrol.vim`.
" Use `:call jobwrite(v:srv1_id, string) to write
" data to the netcat client
@xero
xero / ascii.cheatsheet
Created January 31, 2015 07:47
box drawing cheat sheet for ascii art
╓─────[ box drawing cheat sheet ]
╙────────────────────────────────────── ─ ─
─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏
┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟
┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯
@assafweinberg
assafweinberg / RelationalWrapper.js
Last active June 26, 2019 11:44
SQL Join with LokiJS
import loki from 'lokijs';
import _ from 'lodash';
class relationalWrapper {
constructor(dbName) {
this.db = new loki('dbName');
}
//Utility to strip loki meta data
_stripMetaData(obj) {
@maurizi
maurizi / branches-into-links.user.js
Created July 11, 2016 22:30
Turn Github Branch names into links

Discovery Support Technical Specifications Group Charter

Introduction

Interoperable resources are only useful if they can be found. This has been well-recognized since the early days of the IIIF community, and more recently it has become clear that a concerted effort to standardize patterns that will facilitate discovery, harvesting and synchronization, indexing, and importing of IIIF resources is required.

This group will create specifications that improve the discovery process for IIIF resources, with a focus on leveraging existing techniques and tools, and promoting widespread adoption within the community. It will assist with and steer the implementation of community infrastructure, such as a registry of adopters, validators for the implementations, and transformation tools to generate the required data from existing systems and APIs.

If successful, the work will enable the collaborative development of global or thematic registries, search engines and portal applications that allow developers a

@itod
itod / split_keyboards.md
Last active November 14, 2024 19:07
Every "split" mechanical keyboard currently being sold that I know of
@jbaiter
jbaiter / dta_aligner.py
Last active September 28, 2017 13:51
Dependencies: `pip install click requests editdistance kraken lxml pillow-simd sickle`
from __future__ import division
import json
import logging
import os
import re
from collections import OrderedDict
from io import BytesIO
import click