Skip to content

Instantly share code, notes, and snippets.

@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.
@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 / 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 / install_script.sh
Last active April 19, 2016 11:13
Install script for new Linux Mint
#!/bin/sh
# TODO: backup from existing installation
# TODO: backup host file
# TODO: hplib
# TODO: sass
# TODO: install sublime plugins
# TODO: install atom plugins
# TODO: install pycharm
@Neoklosch
Neoklosch / certypy.py
Last active August 29, 2015 14:15
This is a tool to create a apns certificate without passphrase. You need these kind of certificate for the django push server.
#!/usr/bin/env python
import subprocess, sys, os, getopt, os.path
'''
This is a tool to create a apns certificate without passphrase.
You need these kind of certificate for the django push server (https://github.com/jleclanche/django-push-notifications).
'''
def print_help():
print '''
@Neoklosch
Neoklosch / keybinder.py
Created July 15, 2015 15:31
Basic implementation of keybinding with python xlib
from Xlib.display import Display
from Xlib import X
class KeyBinder(object):
def __init__(self):
self.cancel = False
self.xdisp = Display()
self.xroot = self.xdisp.screen().root
self.key_code = 71 # F5
[{
"id": 1,
"name": "test 1",
"description": "meine description test 1",
"example": "test 1 example long long words"
},{
"id": 2,
"name": "test 2",
"description": "meine description test 2",
"example": "test 2 example long long words"
@Neoklosch
Neoklosch / checkstyle.xml
Last active November 13, 2015 17:14
Android Checkstyle Config
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<!-- See: http://checkstyle.sourceforge.net/config_sizes.html -->
<module name="FileLength">
<property name="max" value="500"/>
@Neoklosch
Neoklosch / crlfHelper.js
Last active December 3, 2015 13:59
Helps to convert line endings from one type to the other.
// Copyright (c) 2015 Markus Paeschke
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
#!/usr/bin/env python
import subprocess, time, json
import urllib2
def main():
print "Starting notifier..."
message = ["notify-send", "Deine Nummer Digga, geh los!"]
while True: