Code Review 的好处都有啥,谁说对了就给他
- 提高代码质量。
- 互相学习,增进友♂情。
- 帮助大家了解系统,万一跑路了,代码就没人能维护了。
- 避免一些东西被错误的使用,例如左神写了一个jquery的插件,结果被我用瞎了。
from collections import defaultdict | |
from django.db.models.signals import * | |
class DisableSignals(object): | |
def __init__(self, disabled_signals=None): | |
self.stashed_signals = defaultdict(list) | |
self.disabled_signals = disabled_signals or [ | |
pre_init, post_init, | |
pre_save, post_save, |
TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
Levenshtein, n-gram
pg_trgm
select similarity('yue mian ke ji', 'yu mian ke ji')
fuzzystrmatch
#! /usr/bin/env bash | |
if (( EUID != 0 )); then | |
echo “Please run this command with sudo” 1>&2 | |
exit 1 | |
fi |