Skip to content

Instantly share code, notes, and snippets.

Avatar
🐍
Python is my love affair

Peter Bittner bittner

🐍
Python is my love affair
View GitHub Profile
@ViktorStiskala
ViktorStiskala / .gitconfig
Created Aug 13, 2013
Pycharm as a default git difftool and git mergetool. Add the following to ~/.gitconfig
View .gitconfig
[diff]
tool = pycharm
[difftool "pycharm"]
cmd = /usr/local/bin/pycharm diff "$LOCAL" "$REMOTE" && echo "Press enter to continue..." && read
[merge]
tool = pycharm
keepBackup = false
[mergetool "pycharm"]
cmd = /usr/local/bin/pycharm merge "$LOCAL" "$REMOTE" "$BASE" "$MERGED"
@cauethenorio
cauethenorio / i18n_routing.py
Created Feb 13, 2013
Django snippet to make Django do not create URL language prefix for the main language (settings.LANGUAGE_CODE) Usage info in snippet docstring.
View i18n_routing.py
# coding: utf-8
"""
Cauê Thenório - cauelt(at)gmail.com
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
mcbhenwood / environment.py
Created Nov 8, 2012
Simple Behave environment file to start Selenium webdriver
View environment.py
"""
Hooking up Selenium to Behave.
For details, see:
http://pyuseful.wordpress.com/2012/11/08/running-cucumber-style-tests-in-django-using-behave/
"""
import logging
from selenium import webdriver
@bennylope
bennylope / LICENSE
Last active Aug 3, 2022
Django manage.py file that loads environment variables from a .env file per Honcho/Foreman
View LICENSE
Copyright the authors of Honcho and/or Ben Lopatin
Licensed for reuse, modification, and distribution under the terms of the MIT license