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
[Unit] | |
Description=Flower Celery Service | |
[Service] | |
User=admin | |
Group=www-data | |
WorkingDirectory=/home/sudipto/projects/project_name | |
ExecStart=/home/sudipto/venv/bin/celery -A proj flower --address=0.0.0.0 --port=5544 --loglevel=info | |
Restart=on-failure | |
Type=simple |
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 apt-get install python3 python-dev python3-dev \ | |
build-essential libssl-dev libffi-dev \ | |
libxml2-dev libxslt1-dev zlib1g-dev \ | |
python-pip | |
pip install mysqlclient |
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
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
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
# First, install all of the things | |
sudo su | |
apt-get update | |
apt-get install nginx | |
/etc/init.d/nginx start | |
sudo apt-get install python-dev | |
sudo apt-get install python-pip | |
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main" | |
sudo apt 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
Dynamic class Vue.js | |
div :class="['obj-' + obj.id]" style="float:right; color:red;" |
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
FB_INSTANT_TOKEN = 'The token' | |
FB_PAGE_ID = 'The fb page id' | |
class FBInstantArticle: | |
def __init__(self, slug, published=False, development_mode=False): | |
self.page_token = FB_INSTANT_TOKEN | |
self.page_id = FB_PAGE_ID | |
self.host = 'https://graph.facebook.com/' | |
klass = import_class('article.models.Article') | |
self.article = get_obj(klass, slug=slug) |
NewerOlder