Skip to content

Instantly share code, notes, and snippets.

View cocobear's full-sized avatar

可可熊 cocobear

View GitHub Profile
https://www.kxxzz.com/xx/367.html
https://github.com/233boy/v2ray/wiki/V2Ray%E4%B8%80%E9%94%AE%E5%AE%89%E8%A3%85%E8%84%9A%E6%9C%AC
安装BBR加速:
对于youtube速度差别很大
wget https://d.kxxzz.com/sh/tcp2020/tcp.sh
chmod +x tcp.sh
./tcp.sh
选择 bbr plus
- 动态规划
- 拓扑排序
## 最重要的
- 椅子扶手和桌面平,也就是和放键盘的位置相平,打字时手肘有依托
- 可以半躺式打字,看屏幕,椅背角度大概120度-130左右
- 脚可以完全伸出去
@cocobear
cocobear / convert_none_utf8_2_utf8.sh
Created September 29, 2019 09:14
批量转换非UTF8的文件到UTF8
#! /bin/bash
set -e # Exit script immediately on first error.
#set -x # Print commands and their arguments as they are executed.
NON_UTF_FILE_DIR="wiki"
PATTERN_FILE_NAME="*.md"
find $NON_UTF_FILE_DIR -type f -name $PATTERN_FILE_NAME > utf8list
iconv utf8list > asciilist
@cocobear
cocobear / tips.sh
Created August 9, 2019 09:06
同时设置N个服务器免密码登录
ssh-keygen -b 4096 -t rsa
xpanes -c 'ssh-copy-id -i ~/.ssh/id_rsa.pub root@node{}' {0..5}
xpanes -c 'ssh root@node{}' {0..5}
@cocobear
cocobear / ssh-multi.sh
Created August 8, 2019 07:32 — forked from dmytro/ssh-multi.sh
Start multiple synchronized SSH connections with Tmux
#!/bin/bash
# ssh-multi
# D.Kovalov
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# a script to ssh multiple servers over multiple tmux panes
starttmux() {
if [ -z "$HOSTS" ]; then
@cocobear
cocobear / tmux-cheatsheet.markdown
Created January 5, 2019 14:12 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@cocobear
cocobear / tmux.md
Created January 4, 2019 07:11 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@cocobear
cocobear / zsh.rc
Last active August 8, 2019 02:59 — forked from florianbeer/set-tmux-title
[set tmux title] 设置tmux标题为ssh主机名 #tmux #ssh
ssh() {
if [ "$(ps -p $(ps -p $$ -o ppid=) -o comm=)" = "tmux" ]; then
tmux rename-window "$(echo $*)"
command ssh "$@"
tmux set-window-option automatic-rename "on" 1>/dev/null
else
command ssh "$@"
fi
}
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal