| gitflow | git |
|---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
| #!/usr/bin/env/python | |
| # | |
| # More of a reference of using jinaj2 without actual template files. | |
| # This is great for a simple output transformation to standard out. | |
| # | |
| # Of course you will need to "sudo pip install jinja2" first! | |
| # | |
| # I like to refer to the following to remember how to use jinja2 :) | |
| # http://jinja.pocoo.org/docs/templates/ | |
| # |
| from pprint import pprint | |
| import jinja2 | |
| import markdown | |
| HTML_TEMPLATE = """{% macro get_html() %} | |
| {{ content | markdown }} | |
| {% endmacro %} | |
| {% set html_content = get_html() %} | |
| Title from Markdown meta-data: {{ get_title() }} |
| # Must be run with lxml installed to process larger data sets. | |
| # By default looks for ./RawGPX.gpx as the input file and outputs to ./CleanedGPX.gpx. But of course one could change that easily... | |
| import gpxpy | |
| import gpxpy.gpx | |
| import re | |
| def get_furthest_point_above_speed(track, start_segment_no, start_point_no, speed, shortest_length=500): | |
| """ | |
| Starting from a given point on a track, finds the longest subsection of the track |
| from bs4 import BeautifulSoup,SoupStrainer | |
| import urllib.request | |
| import colorama,re,queue,threading | |
| from colorama import Fore | |
| from urllib.parse import * | |
| class check_link(): | |
| def __init__(self,address): | |
| self.address=address | |
| def check(self,address): |
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
| import os | |
| import yaml | |
| import logging.config | |
| import logging | |
| import coloredlogs | |
| def setup_logging(default_path='logging.yaml', default_level=logging.INFO, env_key='LOG_CFG'): | |
| """ | |
| | **@author:** Prathyush SP | |
| | Logging Setup |
This is based on https://github.com/codeforamerica/ohana-api/wiki/Installing-MongoDB-with-MacPorts-on-OS-X
the macports version of MongoDB does not come pre-configured and will not run after installing until you change some settings. The instructions linked above describe a way to fix this but they ignore the fact that many of the directories are already created and owned by the user "_mongo". It also runs the daemon as root rather than _mongo. Below is a modified approach that uses the _mongo user and avoids creating unnecessary directories.
- Install mongodb with
sudo port install mongodb(you probably want to start with asudo port selfupdate) - Create configuration directory with
sudo mkdir /opt/local/etc/mongodb/ - Create configuration file with
sudo pico /opt/local/etc/mongodb/mongod.conf
| # https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c | |
| [metadata] | |
| name = {name} | |
| version = file: {name}/_version.txt | |
| author = Martin Larralde | |
| author_email = [email protected] | |
| url = https://github.com/althonos/{name} | |
| description = {description} | |
| long_description = file: README.md |
| image: docker:latest | |
| services: | |
| - docker:dind | |
| stages: | |
| - build | |
| - integration | |
| - dev-release | |
| - prod-release |