Skip to content

Instantly share code, notes, and snippets.

@stone-sail
stone-sail / tmux-cheatsheet.markdown
Created November 3, 2021 06:46 — forked from ryerh/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

def bytes_to_int32(bytes):
assert len(bytes) == 4
return sum((b << (k * 8) for k, b in enumerate(bytes)))
def MurmurHash64B(data, seed):
m = 0x5bd1e995
r = 24
MASK = 0xFFFFFFFF
data_as_bytes = bytearray(data)
@stone-sail
stone-sail / httpclient.go
Created July 27, 2017 06:50 — forked from dmichael/httpclient.go
Light wrapper for the Go http client adding (essential) timeouts for both connect and readwrite.
package httpclient
import (
"net"
"net/http"
"time"
)
type Config struct {
ConnectTimeout time.Duration
package httptimeout
import (
"net/http"
"time"
"fmt"
)
type TimeoutTransport struct {
http.Transport
@stone-sail
stone-sail / waiter.h
Created June 9, 2017 00:12 — forked from chenshuo/waiter.h
A handful of implementations of Waiter class for discussion.
#include <boost/noncopyable.hpp>
#include <pthread.h>
#include <stdlib.h>
// a superfluous check for pedantic people
inline void CHECK_SUCCESS(int ret)
{
if (ret != 0)
{
abort();