Skip to content

Instantly share code, notes, and snippets.

View CalebMuhia's full-sized avatar

Muhia Njoroge CalebMuhia

  • Ovtygen Web Solutions
  • Nairobi
View GitHub Profile
##
# Creates an alias called "git hist" that outputs a nicely formatted git log.
# Usage is just like "git log"
# Examples:
# git hist
# git hist -5
# git hist <branch_name>
# git hist <tag_name> -10
##
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short"

Source

Vim Commands Cheat Sheet


How to Exit

:q[uit]

@CalebMuhia
CalebMuhia / models.py
Created August 30, 2012 12:33 — forked from mbrochh/models.py
Attach the django-shop cart to a User that started shopping anonymously
# add this soewhere where it gets loaded very early, i.e.
# your shop's models.py
from django.contrib.auth import login
from django.contrib.auth.signals import user_logged_in
from django.dispatch import receiver
from registration.signals import user_activated
from shop.models.defaults.cart import Cart