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
#!/bin/bash | |
sudo apt-get update | |
# Now let's install all the required ubuntu packages | |
sudo apt-get install build-essential uwsgi nginx uwsgi-plugin-python python-pip | |
# PS! If you are doing this stuff for fun I do recommend to install nginx from PPA repository | |
# that you can find here https://launchpad.net/~nginx/+archive/development |
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
# by fcicq <[email protected]>, 2013.4.7, GPLv2 | |
# Tornado 3.0 is required. | |
from tornado.websocket import websocket_connect, WebSocketClientConnection | |
from tornado.ioloop import IOLoop | |
from datetime import timedelta | |
#echo_uri = 'ws://echo.websocket.org' | |
echo_uri = 'ws://ws.blockchain.info/inv' | |
PING_TIMEOUT = 15 | |
class myws(): |
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
import os | |
from flask import Flask, render_template, request | |
import stripe | |
stripe_keys = { | |
'secret_key': os.environ['SECRET_KEY'], | |
'publishable_key': os.environ['PUBLISHABLE_KEY'] | |
} | |
stripe.api_key = stripe_keys['secret_key'] |