Skip to content

Instantly share code, notes, and snippets.

View fermayo's full-sized avatar

Fernando Mayo fermayo

View GitHub Profile
@fermayo
fermayo / ixgbevf-upgrade.sh
Last active August 29, 2015 14:25 — forked from vdm/ixgbevf-upgrade.sh
ixgbevf 2.16.1 upgrade for AWS EC2 SR-IOV "Enhanced Networking" on Ubuntu 14.04 (Trusty) LTS
#/bin/sh
# Run as root!
set -e
apt-get update -q
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enhanced-networking-ubuntu
DEBIAN_FRONTEND=noninteractive apt-get install -y dkms linux-headers-generic
wget "http://sourceforge.net/projects/e1000/files/ixgbevf stable/2.16.1/ixgbevf-2.16.1.tar.gz"
tar zvxf ixgbevf-2.16.1.tar.gz

Keybase proof

I hereby claim:

  • I am fermayo on github.
  • I am fermayo (https://keybase.io/fermayo) on keybase.
  • I have a public key whose fingerprint is 0B8B 21B9 B16D BE84 04C3 AB8D 66D5 CB05 666D AA4A

To claim this, I am signing this object:

@fermayo
fermayo / generate_docker_cert.sh
Last active August 29, 2015 14:01
Generate a key pair for Docker
#!/bin/sh
CERT_PATH="$HOME/.docker"
mkdir -p ${CERT_PATH}
if [ ! -f "$CERT_PATH/key.pem" ]; then
echo "Generating a new certificate in $CERT_PATH..."
openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -subj "/C=US/ST=NewYork/L=NYC/O=Tutum/CN=tutum.user" -keyout ${CERT_PATH}/key.pem -out ${CERT_PATH}/cert.pem >/dev/null 2>&1
echo "This is your new public certificate which you can add to your Tutum account:"
else
echo "WARNING: An existing certificate has been found in $CERT_PATH"
echo "This is your existing public certificate which you can add to your Tutum account:"
@fermayo
fermayo / gist:7442963
Created November 13, 2013 03:00
Extend django-registration to send HTML emails for activation
class HtmlRegistrationProfile(RegistrationProfile):
class Meta:
proxy = True
def send_activation_email(self, site):
"""Send the activation mail"""
from django.core.mail import EmailMultiAlternatives
from django.template.loader import render_to_string
ctx_dict = {'activation_key': self.activation_key,
'expiration_days': settings.ACCOUNT_ACTIVATION_DAYS,