Install Wagtail and Zappa, and create an empty site:
pip install wagtail zappa zappa-django-utils
pip install pip==9.0.3 # see https://github.com/Miserlou/Zappa/issues/1471
wagtail start foo
If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.
To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.
Clone some repo (you've probably already done this step)
git clone [email protected]
#!/bin/bash | |
# download and install latest geckodriver for linux or mac. | |
# required for selenium to drive a firefox browser. | |
install_dir="/usr/local/bin" | |
json=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest) | |
if [[ $(uname) == "Darwin" ]]; then | |
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos"))') | |
elif [[ $(uname) == "Linux" ]]; then | |
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux64"))') |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
To export SVG from Google Slides. | |
1. Open Slide deck. | |
2. View -> 100% | |
3. Click on every thumbnail from first to last, this puts the SVG into the DOM. | |
4. Paste the export.js in the console. | |
5. Make sure to allow multiple downloads. | |
6. All SVG should be in Downloads folder. | |
Cheers, |
import psycopg2.extras | |
import sqlalchemy.dialects.postgresql | |
from sqlalchemy.types import TypeEngine | |
from sqlalchemy.types import String | |
from sqlalchemy.types import TypeDecorator | |
import uuid | |
# Required for PostgreSQL to accept UUID type. | |
psycopg2.extras.register_uuid() |
flask |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!