I hereby claim:
- I am simoncoulton on github.
- I am simoncoulton (https://keybase.io/simoncoulton) on keybase.
- I have a public key ASB7opHs1xGEkAbw3a6mwYCyGYx5ksdlZEiuADEdHhnTRAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Ansi 0 Color</key> | |
| <dict> | |
| <key>Blue Component</key> | |
| <real>0.19607843137254902</real> | |
| <key>Green Component</key> | |
| <real>0.16078431372549021</real> |
| <!doctype html> | |
| <html> | |
| <head> | |
| <style> | |
| img,legend{border:0} | |
| legend,td,th{padding:0} | |
| html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;box-sizing:border-box} | |
| body{margin:0;text-rendering:optimizeLegibility} | |
| article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block} | |
| audio,canvas,progress,video{display:inline-block;vertical-align:baseline} |
| (function (con) { | |
| var method; | |
| var dummy = function() {}; | |
| var methods = ('assert,count,debug,dir,dirxml,error,exception,group,' + | |
| 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,' + | |
| 'time,timeEnd,trace,warn').split(','); | |
| while (method = methods.pop()) { | |
| con[method] = con[method] || dummy; | |
| } | |
| })(window.console = window.console || {}); |
| # pyvenv fails as ensurepip is not available, the following will resolve that issue. | |
| cd /tmp | |
| wget https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgz | |
| tar -xvzf Python-3.4.1.tgz | |
| sudo cp -a Python-3.4.1/Lib/ensurepip/ /usr/lib/python3.4 | |
| # Now you're free to create your virtualenv | |
| pyvenv-3.4 virtualenv_dir |
| countries = [ | |
| ('US', 'United States'), | |
| ('AF', 'Afghanistan'), | |
| ('AL', 'Albania'), | |
| ('DZ', 'Algeria'), | |
| ('AS', 'American Samoa'), | |
| ('AD', 'Andorra'), | |
| ('AO', 'Angola'), | |
| ('AI', 'Anguilla'), | |
| ('AQ', 'Antarctica'), |
| find . -type d -empty -exec touch {}/.gitkeep \; |
| use Zend\Filter\Digits as DigitsFilter; | |
| use Zend\Validator\AbstractValidator; | |
| class Abn extends AbstractValidator | |
| { | |
| const INVALID = 'invalidAbn'; | |
| const DIGITS = 'digitsOnly'; | |
| const INCORRECT_LENGTH = 'lengthMismatch'; | |
| protected static $digitsFilter = null; |
| ====================================== | |
| Setting up Nginx, uWSGI and Python3 | |
| ====================================== | |
| First off, I'm traditionally a PHP developer, but am looking at moving across to Python. I really struggled to find decent documentation on how to get a server up and running for deploying Python web applications from the point of view of someone coming from PHP. The main problems I came across with documentation were: | |
| 1) Only showed you how to run the server for a single web application. | |
| 2) Only showed you how to configure the app, not the server it was running on. | |
| My preferred workflow for development is by setting up a new VM in VMware Fusion and then forwarding through all requests to that VM via /etc/hosts. This might not be the optimal way to get things up and running, but it works for me. |