Skip to content

Instantly share code, notes, and snippets.

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

Bruno Queiroz brunoqs

🏠
Working from home
View GitHub Profile
@brunoqs
brunoqs / gist:98a316919dffa4ff2c91da9ef02b9dab
Last active April 24, 2020 21:17
Mongodb Backup Restore
mongodump -h ip:port -d db -u user -p pass -o .
mongorestore -h ip -d db -u user -p pass jifcast/
query to csv:
mongoexport -h localhost -d jifcast -u jifcast -p jifcast -c episodes --type=csv --fields
name,_id,channel,downloadCount,likeCount,listenCount -q '{"likeCount": {"$exists": true }}' --out count.csv
create root user:
db.createUser(
@brunoqs
brunoqs / gist:219f5e9852b718d831bce502bdd2e511
Last active November 17, 2020 13:14
Easy deploy Django Nginx + gunicorn and Vuejs or Reactjs
---------------- Django Nginx + gunicorn ----------------
Primeiro rode o gunicorn no repositorio do projeto:
$ gunicorn --bind 0.0.0.0:8000 my_academic.wsgi &
Depois crie a seguinte configuração no Nginx (/etc/nginx/sites-available):
server {
access_log /home/user/code_back/logs/access.log;
error_log /home/user/code_back/logs/error.log;
@brunoqs
brunoqs / gist:cd060a927414504ad341c8cdffc1c24a
Last active July 3, 2019 01:18
Easy deploy Django Apache
-----------------------Debian Requirements------------------------
python3-dev, apache2, libapache2-mod-wsgi-py3
-------------------------------WSGI-------------------------------
import os
import time
import traceback
import signal
import sys