... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
import scala.language.experimental.macros | |
import scala.reflect.macros.blackbox.Context | |
trait Mappable[T] { | |
def toMap(t: T): Map[String, Any] | |
def fromMap(map: Map[String, Any]): T | |
} | |
object Mappable { | |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
##ss-redir 的 iptables 配置(透明代理)
透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则
创建 /etc/ss-redir.json 本地监听 7777
运行ss-redir -v -c /etc/ss-redir.json
iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个
People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
#!/bin/sh | |
# 2021-12-09: | |
# This script is no longer supported! | |
# Apple broke all direct downloads without logging with an Apple ID first. | |
# The number of hoops that a script would need to jump through to login, | |
# store cookies, and download is prohibitive. | |
# Now we all must manually download and mirror the files for this to work at all :'-( | |
OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}') |
/* | |
package llrb implements a Left-Leaning Red-Black Tree (2-3 Variant), | |
as described by Robert Sedgewick: | |
* http://www.cs.princeton.edu/~rs/talks/LLRB/RedBlack.pdf | |
* http://en.wikipedia.org/wiki/Left-leaning_red%E2%80%93black_tree | |
The goal of this implementation is a one-to-one correlation to the ideas |
package main | |
import ( | |
"fmt" | |
"net/url" | |
"reflect" | |
"strconv" | |
) | |
type Person struct { |