This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create user <user> with password '<password>'; | |
create database <database>; | |
grant all privileges on database <database> to <user>; | |
alter user <user> createdb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop schema public cascade; | |
create schema public; | |
alter schema public owner to <user>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getUrlParam( paramName ) { | |
var reParam = new RegExp( '(?:[\?&]|&)' + paramName + '=([^&]+)', 'i' ) ; | |
var match = window.location.search.match(reParam) ; | |
return ( match && match.length > 1 ) ? match[ 1 ] : null ; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
User.objects.create_user('<username>', '<email>', '<password>') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if not (reportlab.Version[0] == "2" and reportlab.Version[2] >= "1"): | |
raise ImportError("Reportlab Version 2.1+ is needed!") | |
REPORTLAB22 = (reportlab.Version[0] == "2" and reportlab.Version[2] >= "2") | |
if not (reportlab.Version[:3]>="2.1"): | |
raise ImportError("Reportlab Version 2.1+ is needed!") | |
REPORTLAB22 = (reportlab.Version[:3]>="2.1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install django-extensions | |
Then add django_extensions to your INSTALLED_APPS in settings.py. then from the console just type the following | |
python manage.py show_urls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
box-sizing: border-box; | |
} | |
*, *:before, *:after { | |
box-sizing: inherit; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -f -N -L <local port>:<remote addr>:<remote port> <remote ssh user>@<remote ssh addr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim ~/.bash_profile | |
# Set architecture flags | |
export ARCHFLAGS="-arch x86_64" | |
# Ensure user-installed binaries take precedence | |
export PATH=/usr/local/bin:$PATH | |
# Load .bashrc if it exists | |
test -f ~/.bashrc && source ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://python-docx.readthedocs.org/en/latest/#what-it-can-do | |
https://openpyxl.readthedocs.org/en/latest/ |
OlderNewer