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 urllib2 | |
from flask import Flask, redirect, request | |
from tbk.webpay.commerce import Commerce | |
from tbk.webpay.confirmation import Confirmation | |
from tbk.webpay.payment import Payment | |
app = Flask(__name__) | |
commerce = Commerce(testing=True) | |
server_ip = urllib2.urlopen('http://ip.42.pl/raw').read() |
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
function get_short_commit { | |
git log -n 1 --format=oneline --abbrev-commit 2> /dev/null | sed -e 's/\([0-9a-f]*\)\(.*\)/\1/' | |
} | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1 $(get_short_commit)]$(parse_git_dirty)/" | |
} |
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
To install node.js and coffee-script inside a virtualenv and keep it self-contained: | |
1. Activate the virtualenv:: | |
$ workon test | |
2. Move inside the virtualenv directory:: | |
(test)$ cdvirtualenv |