Skip to content

Instantly share code, notes, and snippets.

View flipsi's full-sized avatar

Philipp "Flipsi" Moers flipsi

View GitHub Profile
@flipsi
flipsi / Default (Linux).sublime-keymap
Created March 12, 2014 18:47
Sublime Text Key Bindings
[
///////////////////////////////
// Sublime-Text Key Bindings //
///////////////////////////////
// Author: Philipp Moers <soziflip funnycharacter gmail dot com>
///////////
// View //
@flipsi
flipsi / .vimperatorrc
Created March 13, 2014 00:11
Vimperator Configuration File
" This is a configuration file for Vimperator.
" Philipp Moers <soziflip funny character gmail dot com>
"""" SETTINGS """"
" open new tabs in background
set! browser.tabs.loadInBackground=false
@flipsi
flipsi / de_sflip
Created December 12, 2014 23:01
XKB Keyboad Layout
// based on a keyboard map from an 'xkb/symbols/de' file
// this file should be named de_sflip
// X keyboard layout mod by Philipp Moers <soziflip funny character gmail dot com>
// (i place this in /usr/share/X11/xkb/symbols/ and update /usr/share/X11/xkb/rules/xfree86.lst)
// change to this layout with 'setxkbmap -layout de_sflip basic'
default basic
@flipsi
flipsi / gist:eb0f1eb5e963233d5f38
Created May 21, 2015 11:51
Toggle Input Device Enabled (Like Touchpads)
#!/bin/bash
# Author: Philipp Moers <soziflip gmail com>
# This script disables an xinput device if it is enabled and vice versa
# adjust this to your needs
DEVICE="PS/2 Logitech Wheel Mouse"
# ---------------------------------------------------------------------
@flipsi
flipsi / variablesInURLFragment.html
Created November 5, 2015 23:36
JavaScript Variables in URL Fragment (without page reload)
<!DOCTYPE html>
<html>
<head>
<title>Persistent Javascript Values</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" charset="utf-8"></script>
<style type="text/css">
#box {
border-radius: 3px;
@flipsi
flipsi / tmux-session-coba.sh
Created November 11, 2015 07:41
Setup a tmux session (from inside another one)
#!/bin/bash
SESSION_NAME="coba"
SESSION_PATH="/Users/sflip/projects/commerzbank/coba/portal"
if (tmux has-session -t ${SESSION_NAME} 2>/dev/null);
then
echo "Session ${SESSION_NAME} exists."
else
@flipsi
flipsi / hamburgerMenu.html
Created December 9, 2015 16:26
Hamburger Menu with CSS
<!DOCTYPE html>
<html>
<head>
<title>We have a nice menu here</title>
<style type="text/css">
#menu {
content: "";
position: relative;
/*left: 0;*/
@flipsi
flipsi / getWifiInterface.py
Created December 21, 2015 23:51
Determine name of Wifi interface with Python
#!/usr/bin/python3
# -*- coding: utf-8 -*-
try:
from netifaces import interfaces
except ImportError:
print("The python package netifaces is required.")
print("You can install it from the PyPI with ``pip install netifaces''.")
exit(1)
@flipsi
flipsi / browser.html
Created December 22, 2015 00:13
Guess the browser with JavaScript
<!DOCTYPE html>
<html>
<head>
<title>browser</title>
</head>
<body>
<script type="text/javascript">
var nVer = navigator.appVersion;
@flipsi
flipsi / cwd.sh
Created April 15, 2016 10:51
Shellscripting: cd to path of script itself
#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo $CURRENT_DIR
cd $CURRENT_DIR
touch foobarbaz