Skip to content

Instantly share code, notes, and snippets.

View phuong's full-sized avatar
🏠
Working from home

Phuong phuong

🏠
Working from home
View GitHub Profile
@phuong
phuong / git-mv-with-history
Created September 3, 2021 02:31 — forked from emiller/git-mv-with-history
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@phuong
phuong / flask-uWSGI-nginx.md
Created July 17, 2018 09:27 — forked from pmav99/flask-uWSGI-nginx.md
How To Serve Flask Applications with uWSGI and Nginx on Ubuntu 14.04+

How To Serve Flask Applications with uWSGI and Nginx on Ubuntu 14.04

@credit Yan Zhu (https://github.com/nina-zhu)

Introduction

Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions, it can help you get your Python application or website off the ground. Flask includes a simplified development server for testing your code locally, but for anything even slightly production related, a more secure and powerful web server is required.

In this guide, we will demonstrate how to install and configure some components on Ubuntu 14.04 to support and serve Flask applications. We will configure the uWSGI application container server to interface with our applications. We will then set up Nginx to reverse proxy to uWSGI, giving us access to its security and performance features to serve our apps.

Prerequisites and Goals

@phuong
phuong / tox.ini
Created May 30, 2017 04:39 — forked from danverbraganza/tox.ini
My standard tox.ini file that allows you to run coverage, lettuce, nosetests and lint, and to pick out a given feature or a module for nosetest (So that you don't have to run the whole suite)
[tox]
envlist=py27,lint
[testenv]
downloadcache={homedir}/.pipcache
distribute=True
sitepackages=False
[testenv:py27]
deps=nose