红黑树

红黑树是一种自平衡二叉查找树, 它的特点是拥有良好的最坏情况的时间复杂度: 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

生活近况

来杭州差不多快一个月了,差不多也安顿下来了。

稍微还有一点水土不服,公司事情不多,现在差不多 963 + 992。

以后得更起来了,学校留下小尾巴的项目也得做起来了。

使用OpenVPN建立4to6隧道

背景

与朋友聊天时聊到了这个事情,然后根据他发给我的V2上的一个帖子小小操作了一下。

需要

一台有IPv6的机器,只需一个IPv6地址即可; OpenVPN;

操作一下

我的手上有一台有v6地址的服务器,根据文档安装并配置OpenVPN。