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
# Everyone needs a little color in their lives | |
RED='\[\033[31m\]' | |
GREEN='\[\033[01;32m\]' | |
YELLOW='\[\033[01;33m\]' | |
BLUE='\[\033[01;34m\]' | |
PURPLE='\[\033[35m\]' | |
CYAN='\[\033[36m\]' | |
WHITE='\[\033[37m\]' | |
NIL='\[\033[00m\]' |
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
CKEDITOR_SETTINGS = { | |
'language': '{{ de }}', | |
'toolbar_CMS': [ | |
['Undo', 'Redo'], | |
['cmsplugins', '-', 'ShowBlocks'], | |
['Format', 'Styles'], | |
'/', | |
[ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ], | |
[ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', ], | |
[ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ], |
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
sudo su - postgres | |
createdb mydb | |
createuser -P | |
psql | |
GRANT ALL PRIVILEGES ON DATABASE mydb TO myuser; | |
\q | |
su - appUser | |
postgres://username:password@localhost:5432/mydb | |
mysql://username:password@localhost:3306/mydb |
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
cordova build --release android | |
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore HelloWorld-release-unsigned.apk alias_name | |
/Users/christoph/Library/Android/sdk/build-tools/21.1.2/zipalign -v 4 platforms/android/ant-build/CordovaApp-release-unsigned.apk HPS-Teeküche.apk |
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
import os | |
from django.core.handlers.wsgi import WSGIHandler | |
import django | |
class WSGIEnvironment(WSGIHandler): | |
def __call__(self, environ, start_response): | |
os.environ['DATABASE_URL'] = environ['DATABASE_URL'] | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_app.settings") |
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'tpope/vim-fugitive' |
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
alias ll='ls -la' | |
export VISUAL=vim | |
export EDITOR="$VISUAL" |
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
# Root no ssh | |
echo "PermitRootLogin no" > /etc/ssh/sshd_config | |
# add user to sudo | |
sudo adduser <username> sudo | |
# ssh key | |
mkdir .ssh | |
ssh-keygen |
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
SetEnv DATABASE_URL mysql://db:db@localhost:3306/db | |
WSGIDaemonProcess djangocms python-path=/var/www/vhosts/project_folder/project:/var/www/vhosts/project_folder/project/env/lib/python3.4/site-packages | |
WSGIProcessGroup djangocms | |
WSGIScriptAlias / /var/www/vhosts/project_folder/project/marktzeit/wsgi.py | |
Alias /media/ /var/www/vhosts/project_folder/project/media/ | |
Alias /static/ /var/www/vhosts/project_folder/project/static/ |
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 'DATABASE_URL' not in os.environ: | |
os.environ['DATABASE_URL'] = 'sqlite:///'+ BASE_DIR + '/project.db' | |
import dj_database_url | |
DATABASES = { | |
'default': | |
dj_database_url.config() | |
} |
OlderNewer