/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git
from itertools import izip_longest | |
import random | |
def grouper(iterable, n, fillvalue=None): | |
"Collect data into fixed-length chunks or blocks" | |
# grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx | |
args = [iter(iterable)] * n | |
return izip_longest(fillvalue=fillvalue, *args) | |
def make_grid(rows, columns): |
from django.apps import apps | |
from django.contrib.contenttypes.management import update_contenttypes | |
def update_all_contenttypes(**kwargs): | |
for app_config in apps.get_app_configs(): | |
update_contenttypes(app_config, **kwargs) |
# You will lose any untracked files so a new checkout is probably wise | |
git checkout --orphan <branch_name> | |
git rm -rf . | |
git pull <other repo> | |
# clean up file structure. For example remove packaging metadata files | |
git merge master | |
git checkout master | |
git merge <branch_name> |
# You can see what the old version you have is by looking at | |
# /usr/local/var/postgres/PG_VERSION | |
brew services stop postgresql | |
cp -r /usr/local/var/postgres /usr/local/var/postgres_bak #backup db just in case | |
mv /usr/local/var/postgres /usr/local/var/postgres<OLD_VERSION> # move it form default location | |
initdb /usr/local/var/postgres -E utf8 # create new DB in default location | |
pg_upgrade \ | |
-b /usr/local/Cellar/postgresql/<OLD_VERSION>/bin/ \ | |
-B /usr/local/Cellar/postgresql/<NEW_VERSION>/bin/ \ |
# bash <(curl -s https://gist.github.com/drye/5387341/raw/ec72cddfe43ec3d39c91a3c118cb68ab14a049f8/enable_dnsmasq_on_osx.sh) | |
# ---------------------- | |
# installing dnsmasq and enable daemon | |
# ---------------------- | |
brew install dnsmasq | |
sudo brew services start dnsmasq | |
# ---------------------- | |
# adding resolver for DOMAIN domain | |
# ie. domain = *.local.example.com |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git
# This is a CODEOWNERS file | |
# see https://help.github.com/articles/about-codeowners/ for details | |
* @realuser | |
/requirements/ @ghost |
Story | Points |
---|---|
In order for other developers to utilize the API, implement Swagger/OpenAPI | 2 |
The CTO has requested we standardize our API documentation. Change the title of your swagger document to "Fool Commerce API." | 1 |
Add a new endpoint that allows searching for a customer by email address. | 1 |
BI has noticed some customers have purchased the product more than once. Setup the API to prevent customers from ordering a product they currently own. | 1 |
Add a way for to return all the products for a given "brand". | 1 |
Marketing has decided they want to track the type of payment used for each order. Record what type of payment method the customer used. (Credit Card, Apple Pay, Google Pay, etc.). | 2 |
As it stands, orders in the system cannot be cancelled. Add a way to keep track of the status of an order. The statuses of "Active" and "Cancelled" come to mind as a good start. | 2 |
FROM python:3.6 | |
RUN mkdir /app | |
ADD requirements.txt /app/ | |
WORKDIR /app/ | |
RUN pip install -r requirements.txt | |
CMD [ \ | |
"watchmedo", \ | |
"auto-restart", \ |