[ ] Check Out Flask Website: http://flask.pocoo.org [ ] Read Flask Docs: http://flask.pocoo.org/docs/ [ ] Read the Quickstart: http://flask.pocoo.org/docs/quickstart/ [ ] Write Flask Hello World [ ] Use Flask with SQLAlchemy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ec2-run-instances ami-2d4aa444 \ | |
--instance-type m1.small \ | |
--region us-east-1 \ | |
--key ${EC2_KEYPAIR_US_EAST_1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# rebundle.sh - Rebundles, uploads and registers an AMI. | |
# For blogpost: | |
# http://blog.crunch.io/user-managed-kernel-amis-from-existing-ubuntu | |
# Austin Godber <[email protected]> | |
if [ `id -u` != '0' -o "$AWS_USER_ID" == "" ]; then | |
echo "ERROR: You must run this with 'sudo -E' or as the root user" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# prep.sh - Prepares an Ubuntu AMI for Rebundling | |
# For blogpost: | |
# http://blog.crunch.io/user-managed-kernel-amis-from-existing-ubuntu | |
# Austin Godber <[email protected]> | |
if [ `id -u` != '0' ]; then | |
echo "ERROR: You must run this with 'sudo -E' or as the root user" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /tmp | |
wget -q http://gist.github.com/raw/481553/04b30b8a4ea2c9cb5b757844f48ba7fa02f03de8/prep.sh | |
sudo -E bash prep.sh | |
# scp your keys to the AMI as instructed by prep.sh | |
vi /mnt/tmp/environment # set you AWS credentials and paths | |
. /mnt/tmp/environment | |
sudo wget -q -O /boot/grub/menu.lst http://gist.github.com/raw/481560/6e70d54e1dc6ea43130916ed054cf56cd33cb97f/menu.lst | |
cd /mnt/tmp/ | |
wget -q http://gist.github.com/raw/481551/af5a315b59f9b7e4874880491d0cc6dc5f3c7b9c/rebundle.sh | |
vi rebundle.sh # set your bucket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'md5' | |
class Chargify::HooksController < ApplicationController | |
protect_from_forgery :except => :dispatch | |
before_filter :verify, :only => :dispatch | |
EVENTS = %w[ test signup_success signup_failure renewal_success renewal_failure payment_success payment_failure billing_date_change subscription_state_change subscription_product_change ].freeze | |
def dispatch | |
event = params[:event] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Simple numpy script to generate a simulated dark image showing hot pixels""" | |
import numpy as np | |
from scipy import ndimage, misc | |
import matplotlib.pyplot as plt | |
# generate the image of zeros | |
im = np.zeros((1024, 1280)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import * | |
from fabric.colors import green as _green, yellow as _yellow | |
import boto | |
import boto.ec2 | |
from config import * | |
import time | |
def create_server(): | |
""" | |
Creates EC2 Instance |
OlderNewer