The squeeky-clean way with homebrew and pip/virtualenv.
$ easy_install pip
$ pip install virtualenvwrapper mercurial
$ brew install gfortran && brew install pyqt
# Have a nice long coffee break -- compiling Qt took 67 minutes on my
| # Always sort the files | |
| --sort-files | |
| # Always color, even if piping to a another program | |
| --color | |
| # Use "less -r" as my pager | |
| --pager=less -r | |
| # File type search options |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| #!/bin/sh | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' |
| #!/bin/sh | |
| export HOMEBREW_CASK_OPTS="--appdir=/Applications" | |
| echo Install Homebrew, Postgres, wget and cask | |
| ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
| brew tap homebrew/dupes | |
| brew install wget | |
| brew install postgresql | |
| brew install mongodb | |
| brew install mongoose |
| grep . -RHn --include="tests.py" -e "MyTestCase" | |
| mvim some_django_app/tests.py +1329 |
| def register_new_account(request): | |
| result = TransactionForm.get_result(request) | |
| if result: | |
| if result.is_success: | |
| result = braintree.TransparentRedirect.confirm(request.META["QUERY_STRING"]) | |
| # TODO: store customer info in vault | |
| # TODO: create a subscription | |
| return redirect('cream_thank_you') | |
| elif result.errors: | |
| pass |
| from: | |
| http://personalpages.tds.net/~kent37/kk/00013.html | |
| class recursivedefaultdict(defaultdict): | |
| def __init__(self): | |
| self.default_factory = type(self) |
| from IPython.Shell import IPShellEmbed | |
| ipshell = IPShellEmbed() | |
| ipshell() |
| # Note: this is just for testing, and doesn't do stuff like set the amount or redirect if successful. | |
| # | |
| # This tidbit was created primarily to troubleshoot why I couldn't submit a form with validation errors | |
| # twice without being redirected to https://sandbox.braintreegateway.com/login | |
| # | |
| # Tested using Python 2.6.6, django 1.2.5, django-braintree 1.5, and braintree 1.8 | |
| def make_payment(request): | |
| result = TransactionForm.get_result(request) | |
| form = TransactionForm(result, redirect_url='http://127.0.0.1:8000/make_payment/') | |
| form.generate_tr_data() |
The squeeky-clean way with homebrew and pip/virtualenv.
$ easy_install pip
$ pip install virtualenvwrapper mercurial
$ brew install gfortran && brew install pyqt
# Have a nice long coffee break -- compiling Qt took 67 minutes on my