Skip to content

Instantly share code, notes, and snippets.

View timofurrer's full-sized avatar
Commits are my own. Powered by coffee.

Timo Furrer timofurrer

Commits are my own. Powered by coffee.
View GitHub Profile
versions pytest-2.9.2, py-1.4.31, python-2.7.11.final.0
cwd=/home/tuxtimo/work/sure-issues/issue-74
args=['test_demo.py', '--junit-xml=junit_bad.xml', '--debug', '-v']
pytest_cmdline_main [hook]
config: <_pytest.config.Config object at 0x7f40a77a5f50>
pytest_plugin_registered [hook]
manager: <_pytest.config.PytestPluginManager object at 0x7f40a77a56d0>
plugin: <Session 'issue-74'>
finish pytest_plugin_registered --> [] [hook]
@timofurrer
timofurrer / .zshrc
Created March 7, 2016 17:17
zsh with not working bindkey for autosuggestions
# Path to your oh-my-zsh installation.
export ZSH=$HOME.oh-my-zsh
ZSH_THEME="tuxtimo"
# use 256 colors
export TERM="xterm-256color"
# Uncomment the following line to use case-sensitive completion.
CASE_SENSITIVE="true"
@timofurrer
timofurrer / .zshrc
Last active February 9, 2016 23:52
.zshrc
# Path to your oh-my-zsh installation.
#export ZSH=/home/users/furrert/.oh-my-zsh
export ZSH=$HOME/.oh-my-zsh
export TERM="xterm-256color"
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="gallois"
@timofurrer
timofurrer / localStorage.js
Created September 22, 2015 05:51
AngularJS localStorage service
(function(module) {
var localStorage = function($window) {
var storage = $window.localStorage;
var set = function(key, value) {
storage.setItem(key, angular.toJson(value));
};
var get = function(key) {
var value = storage.getItem(key);
# Path to your oh-my-zsh installation.
#export ZSH=/home/users/furrert/.oh-my-zsh
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="gallois"
#ZSH_THEME="flazz"
@timofurrer
timofurrer / gist:24aedd54ed55452462df
Last active August 29, 2015 14:10
debian: install vim from testing when using stable

debian: install vim from testing when using stable

Add the following line to /etc/apt/sources.list:

deb http://ftp.ch.debian.org/debian testing main

Or execute the following command (as superuser):

echo "deb http://ftp.ch.debian.org/debian testing main" >> /etc/apt/sources.list
@timofurrer
timofurrer / getipinfo.py
Created February 21, 2014 07:58
Python get IP Address information
# -*- coding: utf-8 -*-
from sys import argv, stderr, exit
from geoip import geolite2
IP_PROVIDER = "http://httpbin.org/ip"
comma_sep = lambda x: ", ".join([str(y) for y in x])
if not argv[1:]:
from urllib2 import urlopen
" ---------------------------------------
" ---- The perfect vim configuration ----
" ---------------------------------------
" be iMproved
set nocompatible
" required for vundle - will be set correctly after vundle settings
filetype off
# -*- coding: utf-8 -*-
from types import FunctionType
def copy_func(f, name=None):
return FunctionType(f.func_code, f.func_globals, name or f.func_name, f.func_defaults, f.func_closure)
class Foo(object):
def method(self, arg):
self.value = arg
! tuxtimo's keyboard configuration
! Keyboard: Apple, Inc. Hub in Aluminum Keyboard
! swap Alt and Cmd keys.
keycode 37 = Control_L
!keycode 49 = less greater less greater backslash brokenbar bar
keycode 133 = Alt_L Meta_L
keycode 64 = Super_L
keycode 108 = Super_R
keycode 134 = ISO_Level3_Shift Multi_key