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
agrs `ag -l search_string` | |
:argdo %s/cmd/command/ge | update |
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
pip install -e 'git+https://github.com/creimers/cmsplugin_seocheck.git#egg=cmsplugin_seocheck' |
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
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() | |
} |
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
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 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
# 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 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
alias ll='ls -la' | |
export VISUAL=vim | |
export EDITOR="$VISUAL" |
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
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 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
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 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
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 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 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 |