This file contains hidden or 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
# image formats | |
*.ai filter=lfs diff=lfs merge=lfs -text | |
*.eps filter=lfs diff=lfs merge=lfs -text | |
*.gif filter=lfs diff=lfs merge=lfs -text | |
*.jpeg filter=lfs diff=lfs merge=lfs -text | |
*.jpg filter=lfs diff=lfs merge=lfs -text | |
*.pdf filter=lfs diff=lfs merge=lfs -text | |
*.png filter=lfs diff=lfs merge=lfs -text | |
*.psb filter=lfs diff=lfs merge=lfs -text | |
*.psd filter=lfs diff=lfs merge=lfs -text |
This file contains hidden or 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
def test_model_name_creation(self): | |
""" | |
Model should be created successfully | |
""" | |
now = timezone.now() | |
self.assertLess(self.model_name.created_at, now) | |
def test_model_name_str(self): | |
""" |
This file contains hidden or 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
[run] | |
# Just include your app's code | |
source = | |
myapp/ | |
omit = | |
*/migrations/* | |
[html] | |
directory = coverage_html |
This file contains hidden or 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.contenttypes.models import ContentType | |
# List of deleted apps | |
DEL_APPS = ["polls"] | |
# List of deleted models (that are not in the app deleted) In lowercase! | |
DEL_MODELS = ["question", "choice"] | |
ct = ContentType.objects.all().order_by("app_label", "model") | |
for c in ct: |
This file contains hidden or 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
sudo mkdir -p /vagrant/backup | |
echo "Backing up db..." | |
db_name=your_db_name | |
current_time=$(date "+%Y-%m-%d-%H%M%S") | |
filename=$db_name.$current_time | |
sudo mysqldump --add-drop-database -u root -p'root' $db_name > /vagrant/backup/$filename.sql | |
echo "Done." |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en-US"> | |
<meta charset="utf-8"> | |
<title>Redirecting…</title> | |
<link rel="canonical" href="http://www.example.com/"> | |
<meta http-equiv="refresh" content="0; url=http://www.example.com/"> | |
<h1>Whoop, you don't want to be here.</h1> | |
<p>Redirecting...</p> | |
<a href="http://www.example.com/">Click here if you are not redirected.</a> |
This file contains hidden or 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
find . -name Icon? -exec rm -f {} \; |
This file contains hidden or 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
. ~/git-prompt.sh | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
export PS1='\[\033[1m\W$(__git_ps1 " \033[0m\033[33m\](%s)") \[\033[1m\[\033[36m\]\$\[\033[0m ' |