Install CouchDB. This guide assumes 1.3.1. Set up an admin account.
Create the database required by NPM:
curl -X PUT http://admin:password@127.0.0.1:5984/registry
import cProfile | |
def profileit(func): | |
""" | |
Decorator (function wrapper) that profiles a single function | |
@profileit() | |
def func1(...) | |
# do something | |
pass |
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
Here's an example application that uses the pattern detailed below: https://github.com/tantastik/talent-curator
This document is an attempt to describe the first step of a large project structure with flask and some basic modules:
Please feel free to fix and add your own tips.
First we'll update your local master
branch. Go to your local project and check out the branch you want to merge into (your local master
branch)
$ git checkout master
Fetch the remote, bringing the branches and their commits from the remote repository.
You can use the -p
, --prune
option to delete any remote-tracking references that no longer exist in the remote. Commits to master
will be stored in a local branch, remotes/origin/master
.
PROJECT_NAME := $(shell python setup.py --name) | |
PROJECT_VERSION := $(shell python setup.py --version) | |
SHELL := /bin/bash | |
BOLD := \033[1m | |
DIM := \033[2m | |
RESET := \033[0m | |
.PHONY: all |
image: java:8-jdk | |
stages: | |
- build | |
- test | |
- deploy | |
before_script: | |
# - echo `pwd` # debug | |
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug |
@Entity | |
@Table(name = "things") | |
public class ThingEntity { | |
@Id | |
private Long id; | |
// Needed for use with Hibernate Spatial 4.x | |
// @Type(type = "org.hibernate.spatial.GeometryType") | |
private Geometry geometry; |
Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages