Skip to content

Instantly share code, notes, and snippets.

View bittner's full-sized avatar
Python is my love affair

Peter Bittner bittner

Python is my love affair
View GitHub Profile
ViktorStiskala / .gitconfig
Created August 13, 2013 13:27
Pycharm as a default git difftool and git mergetool. Add the following to ~/.gitconfig
tool = pycharm
[difftool "pycharm"]
cmd = /usr/local/bin/pycharm diff "$LOCAL" "$REMOTE" && echo "Press enter to continue..." && read
tool = pycharm
keepBackup = false
[mergetool "pycharm"]
cmd = /usr/local/bin/pycharm merge "$LOCAL" "$REMOTE" "$BASE" "$MERGED"
cauethenorio /
Created February 13, 2013 20:56
Django snippet to make Django do not create URL language prefix for the main language (settings.LANGUAGE_CODE) Usage info in snippet docstring.
# coding: utf-8
Cauê Thenório - cauelt(at)
This snippet makes Django do not create URL languages prefix (i.e. /en/)
for the default language (settings.LANGUAGE_CODE).
It also provides a middleware that activates the language based only on the URL.
This middleware ignores user session data, cookie and 'Accept-Language' HTTP header.
mcbhenwood /
Created November 8, 2012 15:50
Simple Behave environment file to start Selenium webdriver
Hooking up Selenium to Behave.
For details, see:
import logging
from selenium import webdriver
bennylope / LICENSE
Last active August 17, 2023 10:44
Django file that loads environment variables from a .env file per Honcho/Foreman
Copyright the authors of Honcho and/or Ben Lopatin
Licensed for reuse, modification, and distribution under the terms of the MIT license