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
# add this three line to i3 config file | |
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.i3/sound_script.sh incr #increase sound volume | |
bindsym XF86AudioLowerVolume exec --no-startup-id ~/.i3/sound_script.sh decr #decrease sound volume | |
bindsym XF86AudioMute exec --no-startup-id ~/.i3/sound_script.sh # mute sound |
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 | |
browser=${BROWSER:-google-chrome-stable} | |
pgrep -x dmenu && exit | |
choice=$(echo "" | dmenu -i -p "Search Google:") || exit 1 | |
if [ "$choice" = "" ]; then | |
$browser "https://google.com" | |
else |
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
# add this line to i3 config file | |
# change us,ir based on your language layout | |
exec --no-startup-id "setxkbmap -layout us,ir -option 'grp:ctrl_alt_toggle'" |
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
#install network-manager-applet with your package manager | |
exec_always --no-startup-id exec nm-applet etc |
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
[isort] | |
include_trailing_comma=True | |
line_length = 79 | |
skip=.git,migrations,__pycache__,settings.py,wsgi.py,test_project,__init__.py,tests | |
[flake8] | |
max-line-length = 79 | |
exclude=.git,migrations,__pycache__,settings.py,wsgi.py,test_project,__init__.py,tests | |
max-complexity=10 |
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/bash | |
python3 setup.py sdist bdist_wheel | |
twine upload dist/* --verbose | |
read -p "Delete build/ and dist/ [y/n/n]: " answer | |
if [ "$answer" = "y" ] | |
then | |
rm -d -r build/ dist/ | |
fi |
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
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, unicode_literals | |
import os | |
from setuptools import find_packages, setup | |
version = __import__('package').__version__ | |
here = os.path.abspath(os.path.dirname(__file__)) |
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/bash | |
NAME="django_project" # Name of the application | |
DJANGODIR=/var/www/django_project # Django project directory | |
SOCKFILE=/var/www/django_env/run/gunicorn.sock # we will communicte using this unix socket | |
USER=root # the user to run as | |
GROUP=root # the group to run as | |
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
DJANGO_SETTINGS_MODULE=django_project.settings # which settings file should Django use | |
DJANGO_WSGI_MODULE=django_project.wsgi # WSGI module name |
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
[program:django_project] | |
command = /var/www/django_project/gunicorn_start.sh ; Command to start app | |
user = ubuntu ; User to run as | |
stdout_logfile = /var/www/logs/gunicorn_supervisor.log ; Where to write log messages | |
redirect_stderr = true ; Save stderr in the same log | |
environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8 ; Set UTF-8 as default encoding |
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
1: sudo apt-get install bind9 dnsutils -y | |
2: cd /etc/bind/ | |
3: mkdir zones | |
4: cp db.local zones/your_domain_name.com | |
5: nano named.conf.default-zones |
OlderNewer