django-admin startproject mysite
python manage.py migrate
| nohup python manage.py runserver 0.0.0.0:8000 & |
| export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[31m\]\$(parse_git_branch)\[\033[00m\]$\[\033[00m\] " | |
| export CLICOLOR=1 | |
| export LSCOLORS=ExFxBxDxCxegedabagacad | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } |
| def arrayCopy(src, srcPos, dest, destPos, length): | |
| for i in range(length): | |
| dest[i + destPos] = src[i + srcPos] |
| $('#FORM_ID').submit(function() { | |
| $.ajax({ | |
| data: $(this).serialize(), | |
| type: $(this).attr('method'), | |
| url: $(this).attr('action'), | |
| success: function(response) { | |
| console.log(response); | |
| } | |
| }); | |
| return false; |
| { | |
| "always_show_minimap_viewport": true, | |
| "draw_minimap_border": true, | |
| "draw_white_space": "all", | |
| "file_exclude_patterns": | |
| [ | |
| "*.log", | |
| "*.out", | |
| "*.pyc", | |
| ".gitignore", |
| WSGIPythonPath /var/www/domain.com/project | |
| <VirtualHost *:80> | |
| ServerAdmin webmaster@localhost | |
| ServerName domain.com | |
| ServerAlias www.domain.com | |
| DocumentRoot /var/www/domain.com/project/ | |
| WSGIScriptAlias / /var/www/domain.com/project/project/wsgi.py | |
| #WSGIPythonPath /var/www/domain.com/project |
| ps -ef | grep python | grep username |
| ordered_dict = sorted(dictionary.items(), key=lambda x:x[1], reverse=True) |
| sshfs -o no_readahead,noappledouble,nolocalcaches user@host:/home/user ~/mnt | |
| sshfs -o auto_cache,reconnect,defer_permissions,noappledouble user@host:/home/user ~/mnt |