Skip to content

Instantly share code, notes, and snippets.

Avatar
🐺

Tino Didriksen TinoDidriksen

🐺
View GitHub Profile
@TinoDidriksen
TinoDidriksen / 01-msys.sh
Created Oct 5, 2021
MSYS2 CMake + Boost Program Options
View 01-msys.sh
$ pacman -S cmake make mingw-w64-x86_64-gcc mingw-w64-x86_64-boost
View php-remove-closing.sh
grep -rl '<?php' * | xargs -r grep -rl '?>' | xargs -rn1 php -r '$f=file_get_contents($argv[1]); if (preg_match("~[?]>[\s\n]*$~", $f)) { $f = trim(preg_replace("~[?]>[\s\n]*$~", "", $f))."\n"; file_put_contents($argv[1], $f); }' --
View 01-input.txt
<word>En</word>
"<en>"
"en" det mask ent kvant
"en" adv
"en" pron ent pers hum
"ene" verb imp
<word>serbisk</word>
"<serbisk>"
"serbisk" adj ub m/f ent pos
"serbisk" adj nøyt ub ent pos
View text-nodes.js
// Upper-case because we compare them to DOM nodeName
let text_nodes = {'ADDRESS': true, 'ARTICLE': true, 'ASIDE': true, 'AUDIO': true, 'BLOCKQUOTE': true, 'BODY': true, 'CANVAS': true, 'DD': true, 'DIV': true, 'DL': true, 'FIELDSET': true, 'FIGCAPTION': true, 'FIGURE': true, 'FOOTER': true, 'FORM': true, 'H1': true, 'H2': true, 'H3': true, 'H4': true, 'H5': true, 'H6': true, 'HEADER': true, 'HGROUP': true, 'HTML': true, 'HR': true, 'LI': true, 'MAIN': true, 'NAV': true, 'NOSCRIPT': true, 'OL': true, 'OUTPUT': true, 'P': true, 'PRE': true, 'SECTION': true, 'TABLE': true, 'TD': true, 'TH': true, 'UL': true, 'VIDEO': true};
function findTextNodes(nodes, filter) {
let tns = [], wsx = /\S/;
if (!$.isArray(nodes)) {
nodes = [nodes];
}
View 01-freenode.txt
-NickServ- Information on TinoDidriksen
-NickServ- Registered : Mar 21 17:25:41 2009
-ChanServ- Information on #apertium
-ChanServ- Founder : spectei
-ChanServ- Registered : Jan 09 18:28:40 2007
-ChanServ- Information on #hfst
-ChanServ- Founder : spectei, Nikerabbit
-ChanServ- Registered : Oct 07 11:15:41 2010
View uni-to-text.pl
#!/usr/bin/env perl
# -*- mode: cperl; indent-tabs-mode: nil; tab-width: 3; cperl-indent-level: 3; -*-
use warnings;
use strict;
use utf8;
BEGIN {
$| = 1;
binmode(STDIN, ':encoding(UTF-8)');
binmode(STDOUT, ':encoding(UTF-8)');
@TinoDidriksen
TinoDidriksen / Dockerfile
Last active May 10, 2021
giella-sma-linux
View Dockerfile
FROM amd64/debian:sid
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
# Upgrade everything and install base builder dependencies
RUN apt-get -qy update && apt-get -qfy --no-install-recommends install apt-utils
RUN apt-get -qy update && apt-get -qfy --no-install-recommends dist-upgrade
RUN apt-get -qy update && apt-get -qfy --no-install-recommends install build-essential fakeroot time libgoogle-perftools-dev
# OS dependencies
View mxe-conf.cmake
# Contents of /opt/mxe/usr/x86_64-w64-mingw32.shared/share/cmake/mxe-conf.cmake
# This file is part of MXE. See LICENSE.md for licensing information.
# https://cmake.org/cmake/help/latest
# Can't set `cmake_minimum_required` or `cmake_policy` in toolchain
# since toolchain is read before CMakeLists.txt
# See `target-cmake.in` for CMAKE_POLICY_DEFAULT_CMPNNNN
View test-crk.sh
#!/bin/bash
P=$PATH
# Unset all envvars
for e in $(env | awk -F"=" '{print $1}') ; do
unset $e ; done
export PATH=$P
export TMPDIR=/tmp
@TinoDidriksen
TinoDidriksen / id_rsa.pub
Created Apr 12, 2019
Tino's RSA 4096 bit public key
View id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvGE+brgZEcXBjMzFxlMvfzXquB7pxcRG2jCfiBcTtA8ItXUiHigiWhqkj4doxZcPpA7eGv9Se3ULl15fEGboA6fmRTXCboBYSIDE0B/eYkHUsbZKAPcW2NGaPuDiUkaq/wYWgWz9Q4sm8rJNWBUiBLFhwgYnprhiVcNYTqFvcDRq+zE4S4jAD3OCf2MtBA3wt8uV1za2AB3POyaFO/4o+tI8zmA94200zwEJjq2k5v5jTjCR5imKXdPhOnAwXUWVyvwO+urd6mt+ouSZiuxDhS6qnbWqIpfRt4tchgWowCEGFNph25GKIZHr2WEO9OR30HF7n86DP0aor1PeMIL+hQ== Tino@LGR700