Skip to content

Instantly share code, notes, and snippets.

Avatar

Flaverton Rodrigues Rosa droposhado

View GitHub Profile
@droposhado
droposhado / trac-to-github.py
Created Sep 12, 2016 — forked from zerocrates/trac-to-github.py
Python Trac ticket to Github issue importer for Issues API v3
View trac-to-github.py
#!/usr/bin/env python
#be lazy about unicode
import sys; reload(sys); sys.setdefaultencoding('utf-8');
import sqlite3
import urllib2
import json
import base64
import re
View gist:6c0473f3dca042b6551009bf19776ed8
### Keybase proof
I hereby claim:
* I am flavertonrr on github.
* I am flavertonrr (https://keybase.io/flavertonrr) on keybase.
* I have a public key whose fingerprint is CADC 81CF B39E 1967 E191 9064 C8B5 0305 5444 13B4
To claim this, I am signing this object:
@droposhado
droposhado / README.md
Created Apr 7, 2016 — forked from jalaziz/README.md
Sentry upstart and nginx configs
View README.md

Setup

  1. Create a new user on the system:

    sudo adduser --system --group --shell /bin/bash --home /opt/sentry sentry
  2. Create the virualenv and install the required packages:

@droposhado
droposhado / django-fastcgi
Created Apr 5, 2016 — forked from guerrerocarlos/django-fastcgi
init.d script for easy Django instances start,stop,restart. to INSTALL: just copy in /etc/init.d and run 'update-rc.d django-fastcgi defaults'
View django-fastcgi
#! /bin/sh
### BEGIN INIT INFO
# Provides: FastCGI servers for Django
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: Start FastCGI servers with Django.
# Description: Django, in order to operate with FastCGI, must be started
# in a very specific way with manage.py. This must be done
View gist:a12aca9ebd8de59d8316ffb385753908
Olá,
Meu nome é Flaverton e estou portando um tema para o Mezzanine, este trabalho é uma ONG e o
Mezzanine foi o que atendeu as necessidades de gerenciamento de conteúdo que eles precisam para o site.
Como tenho trabalhado bastante com Python nos últimos meses também é uma boa forma de poder ajudar com
manutenção no site caso precisem.
O tema que estou portando de html para o Mezzanine apresenta 2 problemas, um deles é o que venho relatar aqui
e pedir a ajuda de vocês.
A ideia é ter uma single page, onde no final da página havera um formulário que enviará os dados via AJAX,
@droposhado
droposhado / index.html
Last active Apr 2, 2016
Happy theme for Mezzanine
View index.html
{% extends "base.html" %}
{% block meta_title %}{% endblock %}
{% block title %}Welcome!{% endblock %}
{% block main %}
<!-- Contact Section -->
<section id="contact">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
@droposhado
droposhado / urls.py
Last active Apr 2, 2016
Mezzanine URLs file
View urls.py
import happy
...
urlpatterns += [
...
url(r'^happy/$', include('happy.urls')),
...
]
View Python PyCrypto: Generate RSA Keys Example.py
def generate_RSA(bits=2048):
'''
Generate an RSA keypair with an exponent of 65537 in PEM format
param: bits The key length in bits
Return private key and public key
'''
from Crypto.PublicKey import RSA
new_key = RSA.generate(bits, e=65537)
public_key = new_key.publickey().exportKey("PEM")
private_key = new_key.exportKey("PEM")
@droposhado
droposhado / pseudocode.txt
Created Aug 31, 2012
Example Pseudo-Code
View pseudocode.txt
variable a
variable b
input: "This is a test"
a = 1
b = 100
do while a < b
if a == 50 then