*NIX & Hacking —— 第2期

做一本我感兴趣的杂志,就这么简单!

Debug

Introduction to Debuggers

Docker

DOCKER MACHINE 0.3.0 DEEP DIVE

Git

First aid git

Golang

go-lang-cheat-sheet

Kernel

Kernel and userspace tracing: with LTTng and his friends

Regular Expression

Five Invaluable Techniques to Improve Regex Performance

Rust

First Rust Program Pain (So you can avoid it…)

Scala

Various ways to run Scala code
Why does the same scala code work OK in command line while not in Intellij?

Unix

A little collection of cool unix terminal/console/curses tools
How big is the pipe buffer?
Stack Smashing On A Modern Linux System
Unix history repository

Easter egg

DMA (Direct Memory Access)
Get Unix Jobs
Here are 13 tech jobs that pay at least $130,000 across the country

正则表达式笔记

以下笔记来自于《The awk programming language》里《正则表达式》一节。

1.正则表达式的元字符(metacharacters):
\^$.[]|{}*+?

2.基本的正则表达式形式:
a)普通字符(非元字符),像A,就匹配A自己;
b)转义序列(Escape Sequences):\b\f\n\r\t\ddd\c\c表示保留任意字符的字面含义,如\"表示")。
c)取消特殊含义的元字符,像\*,仅表示*本身;
d)^:匹配字符串的开头;
e)$:匹配字符串的结尾;
f).:匹配单个字符;
g)character class[...]complemented character class[^...]。举个例子,[ABC]匹配ABC中的任意一个字符,而[^0-9]匹配任意一个不是数字的字符。在[...][^...]中,除了\,紧随着[出现的^,和在两个字符直间的-3个字符外,其它字符不再具有特殊含义。如[.]则仅匹配一个.

3.运算符:
a)|A|B表示匹配A或者B
b)连接:AB表示匹配A后面紧跟着B
c)A*:匹配0个或多个A
d)A+:匹配1个或多个A
e)A?:匹配0个或1A
f)(r)()仅仅是把正则表达式扩起来。