Skip to content

Instantly share code, notes, and snippets.

# Bash snippet to open new shells in most recently visited dir.
# Useful if you want to open a new terminal tab at the present
# tab's location.
#
# Put this in your .bashrc or whatever.
pathed_cd () {
if [ "$1" == "" ]; then
cd
else
/*
* Simple code snippet to apply a "* denotes required field" below the Django Admin page title, ex "Change [Model]"
* It also appends a "[field name]*" to all fields that are required.
* And finally it makes all the labels for required fields nice a red.
** Note: make sure to reference jquery in templates/admin/base_site.html <script type="text/javascript" src="{{ STATIC_URL }}js/jquery-latest.pack.js"></script>