gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Greatest common divisor of 1 or more numbers. | |
from functools import reduce | |
def gcd(*numbers): | |
""" | |
Return the greatest common divisor of 1 or more integers | |
Examples | |
-------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A collection of python & shell integration attempts: | |
pysh:Write shell scripts in Python | |
https://github.com/yunabe/pysh | |
lshell:function limited shell | |
https://github.com/ghantoos/lshell | |
sh:similar to plumbum but has builtin features | |
https://github.com/amoffat/sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#test on python 3.4 ,python of lower version has different module organization. | |
import http.server | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
import socketserver | |
PORT = 8080 | |
Handler = http.server.SimpleHTTPRequestHandler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Our .tmux.conf file | |
# Setting the prefix from C-b to C-s | |
set -g prefix C-s | |
# enable vi keys. | |
setw -g mode-keys vi | |
# Free the original Ctrl-b prefix keybinding | |
unbind C-b | |
#setting the delay between prefix and command | |
set -sg escape-time 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cors) { | |
@cors_preflight method OPTIONS | |
header { | |
Access-Control-Allow-Origin "{header.origin}" | |
Vary Origin | |
Access-Control-Expose-Headers "Authorization" | |
Access-Control-Allow-Credentials "true" | |
} |