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
# 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')
@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=(
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 <[email protected]>
" 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 / 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') + ' | '
RuntimeError: Cannot run the event loop while another loop is running
2017-11-08 14:53:01,610 ERROR:base_events:Exception in callback _SelectorSslTransport._read_ready()
handle: <Handle _SelectorSslTransport._read_ready()>
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/events.py", line 127, in _run
self._callback(*self._args)
File "/usr/lib/python3.6/asyncio/selector_events.py", line 975, in _read_ready
self._protocol.data_received(data)
File "/usr/lib/python3.6/site-packages/slixmpp/xmlstream/xmlstream.py", line 361, in data_received
self.parser.feed(data)