Skip to content

Instantly share code, notes, and snippets.

Working from home

Julio Silveira Melo juliosmelo

Working from home
  • Blue earth
View GitHub Profile
juliosmelo /
Created Dec 5, 2016 — forked from jh00nbr/
Script simples para consulta de dados na base dados nacional do SUS utilizando o CPF.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests,json,sys
# Script simples para consulta de dados na base dados nacional do SUS utilizando o CPF.
# Jhonathan Davi A.K.A jh00nbr / Insightl4b
# Blog:
# Github:
# Twitter @jh00nbr
View MySQL size of tables in MB
SELECT table_name AS "Tables",
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
FROM information_schema.TABLES
WHERE table_schema = "t8_auth"
ORDER BY (data_length + index_length) DESC;'
View Kill sleep or slow query in mysql
# -*- coding: utf-8 -*-
import logging
import MySQLdb as mdb
from datetime import datetime
import sys
View Nginx cache for Wordpress
upstream backend{
# Defines backends.
# Extracting here makes it easier to load balance
# in the future. Needs to be specific IP as Plesk
# doesn't have Apache listening on localhost.
server; # IP goes here.
server {
View Brazil geoJSON
This file has been truncated, but you can view the full file.
"type": "FeatureCollection",
"features": [
View Nginx for wodpress
upstream fpm_example.com1{
server unix:/var/run/php5-fpm.sock;
server unix:/var/run/php5-fpm1.sock;
keepalive 128;
upstream admin {
server unix:/var/run/php5-fpm1.sock;
server unix:/var/run/php5-fpm2.sock;
keepalive 128;
juliosmelo / ubuntu-compass-ruby
Created Apr 16, 2016 — forked from stephanetimmermans/ubuntu-compass-ruby
Install Compass+Ruby on Ubuntu 14.04
View ubuntu-compass-ruby
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
juliosmelo / install-comodo-ssl-cert-for-nginx.rst
Created Oct 15, 2015 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

juliosmelo / apache2.conf
Created Sep 23, 2015
LogFormat for proxy with x-forward-for
View apache2.conf
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" proxy

Keybase proof

I hereby claim:

  • I am juliosmelo on github.
  • I am juliocsmelo ( on keybase.
  • I have a public key whose fingerprint is 2463 D5C4 826C 2B25 E9F8 8B40 0736 13C4 6A88 8C5F

To claim this, I am signing this object: