Skip to content

Instantly share code, notes, and snippets.

View coderdipto's full-sized avatar
🏠
Working from home

Sudipto Das coderdipto

🏠
Working from home
  • Dhaka, Bangladesh
View GitHub Profile
@coderdipto
coderdipto / shell
Last active January 19, 2022 16:57
Celery flower service
[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
@coderdipto
coderdipto / shell
Created December 8, 2019 08:07
Install mysqlclient
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
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"
# 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
Dynamic class Vue.js
div :class="['obj-' + obj.id]" style="float:right; color:red;"
@coderdipto
coderdipto / fia.py
Created August 16, 2018 16:05
Facebook instant article API
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)