Skip to content

Instantly share code, notes, and snippets.

@SammysHP
SammysHP / concat2opus.sh
Created December 30, 2015 20:05
Concatenate audio files into single opus file
#!/bin/bash
TMP=$(mktemp -d)
# syntax check
if [ -z "$3" ]; then
echo "Syntax: $0 <output>.opus <input1> <input2> ..."
exit 1
fi
@SammysHP
SammysHP / jump.sh
Last active June 25, 2017 13:55
Bookmarking tool for Bash
####################################################################################
#
# NAME
# jump - Bookmark system for Bash
#
# SYNOPSIS
# jump [OPTION]... [BOOKMARK]...
#
# DESCRIPTION
# Easily create bookmarks to the current working directory and jump to
#!/bin/bash
DATA=$(pdftotext -layout -x 200 -y 270 -W 300 -H 120 "$1" -)
NAME=$(echo "$DATA" | sed -n 1p)
MATRIKELNR=$(echo "$DATA" | sed -n 2p)
SEMESTER=$(echo "$DATA" | sed -n 7p | cut -d " " -f -2)
DATA=$(pdftotext -layout -x 200 -y 470 -W 200 -H 10 "$1" -)
FACH=$(echo "$DATA" | sed -n 1p)
echo "Name: $NAME"
#!/bin/bash
EXTENSION_RAW="ARW"
filelist=$(sxiv -o "$@")
if [[ -z $filelist ]]; then
exit
fi
@SammysHP
SammysHP / PKGBUILD
Created April 10, 2015 20:24
PKGBUILD for sxiv fork with color management support
# Maintainer: Sven Karsten Greiner <[email protected]>
# Contributor: Bartłomiej Piotrowski <[email protected]>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Bert Muennich <muennich at informatik.hu-berlin.de>
# Contributor: Brad Fanella <[email protected]>
_pkgname=sxiv
pkgname=${_pkgname}-cm-git
pkgver=r608.b64c2b4
pkgrel=1
#==== Main Options =============================================================
MCU = attiny13
F_CPU = 1200000
TARGET = main
#==== Compile Options ==========================================================
CFLAGS = -mmcu=$(MCU) -I.
#!/bin/bash
DATA=$(pdftotext -layout -x 200 -y 270 -W 300 -H 120 "$1" -)
NAME=$(echo "$DATA" | sed -n 1p)
MATRIKELNR=$(echo "$DATA" | sed -n 2p)
SEMESTER=$(echo "$DATA" | sed -n 7p | cut -d " " -f -2)
DATA=$(pdftotext -layout -x 200 -y 470 -W 200 -H 10 "$1" -)
FACH=$(echo "$DATA" | sed -n 1p)
echo "Name: $NAME"
@SammysHP
SammysHP / gist:e9015ab62ffcabddc2e8
Created November 13, 2014 18:41
qgis PKGBUILD: Use shallow clone
--- PKGBUILD.orig 2014-11-13 19:27:21.163524333 +0100
+++ PKGBUILD 2014-11-13 19:33:19.496732366 +0100
@@ -4,6 +4,7 @@
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
# Contributor: Gerardo Exequiel Pozzi <[email protected]>
# Contributor: Eric Forgeot < http://esclinux.tk >
+# Contributor: Sven Karsten Greiner <[email protected]>
# GRASS Plugin, Globe Plugin and QGIS Map Server are disabled in cmake by default.
# Uncomment them in the build() portion if you'd like enabled during the build.
@SammysHP
SammysHP / example.tex
Created November 7, 2014 21:28
TikZ Kellerautomat, Beispiel: http://i.imgur.com/UfTfXl9.png
\begin{tikzpicture}
\begin{scope}[start chain, node distance=-0.15mm]
\node [tmtapehend] (inputbegin) {};
\node [tmtape] {$a_1$};
\node [tmtape] {$a_2$};
\node [tmtape, minimum width=2\tmtapesize] {$\ldots$};
\node [tmtape] (inputcursor) {};
\node [tmtape, minimum width=2\tmtapesize] {$\ldots$};
\node [tmtapehend] (inputend) {};
\end{scope}
@SammysHP
SammysHP / Makefile
Created November 3, 2014 17:57
Simple makefile for LaTeX documents
BASENAME = skript
all: pdf
pdf:
latexmk -pdf $(BASENAME)
live:
latexmk -pdf -pvc $(BASENAME)