国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
Ubuntu 16.04+、Debian 8+、CentOS 7+
const std = @import("std"); | |
const BIND_HOST: []const u8 = "0.0.0.0"; | |
const BIND_PORT: u16 = 8090; | |
const NUM_WORKER_THREADS: u32 = 16; | |
const DOWNLOAD_DIR: []const u8 = "/tmp"; | |
const MAX_FILE_SIZE: usize = 1024 * 1024 * 500; // 500M | |
// const UPSTREAM_URL: []const u8 = "https://fs.liujiacai.net/zigbuilds"; | |
const UPSTREAM_URL: []const u8 = "https://ziglang.org"; |
wget 'https://github.com/google/flatbuffers/archive/refs/tags/v24.3.25.tar.gz' | |
tar xzf flatbuffers-24.3.25.tar.gz | |
pushd flatbuffers-24.3.25 | |
cmake -G "Unix Makefiles" | |
make | |
make install | |
ldconfig | |
flatc --version | |
rm -rf flatbuffers-24.3.25 |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
Ubuntu 16.04+、Debian 8+、CentOS 7+
/* | |
* Demo of libpq. | |
* Build: g++ libpq-demo.cc -o libpq-demo -lpq | |
* Run: ./libpq-demo | |
*/ | |
#include <arpa/inet.h> | |
#include <iostream> | |
#include <libpq-fe.h> | |
#include <sstream> |
CPU Usage :
(1 - avg(irate(node_cpu_seconds_total{mode="idle"}[10m])) by (instance)) * 100
Memory Usage :
100 * (1 - ((avg_over_time(node_memory_MemFree_bytes[10m]) + avg_over_time(node_memory_Cached_bytes[10m]) + avg_over_time(node_memory_Buffers_bytes[10m])) / avg_over_time(node_memory_MemTotal_bytes[10m])))
package main | |
import ( | |
"encoding/xml" | |
"flag" | |
"fmt" | |
"go-apps/pkg/flagx" | |
"go-apps/pkg/util" | |
"io" | |
"log" |
1 | |
00:00:00,000 --> 00:00:06,800 | |
大家好,今天是2021年6月27号,是InMessTalk的第一期。 | |
2 | |
00:00:06,800 --> 00:00:11,700 | |
这一期主要由我来讲一下这个节目的背景。 | |
3 | |
00:00:11,700 --> 00:00:17,200 |
这个问题是在《形单影只的 Socket》最后留的问题,这里给出一个思路供大家参考,看下那篇文章再来看这个效果可能会更好。
传送门: 测试环境:Ubuntu 14.04 好了,进入正题。首先构造一个 TCP 连接,这里使用形单影只的 socket 来启动一个 echo server
$ nc -vp 11111 localhost 11111
Connection to localhost 11111 port [tcp/*] succeeded!
$ ss -ap | grep 11111
[dependencies] | |
rand = "0.8.5" | |
xorfilter-rs = { git = "https://github.com/datafuse-extras/xorfilter", features = [ | |
"cbordata", | |
], tag = "databend-alpha.4" } |
//! Tree(1) in Zig | |
//! https://linux.die.net/man/1/tree | |
const std = @import("std"); | |
const process = std.process; | |
const fs = std.fs; | |
const mem = std.mem; | |
const testing = std.testing; | |
const VisitedEntry = struct { |