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
# -*- coding: utf-8 -*- | |
class DictObj(object): | |
def load(self, **data): | |
self.__dict__.update(data) | |
@classmethod | |
def create(cls, **data): | |
s = cls() | |
s.load(**data) |
httpserver() | |
{ | |
local port="${1:-8000}" | |
sleep 1 && open "http://localhost:${port}/" & | |
# Set the default Content-Type to `text/plain` instead of `application/octet-stream` | |
# And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files) | |
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port" | |
} |
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo Error: please specify a file >&2 | |
exit 1 | |
fi | |
for f in $@; do | |
if [ ! -f "$f" ]; then | |
echo "Error: file '$f' does not exist" >&2 |
__return_value() | |
{ | |
ret=$? | |
if [[ "$ret" -ne "0" ]]; then | |
echo -e "\033[1;31m[Error: \033[0;31m$ret\033[1;31m]\033[00m " | |
fi | |
} |
[user] | |
name = Timo Furrer | |
email = [email protected] | |
[alias] | |
# generic | |
co = checkout | |
br = branch | |
ci = commit | |
st = status |
! 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 |
# -*- 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 |
" --------------------------------------- | |
" ---- The perfect vim configuration ---- | |
" --------------------------------------- | |
" be iMproved | |
set nocompatible | |
" required for vundle - will be set correctly after vundle settings | |
filetype off |
# -*- 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 |