Skip to content

Instantly share code, notes, and snippets.

@habernal
habernal / zotero-bug-report.txt
Last active January 4, 2024 16:45
zotero-bug-report
See screenshot below
@habernal
habernal / install-segoeui-fonts.sh
Last active May 25, 2024 13:27
Install MS Segoe UI fonts on Ubuntu
#!/bin/bash
# We install the fonts locally, not into /usr/share/fonts/truetype to avoid unnecessary sudo rights
DEST_DIR="${HOME}/.fonts/segoeui"
mkdir -p $DEST_DIR
# Download 15 *.ttf files
VARIANTS='segoeui segoeuib segoeuii segoeuiz segoeuil seguili segoeuisl seguisli seguisb seguisbi seguibl seguibli seguiemj seguisym seguihis'
for VARIANT in $VARIANTS; do
@habernal
habernal / tuda-template-install.sh
Last active July 27, 2022 12:00
Installing latest TU-Da templates
#!/bin/bash
# exit when any command fails
set -e
cd ~/texmf/tex/latex
ver="2.10"
# remove old installation if exists
rm -rf tuda-ci
@habernal
habernal / .screenrc
Last active February 13, 2017 14:05
screen config file
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "
startup_message off
@habernal
habernal / Replace characters with diacritics and remove non-ascii characters on Linux
Created July 18, 2016 19:27
Replace characters with diacritics and remove non-ascii characters on Linux
$ cat file.txt | iconv -f utf8 -t ascii//TRANSLIT | perl -p -e 's/[[:^ascii:]]//g'
@habernal
habernal / gist:268828961865d9264cb8e2bee6098d91
Created May 20, 2016 13:46
Convert Reuters-21578 from SGML to XML
required packages
opensp
xmllint
$ reuters21578/orig$ for i in *.sgm ; do osx $i | tr -dc '\11\12\15\40-\176' > temp.xml ; xmllint -format temp.xml > "$i".xml ; done
@habernal
habernal / pom.xml
Last active August 11, 2017 08:33
Minimal Java 1.7 + utf-8 + shade jar pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group-xxx</groupId>
<artifactId>artifact-xxx</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
@habernal
habernal / pom.xml
Last active January 20, 2016 19:06
Minimal Java 1.7 utf-8 Maven project pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group-xxx</groupId>
<artifactId>artifact-xxx</artifactId>
<version>1.0-SNAPSHOT</version>