Skip to content

Instantly share code, notes, and snippets.

View RichardHladik's full-sized avatar

Richard Hladík RichardHladik

View GitHub Profile
@RichardHladik
RichardHladik / remotetex.sh
Last active March 30, 2021 13:14
Build a TeX file on a remote server
#!/bin/bash
set -e
REMOTE=gimli
CMD=pdfcsplain
trap_codes="0 1 2 3 13 15"
die() {
echo "$@"
exit 1
@RichardHladik
RichardHladik / sc.sh
Created February 26, 2018 17:34
CodeVita 2018 install script
setxkbmap cz
sudo apt-get install vim valgrind tmux
mkdir w
cat << EOD > .vimrc
set autoindent
set smartindent
set number
EOD
cat <<EOD >w/template.cpp
@RichardHladik
RichardHladik / batch_save.py
Created October 13, 2017 15:29
Batch layer export for GIMP
# -*- coding: utf8 -*-
#!/usr/bin/env python2
"""Exports every layer into a separate PNG, adds the same background to each
layer. Useful e.g. for creating flashcards with many things highlighted in one
image.
Installation: put into ~/.gimp-2.8/plug-ins (or similar)."""
from gimpfu import *
import gimp as g