Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
// Add a 401 response interceptor | |
window.axios.interceptors.response.use(function (response) { | |
return response; | |
}, function (error) { | |
if (401 === error.response.status) { | |
swal({ | |
title: "Session Expired", | |
text: "Your session has expired. Would you like to be redirected to the login page?", | |
type: "warning", | |
showCancelButton: true, |
#!/bin/bash | |
sudo apt-get install vnc4server ubuntu-desktop | |
sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal |
#!/bin/bash | |
# NB: First install nscd with sudo apt-get install nscd | |
# run this command to flush dns cache: | |
sudo /etc/init.d/dns-clean restart | |
# or use: | |
sudo /etc/init.d/networking force-reload | |
# Flush nscd dns cache: | |
sudo /etc/init.d/nscd restart |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
#!/bin/bash | |
if [[ ! $3 ]] | |
then | |
echo "Usage ./rproxy.sh name ip port" | |
exit 1 | |
fi | |
if [[ -f /etc/nginx/sites-enabled/$1 ]] | |
then |
(require 'cl-lib) | |
(defun personal-identity-last-bit (n) | |
;; 1. S = sum(item(i) * weight(i)) | |
;; 2. Y = mod(S, 11) | |
;; 3. M = map(Y, r) | |
(let ((bits (mapcar 'string-to-number | |
(mapcar 'char-to-string n))) | |
(weights '(7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4 2)) | |
(map-result '(1 0 "X" 9 8 7 6 5 4 3 2))) |
阐述最清楚的两篇是两篇中文的:
网路启动服务器安装和配置方法(pxe+tftp+dhcpd)
ubuntu的官方文档比较久了,步骤也很繁琐,不推荐。
from subprocess import Popen, PIPE | |
from os import environ | |
def source(script, update=True, clean=True): | |
""" | |
Source variables from a shell script | |
import them in the environment (if update==True) | |
and report only the script variables (if clean==True) | |
""" |
# dot.py | |
"Require Python 2.3 (or 2.2. with from __future__ import generators)" | |
def dotcode(cls): | |
setup='node [color=Green,fontcolor=Blue,fontname=Courier]\n' | |
name='hierarchy_of_%s' % cls.__name__ | |
code='\n'.join(codegenerator(cls)) | |
return "digraph %s{\n\n%s\n%s\n}" % (name, setup, code) |