Skip to content

Instantly share code, notes, and snippets.

View novoid's full-sized avatar

Karl Voit novoid

View GitHub Profile
@novoid
novoid / Org-mode_CCCamp15.org
Created August 15, 2015 10:31
CCCamp 2015: Emacs/Org-mode for Skeptic Geeks

CCCamp15: Emacs/Org-mode for Skeptic Geeks

Emacs setup for talk

# -*- mode: snippet -*-
# name: LaTeX KOMA scrlttr2
# key: tletter
# contributor: Karl Voit
# --
From/Name: ${1:Firstname~Lastname}
From/Street: ${2:My~Street~23}
From/Postal No.: ${3:1234}
From/City: ${4:Graz}
@novoid
novoid / vkregeneratebibtexreferences.sh
Created December 26, 2015 10:56
Re-generating reference file for Bibtex
#!/bin/bash
## this script parses *.aux files (LaTeX/bibtex temporary files) in
## the current directory, extracts cited references and re-generates
## a bibtex-file
RESULTFILE=newreferences.bib
handle_outputfile_found()
{
@novoid
novoid / vkregeneratebiblatexreferences.sh
Created December 26, 2015 10:58
Re-generating reference file for BibLatex
#!/bin/bash
## this script parses *.aux files (LaTeX/bibtex temporary files) in
## the current directory, extracts cited references and re-generates
## a biblatex-file
RESULTFILE=newreferences.bib
REFERENCESTMPFILE=`mktemp`
TMPFILE=`mktemp`
@novoid
novoid / guess-target-folder.sh
Last active March 4, 2024 13:11
Moving files to pre-defined standard directories according to their file name or file content
#!/bin/sh
FILENAME=$(basename $0)
DEBUG="true" ## if true, verbose debug output is activated
DEBUG="false"
ERRORFOLDER="unknown_destinations" ## if found as a sub-directory, all non-matching files are moved there
SIMULATE="true" ## if true, no files are moved
SIMULATE="false"
warn_and_exit()
{
@novoid
novoid / setup.py
Created October 8, 2018 12:42
setup.py for Memacs (brainstorming)
# from distutils.core import setup
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
# workaround from https://github.com/pypa/setuptools/issues/308 to avoid "normalizing" version "2018.01.09" to "2018.1.9":
import pkg_resources
@novoid
novoid / Org mode test.org
Created May 16, 2019 10:44
Org mode collaborative editing

This is a test file to play around with Org mode syntax based files and collaborative editing of them.

Feel free to modify this file.

This Is A Heading

This Is A Sub-Heading

And A Sub-Sub-Heading

Paragraphs are separated by at least one empty line.

@novoid
novoid / yankpad.org
Created November 15, 2019 13:31
Emacs yankpad template for adding a new contact

\** `(my-capture-prompt “First name” ‘my-firstname)` `(my-capture-prompt “Last name” ‘my-lastname)` :`(my-capture-insert ‘my-firstname)“(my-capture-insert ‘my-lastname)`:

@novoid
novoid / vkorgheadingstats.sh
Created May 2, 2020 09:08
A shell script that derives basic statistics on one or more Org mode files
#!/bin/sh
FILES="${@}"
USERTAG="@KarlVoit"
no_files_found()
{
echo "No files found. Please do give me some Org-mode files as parameter" >&2
exit 1
}
@novoid
novoid / vkbackup-system-config.sh
Created August 24, 2020 09:41
vkbackup-system-config.sh
#!/bin/sh
VERSION="Time-stamp: <2019-10-10 17:18:58 vk>"
## This script backups several things to a given target directory
## Initial tings to backup are taken from:
## https://www.debian.org/releases/stretch/amd64/release-notes/ch-upgrading.en.html
## -> "4.1.1. Back up any data or configuration information"
## «The main things you'll want to back up are the contents of /etc, /var/lib/dpkg, /var/lib/apt/extended_states and