Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am biningo on github.
* I am wuyue (https://keybase.io/wuyue) on keybase.
* I have a public key whose fingerprint is 0C08 0167 CFB6 5D39 A7E6 1809 E6FE B414 0CB8 ED71
To claim this, I am signing this object:
@biningo
biningo / producer-consumer-file-io.java
Last active March 17, 2024 07:54
生产者-消费者模式 在文件IO中的应用
public class FileSystemDispatcher {
private final AtomicBoolean running = new AtomicBoolean(false);
public final int threadNums;
public String dirPath;
public final BlockingQueue<String> queue = new LinkedBlockingQueue<>();
package main
import (
"flag"
"fmt"
"io"
"net"
)
var (
package main
import (
"fmt"
"io"
"log"
"net"
"net/http"
)
package main
import (
"flag"
"fmt"
"io"
"net"
"net/http"
"strings"
)

Keybase proof

I hereby claim:

  • I am biningo on github.
  • I am icepan (https://keybase.io/icepan) on keybase.
  • I have a public key whose fingerprint is 497F 0ED6 5835 7E5F 9E63 E1CF 9009 C4D8 2F19 07CD

To claim this, I am signing this object:

@biningo
biningo / wakatime
Created February 22, 2021 02:46
wakatime
dsa
@biningo
biningo / tmux-cheatsheet.markdown
Created February 21, 2021 02:24 — forked from ryerh/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

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

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

启动新会话:

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

恢复会话:

p1 = headA;p2 = headB
while p1!=p2: #速度一样 路程一样 最终一定会相遇 ♥
p1,p2 = headB if p1==None else p1.next,headA if p2==None else p2.next
return p1