Skip to content

Instantly share code, notes, and snippets.

@David-Guillot
David-Guillot / send_html_email.py
Last active September 24, 2019 07:54
Python script to send HTML email from command line
# Simple script used to send an HTML file as an HTML formatted email,
# using any SMTP service. Used for testing HTML emails.
# The core message-sending code is taken from the docs:
# http://docs.python.org/2/library/email-examples.html
# The code for correctly authenticating against Gmail comes from:
# http://kutuma.blogspot.co.uk/2007/08/sending-emails-via-gmail-with-python.html
import smtplib
import argparse
from getpass import getpass
from email.mime.multipart import MIMEMultipart
@David-Guillot
David-Guillot / ipython_from_pdb.py
Last active May 7, 2019 09:14
Get an IPython shell from pdb
from IPython import embed; embed()
@David-Guillot
David-Guillot / schemacrawler.sh
Created March 2, 2017 08:42
Make the SchemaCrawler shell script work from any working directory
DIR=$(dirname $(readlink -f "$0"))
java -cp $(echo $DIR/lib/*.jar | tr ' ' ':'):config schemacrawler.Main "$@"