Skip to content

Instantly share code, notes, and snippets.

View aboettger's full-sized avatar

Andreas Böttger aboettger

View GitHub Profile
diff --git a/layouts/vastone_glc.layout b/layouts/vastone_glc.layout
index bf1fc4f..527bc7b 100644
--- a/layouts/vastone_glc.layout
+++ b/layouts/vastone_glc.layout
@@ -1,7 +1,7 @@
[VastOne GLC]
Type=G+
Title = Gmusicbrowser playing %S by %a
-= Window(size=1120x820) FilterPane0(page=genre) FilterPane1(page=artist) FilterPane2(page=album,albumpsize=32,albuminfo=1) QueueList(cols=titleaa length) VPRight(size=230-353)
+= Window(size=1120x820) FilterPane0(page=genre) FilterPane1(page=artist) FilterPane2(page=album,albumpsize=32,albuminfo=1) QueueList(cols=titleaa length) VPRight(size=230-353)
@aboettger
aboettger / fetch_cover.pm
Created March 1, 2011 17:19
Jamendo support added
# Copyright (C) 2005-2008 Quentin Sculo <[email protected]>
#
# This file is part of Gmusicbrowser.
# Gmusicbrowser is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3, as
# published by the Free Software Foundation
=gmbplugin FETCHCOVER
name Picture finder
title Picture finder plugin
pdftk Modelleisenbahner\ -\ Autorengruppe\ -\ Modelleisenbahner\ \(Kopie\).pdf dump_data | awk '/InfoKey: Title/{getline; print}'
@aboettger
aboettger / add info pdf
Created June 15, 2014 16:18
add info to a pdf
exiftool -overwrite_original -Author="Autorengruppe – Modelleisenbahner" Modelleisenbahner\ -\ Autorengruppe\ -\ Modelleisenbahner\ \(Kopie\).pdf
@aboettger
aboettger / remove-no-break-space
Created July 1, 2014 17:41
Replace NO-BREAK SPACE with Space
pdftotext test.pdf test.txt; sed -i 's/\xA0/ /g' test.txt
@aboettger
aboettger / gist:6a86df1e2ffa09addbe2
Last active August 29, 2015 14:03
Lokomotivbaureihen im PDF finden
pdftotext "input.pdf" - | sed -e "s/\x{00A0}/ /g" | tr '\n' ' ' | sed -e "s/[[:space:]]\{2,\}/ /g" | grep -oaP "(die|Baureihe|VT|VB|E|V|BR|DB)[[:space:]]*[0-9]{2,3}[[:space:]]*[0-9]*" | sed -e "s/^ *//" | sed -e "s/ *$//" | sed -e "s/^Baureihe/BR/" | sed -e "s/^die/BR/" | sort -b | uniq | tr '\n' ','
@aboettger
aboettger / findbetween
Created January 9, 2015 10:27
find files between specific times
find . -newermt "2015-01-08 17:00:00" ! -newermt "2015-01-08 19:00:00"
@aboettger
aboettger / center_active_window
Created January 10, 2015 11:51
center active window
#!/bin/bash
IFS='x' read screenWidth screenHeight < <(xdpyinfo | grep dimensions | grep -o '[0-9x]*' | head -n1)
width=$(xdotool getactivewindow getwindowgeometry --shell | head -4 | tail -1 | sed 's/[^0-9]*//')
height=$(xdotool getactivewindow getwindowgeometry --shell | head -5 | tail -1 | sed 's/[^0-9]*//')
newPosX=$((screenWidth/2-width/2))
newPosY=$((screenHeight/2-height/2))
xdotool getactivewindow windowmove "$newPosX" "$newPosY"
@aboettger
aboettger / adjust_width_active_window
Created January 10, 2015 17:28
changes window width (75%)
#!/bin/bash
#screenWidth=$(xdpyinfo | grep dimensions | grep -o '[0-9]*' | head -n1)
#width=$(xdotool getactivewindow getwindowgeometry --shell | head -4 | tail -1 | sed 's/[^0-9]*//')
height=$(xdotool getactivewindow getwindowgeometry --shell | head -5 | tail -1 | sed 's/[^0-9]*//')
xdotool getactivewindow windowsize 75% "$height"
exit 0
@aboettger
aboettger / originInstalledPackages
Created September 8, 2015 10:46
get origin of an installed packages
LC_ALL=C dpkg-query --showformat='${Package}:${Status}\n' -W '*' \
| fgrep ':install ok installed' \
| cut -d: -f1 \
| (while read pkg; do
inst_version=$(apt-cache policy $pkg \
| fgrep Installed: \
| awk '{ print $2 }');
origin=$(apt-cache policy "$pkg" \
| fgrep " *** ${inst_version}" -C1 \
| tail -n 1 \