git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# | |
# This script is an modification of the script below. | |
# | |
# | |
# examples/record_demo.py -- demonstrate record extension | |
# |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
flask |
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() |
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, |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
#!/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"))') |