Restful API Mock 工具: JSONPlaceholder

最近闲逛的时候发现了这个工具, JSONPlaceholder.
它自带了一些数据, 比如说 posts, users 啊.
而且正如它的名字 placeholder, 在开发时一些还没定下的 POST/PUT/DELETE 接口也可以直接发过去.

另外还有一个项目My JSON Server, 可以将你的 JSON 数据放到 Github 上的一个仓库里, 然后就可以使用这个功能, 无需自己搭服务器.

红黑树

红黑树是一种自平衡二叉查找树, 它的特点是拥有良好的最坏情况的时间复杂度: O(log n). 因此 Java 的 HashMap 使用红黑树可以一定程度上避免 hash 碰撞攻击.

二叉树

二叉树是每个节点最多只有两个分支的树, 二叉树的分支具有左右次序,不能随意颠倒。

Translate "man iptables" (updating)

[toc]

强迫自己看 iptables 的文档. 翻的很烂, 自己明白就行.

Netfilter-packet-flow

Name

iptables - administration tool for IPv4 packet filtering and NAT iptables - IPv4 包过滤和 NAT 的管理工具

Synopsis 简介

1
2
3
4
5
6
7
8
9
iptables [-t table] -[AD] chain rule-specification [options]
iptables [-t table] -I chain [rulenum] rule-specification [options]
iptables [-t table] -R chain rulenum rule-specification [options]
iptables [-t table] -D chain rulenum [options]
iptables [-t table] -[LFZ][chain] [options]
iptables [-t table] -N chain
iptables [-t table] -X [chain]
iptables [-t table] -P chain target [options]
iptables [-t table] -E old-chain-name new-chain-name

Description 描述

Iptables is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel.
在 linux 内核中 iptable 被用来配置, 维护和检查 IP 包过滤规则表.

解决git-flow 在 zsh 下没有 completions

当初用 Homebrew 安装 git-flow 时遇到过。
网上流传的

1
2
brew remove git
brew install git --without-completions

已经不管用了,这个参数会被直接忽略掉。

解决方法:删除/usr/local/share/zsh/site-functions/_git