Skip to content

Instantly share code, notes, and snippets.

@Neoklosch
Neoklosch / toggleTouchpad.py
Created October 31, 2014 11:22
Toggle Touchpad on Linux Mint
#!/usr/bin/python
from subprocess import Popen, PIPE
import re
terminal_call = ['xinput', 'list']
regex_pattern = re.compile(r'.+TouchPad.+id=(\d+)')
sec_regex_pattern = re.compile(r'.*Device (Enabled|Disabled).+:\s(\d+)')
pp = Popen(terminal_call, stdout=PIPE)
@Neoklosch
Neoklosch / .bash_aliases
Last active January 17, 2019 17:32
Bash Aliases
# adb aliases
alias adb='/opt/android-sdk/platform-tools/./adb'
alias adb-start='adb start-server'
alias adb-stop='adb kill-server'
alias adb-restart='adb kill-server start-server'
adbfind() {
package=$(adb -d shell pm list packages | grep -wE "$1($|\s)" | sed "s/package://g");
pathtopackage=$(adb -d shell pm path $package | sed "s/package://g");
echo $pathtopackage;
@Neoklosch
Neoklosch / .bashrc
Last active May 9, 2017 08:35
Linux Mint Terminal Config
# System-wide .bashrc file for interactive bash(1) shells.
# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.