Skip to content

Instantly share code, notes, and snippets.

View languitar's full-sized avatar

Johannes Wienke languitar

View GitHub Profile
@languitar
languitar / set-tablet.sh
Created January 22, 2021 12:33
Script for fixing the aspect ratio of a wacom table using xsetwacom
#!/bin/bash
set -e
screen_width="$(xrandr | grep current | cut -d ' ' -f 8)"
screen_height="$(xrandr | grep current | cut -d ' ' -f 10 | cut -d , -f 1)"
dev_id="$(xsetwacom list | grep STYLUS | head -n 1 | sed -r 's/^.*id: ([0-9]*) *.*$/\1/')"
xsetwacom set "${dev_id}" ResetArea
@languitar
languitar / detex-languagetool.py
Last active June 16, 2020 17:55
custom latex stripping
#!/usr/bin/env python3
import os
import subprocess
import sys
dir_path = os.path.dirname(os.path.realpath(__file__))
subprocess.call('cat ' + sys.argv[-1] + ' | '
+ os.path.join(dir_path, 'detex.py') + ' | '
@languitar
languitar / PKGBUILD
Created December 23, 2019 13:29
Archlinux PKGBUILD for mopidy-spotify updated for mopidy 3
# Maintainer: Alexandre Petitjean <alpetitjean at gmail dot com>
pkgname=mopidy-spotify
pkgver=4.0.0
pkgrel=1
pkgdesc="Mopidy extension for playing music from Spotify"
arch=('any')
url="http://www.mopidy.com"
license=('APACHE')
depends=(
# Maintainer: Alexandre Petitjean <alpetitjean at gmail dot com>
pkgname=mopidy-somafm
pkgver=2.0.0rc1
pkgrel=1
pkgdesc="Mopidy extension for playing music from SomaFM"
arch=('any')
url="http://www.mopidy.com"
license=('APACHE')
depends=(
@languitar
languitar / PKGBUILD
Last active December 23, 2019 13:36
PKGBUILD for mopidy-musicbox on mopidy 3
# Maintainer: Scott Moak <scott dot moak at gmail dot com>
pkgname=mopidy-musicbox
_pypiname=Mopidy-MusicBox-Webclient
pkgver=3.0.1
pkgrel=1
pkgdesc="Web Client for Mopidy Music Server and the Pi MusicBox"
arch=('any')
url="https://github.com/woutervanwijk/Mopidy-MusicBox-Webclient"
license=('APACHE')
SCRIPT /usr/share/nvim/runtime/scripts.vim
Sourced 5 times
Total time: 0.001939
Self time: 0.001939
count total (s) self (s)
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2017 Nov 11
@languitar
languitar / interruptor.bash
Created September 19, 2018 09:06
Linux bridge issues
while true
do
echo "next"
ip link add vethtest0 type veth peer name vethtest1
brctl addif brtest vethtest0
sleep 2
brctl delif brtest vethtest0
ip link del vethtest0
sleep 1
done
!SESSION 2018-04-12 14:34:13.773 -----------------------------------------------
eclipse.buildId=unknown
java.version=10
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED
Command-line arguments: -data /home/languitar/src/aware.core/.. --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED
!ENTRY org.eclipse.core.resources 2 10035 2018-04-12 14:34:14.710
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
Name Value
ID 11
Description Blumen düngen
Status Recurring
Recurrence 2mo
Mask +XXXXX+X++X+++X++++++XX+++++++
Entered 2015-06-29 13:07:06 (2.8y)
Waiting until 2015-06-28 00:00:00
Due 2015-07-05 00:00:00
Last modified 2017-11-18 09:52:31 (4mo)
@languitar
languitar / violations_trigger.groovy
Created August 26, 2013 07:59
A trigger script for the jenkins (hudson) email_ext plugin which informs users in case their commits introduce new violations or warnings. In contrast to the limit options of various other plugins for code analysis reporting this does not fail the build.A simple but insecure way to share this script between different jobs is to execute the follo…
import jenkins.model.Jenkins
build = Jenkins.instance.items[0].builds[0]
println build
println("Available actions on the build: " + build.actions)
def analysisCoreActions = []
// All static analysis actions based on static analysis core can be handled uniformly
analysisCoreActions.addAll(build.actions.findAll{it.class.name =~ "hudson.plugins.checkstyle.CheckStyle.*ResultAction"})