Skip to content

Instantly share code, notes, and snippets.

View votaguz's full-sized avatar

Jose Molina votaguz

  • Bogotá, Colombia
View GitHub Profile
@yosemitebandit
yosemitebandit / send_pdf_with_boto_ses.py
Created June 6, 2012 17:56
send PDF attachment with boto and SES
''' quick example showing how to attach a pdf to multipart messages
and then send them from SES via boto
'''
from email.mime.text import MIMEText
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
import boto
# The install script
# Adapted from https://gist.github.com/579814
echo '# Added by install script for node.js and npm in 30s' >> ~/.bashrc
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
echo 'export NODE_PATH=$HOME/local/lib/node_modules' >> ~/.bashrc
. ~/.bashrc
mkdir -p ~/local
mkdir -p ~/Downloads/node-latest-install
from django.shortcuts import redirect
from social_auth.middleware import SocialAuthExceptionMiddleware
from social_auth.exceptions import AuthAlreadyAssociated
class CustomSocialAuthExceptionMiddleware(SocialAuthExceptionMiddleware):
def get_redirect_uri(self, request, exception):
if isinstance(exception, AuthAlreadyAssociated):
# Redirect this error to a custom page where the situation is
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@spuk-
spuk- / pip-search-urllib2
Created April 24, 2014 14:16
Patch for making "pip search" use proxy set via *_proxy environment variables.
--- /usr/lib/python2.6/site-packages/pip/commands/search.py.orig 2014-04-24 10:31:14.551357257 -0300
+++ /usr/lib/python2.6/site-packages/pip/commands/search.py 2014-04-24 10:57:17.522362125 -0300
@@ -1,5 +1,6 @@
import sys
import textwrap
+import urllib2
import pip.download
@@ -12,6 +13,22 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQGiBErdpzYRBAD/RYL/4qrpBVkh60O0WT99evLRW+bCc61/rGwYNMFv/8HZFd+Z
ApKQeFVtI5Qmrdrhk6sNtntRO8C1Trchkezeg6pm3W7N9BO/Xxwq4gw3IfKIj2O4
TcE8ZUt24KOmeRBItD4G0VOujVNr/vBmtW+qeFDqm/o1LcK2rGtfMjpgVwCg7xbH
ceu5fmGV1hZ0qlnmAZz0er0D/jHdviQo0SEMlqYSGe1I5E0r/VuvovmDH2Qmly4m
1z3k+REFqGkuIqwMEhCKLT3rqAyfVrD8+xxBnW8TpRQDfJ7Sz76QyGfk9/R5tn0i
3j9z5cLzKwzGPiMffyIktZSrgdZ0DyuqL7I/GpYWCs6qEEsGw0czSTENUakevZjZ
ggsnBADVqcKPrZ51L7wIl5H/SNZ1db69BNKrq2ii1d6t5Vuf+y/AP0umtik5h+EQ