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
!! Appearance | |
urxvt.termName: rxvt-unicode | |
urxvt.scrollBar: false | |
urxvt.background: black | |
urxvt.foreground: gray | |
!! Font prefferenes | |
urxvt.font: xft:consolas:pixelsize=18,xft:FontAwesome:pixelsize=18 | |
urxvt.boldFont: xft:consolas:pixelsize=18:weight=bold,xft:FontAwesome:pixelsize=18:weight=bold | |
URxvt*italicFont: xft:consolas:pixelsize=18:weight=bold,xft:FontAwesome:pixelsize=18:weight=bold |
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
before_script: | |
- python -V | |
- make init | |
- cp test_project/settings.py.sample test_project/local_settings.py | |
- sed -i -e "s/SECRET_KEY = '.*'/SECRET_KEY = '_'/" test_project/local_settings.py | |
- make setup | |
variables: | |
CODECOV_TOKEN: '0707a6a4-2ac4-4440-a35d-e43c77fd57d2' | |
PIPENV_VENV_IN_PROJECT: 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
#!/bin/sh -e | |
# Take a screenshot | |
#scrot /tmp/screen_locked.png | |
# Pixellate it 10x | |
#mogrify -scale 10% -scale 1000% /tmp/screen_locked.png | |
# Lock screen displaying this image. | |
i3lock -i /usr/share/backgrounds/warty-final-ubuntu.png |
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
NAME=project | |
DJANGODIR=/home/user/project | |
SOCKFILE=/home/user/project/run/gunicorn.sock | |
USER=user | |
GROUP=www-data | |
NUM_WORKERS=3 | |
DJANGO_SETTINGS_MODULE=project.local_settings | |
DJANGO_WSGI_MODULE=project.wsgi | |
LOG_FILE=/home/user/project/logs/gunicorn.log | |
LOG_LEVEL=debug |
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
{ | |
"Paste Language Code Loader": { | |
"prefix": "language_settings_loader", | |
"body": [ | |
"{% get_current_language as LANGUAGE_CODE %}", | |
"" | |
], | |
"description": "Django Language Code Setting" | |
}, | |
"Paste All Language 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
sudo certbot certonly --standalone --preferred-challenges http -d [sundomain.domain.com || example.com] |
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 -u postgres psql | |
1. create database mydb; | |
2. create user myuser with encrypted password 'mypass'; | |
3. grant all privileges on database mydb to myuser; |
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
python3 manage.py dumpdata --natural-foreign --exclude auth.permission --exclude contenttypes --exclude admin.LogEntry --exclude sessions > db.json |
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
#!/usr/bin/env bash | |
# output text colors | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' | |
detect_current_connection(){ | |
result="$(ip route | grep 'default dev ppp' | awk '{print $3}')" | |
} |
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
#!/bin/sh | |
GREEN='\033[0;32m' | |
RED='\033[0;31m' | |
NC='\033[0m' | |
start_django(){ | |
echo -e "${GREEN}-----------Start Collecting Static Files.--------------${NC}" | |
python manage.py collectstatic --no-input | |
echo -e "\n${GREEN}-----------Done Collecting Static Files.---------------${NC}\n" |