Skip to content

Instantly share code, notes, and snippets.

droposhado /
Created Sep 12, 2016 — forked from zerocrates/
Python Trac ticket to Github issue importer for Issues API v3
#!/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 /
Created Apr 7, 2016 — forked from jalaziz/
Sentry upstart and nginx configs


  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 / 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
# 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 This must be done
View Python PyCrypto: Generate RSA Keys
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 / 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