Skip to content

Instantly share code, notes, and snippets.

View phodal's full-sized avatar
🕶️
digging a new hole.

Fengda Huang phodal

🕶️
digging a new hole.
View GitHub Profile
@phodal
phodal / fabfile.py
Created October 20, 2016 01:15 — forked from fiee/fabfile.py
fabric fabfile.py for deployment of django apps on Debian servers
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too
location /api {
proxy_pass http://localhost:12306.cn
add_header 'Access-Control-Allow-Origin' '*' always;
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD';
add_header 'Access-Control-Allow-Headers' 'Authorization, X-Requested-With, Content-Type';
return 204;
{"sig":"cc73a20676dfab1553c458e243be09fec1ff2ee51faab8a011dfe6a700cfa32f03269162d43e74edda264cb873918a772e8e2e153a83c0070daf8e3fa5f62d4d0","msghash":"4da8777b6b1a63aad1057f2b1a81a9bc59b5f218d3bcaf5cc0d78b07cc32f66b"}
@phodal
phodal / install.sh
Created February 20, 2019 02:39
macOS Reinstall Shell Backup
#!/bin/bash
# erase-install
#
#
# WARNING. This is a self-destruct script. Do not try it out on your own device!
#
#
# Specifically, this script does the following:
# 1. Checks whether a valid existing macOS installer (>= 10.13.4) is already present in the `/Applications` folder