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
@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 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