I hereby claim:
- I am molszewski on github.
- I am molszewski (https://keybase.io/molszewski) on keybase.
- I have a public key whose fingerprint is 6B76 B083 CD51 AC01 9598 2EE8 8EFF 3760 5990 CD02
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| if [ -f ~/.git-completion.bash ]; then | |
| . ~/.git-completion.bash | |
| fi | |
| alias gco='git co' | |
| alias gci='git ci' | |
| alias grb='git rb' | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' |
| defaults write -g ApplePressAndHoldEnabled -bool false | |
| defaults write -g InitialKeyRepeat -int 18 | |
| defaults write -g KeyRepeat -int 0 | |
| defaults write com.apple.finder AppleShowAllFiles 1 |
| {% macro errors_for(field) -%} | |
| {% if not field.vars.valid %} | |
| <div class="alert alert-danger form-error" role="alert"> | |
| <ul class="list-unstyled"> | |
| {% for error in field.vars.errors %} | |
| <li>{{ error.message }}</li> | |
| {% endfor %} | |
| </ul> | |
| </div> | |
| {% endif %} |
| #!venv/bin/python | |
| # Requirements: | |
| # - virtualenv in venv dir (virtualenv venv) | |
| # - Flask: venv/bin/pip install flask | |
| # - formencode: venv/bin/pip install formencode | |
| # - FormEncode-Jinja2: venv/bin/pip install FormEncode-Jinja2 | |
| from flask import render_template_string, flash, redirect, request | |
| from formencode import Invalid, variabledecode, Schema, ForEach, NoDefault |
| @app.route("/claims/new-employment-end-date", methods=["POST"]) | |
| def new_employment_end_date(): | |
| def on_success(validated): | |
| draft_id = session.get('draft_id') | |
| day = validated['new_job_end']['day'] | |
| month = validated['new_job_end']['month'] | |
| year = validated['new_job_end']['year'] | |
| date = "{day}/{month}/{year}".format(**locals()) |
| #!venv/bin/python | |
| # Requirements: | |
| # - virtualenv in venv dir (virtualenv venv) | |
| # - Flask: venv/bin/pip install flask | |
| # - formencode: venv/bin/pip install formencode | |
| # - FormEncode-Jinja2: venv/bin/pip install FormEncode-Jinja2 | |
| from flask import render_template_string, flash, redirect, request | |
| from formencode import Invalid, variabledecode, Schema, All |
| #!venv/bin/python | |
| # Script requires: | |
| # - virtualenv in venv dir (virtualenv venv) | |
| # - XQuartz-2.7.5 (installed separately) | |
| # - cairo pango gdk-pixbuf libxmllibxslt libffi (brew install cairo pango gdk-pixbuf libxmllibxslt libffi) | |
| # - WeasyPrint (pip install WeasyPrint) | |
| from weasyprint import HTML |
| #!venv/bin/python | |
| # Script requires: | |
| # - virtualenv in venv dir (virtualenv venv) | |
| # - reportlab (pip install reportlab) | |
| from reportlab.pdfgen import canvas | |
| c = canvas.Canvas("report_lab_spike_output.pdf") | |
| c.drawString(10,600,"Hello World") |
| #!venv/bin/python | |
| # Script requires: | |
| # - virtualenv in venv dir (virtualenv venv) | |
| # - XQuartz-2.7.5 (MacOSX only, installed separately from https://xquartz.macosforge.org/landing/) | |
| # - cairo pango gdk-pixbuf libxmllibxslt libffi (brew install cairo pango gdk-pixbuf libxmllibxslt libffi) | |
| # - WeasyPrint (pip install WeasyPrint) | |
| # - Jinja2 (pip install Jinja2) | |
| from weasyprint import HTML |