https://blog.csdn.net/g2com/article/details/64904256
比特币客户端所有的序列化函数均在 seriliaze.h 中实现。其中,CDataStream类是数据序列化的核心结构。
CDataStream 拥有一个字符类容器用来存放序列化之后的数据。它结合一个容器类型和一个流(stream)API 以处理数据。
宏 READDATA() 和 WRITEDATA()
https://blog.csdn.net/g2com/article/details/64904256
比特币客户端所有的序列化函数均在 seriliaze.h 中实现。其中,CDataStream类是数据序列化的核心结构。
CDataStream 拥有一个字符类容器用来存放序列化之后的数据。它结合一个容器类型和一个流(stream)API 以处理数据。
宏 READDATA() 和 WRITEDATA()
| --[[ | |
| https://zhuanlan.zhihu.com/p/26528101 | |
| 完整的LuaJIT的exe版本都会带一个JIT目录,下面有大量LuaJIT的工具,其中有一个v.lua, | |
| 这是LuaJIT Verbose Mode(另外还有一个很重要的叫p.lua,luajit profiler,后面会提到), | |
| 可以追踪LuaJIT运行过程中的一些细节,其中就可以帮你追踪JIT失败的情况。 | |
| 当你看到以下错误的时候,说明你遇到了JIT失败: | |
| failed to allocate mcode memory,对应错误3.1 | |
| NYI: register coalescing too complex,对应错误3.2 |
This is a script written in Python intended to run alongside a Zcash node and export statistics for monitoring purposes. It assumes the existence of zcash-cli in the PATH and access to the RPC interface over localhost.
It tracks stuff like: block height, difficulty, number of peers, network solutions per second, errors, mempool size, size of recent blocks, number of transactions within blocks, chaintips, total bytes received and sent, transaction inputs and outputs, and the make-up of transactions in terms of JoinSplits, shielded, unshielded or mixed. These Zcash metrics are refreshed once every 2 minutes.
Prometheus is a monitoring system and time-series database.
| local ngx = ngx | |
| local md5 = ngx.md5 | |
| local ngx_time = ngx.time | |
| local ngx_cookie_time = ngx.cookie_time | |
| local decode_base64 = ngx.decode_base64 | |
| local string_sub = string.sub | |
| local string_find = string.find | |
| local string_format = string.format | |
| local table_concat = table.concat |
tunneld to /usr/local/bin/tunnelduseradd -r tunneld/etc/tunneld/usr/local/bin/certstrap| -- https://news.ycombinator.com/item?id=14605922 | |
| -- Here's a JSON parser in LPeg, the excellent PEG parser from one of the Lua authors. The function "decode" returns the final, complete tree data structure. | |
| local lpeg = require"lpeg" | |
| local P, S, R, V = lpeg.P, lpeg.S, lpeg.R, lpeg.V | |
| local C, Cc, Cf, Cg, Ct = lpeg.C, lpeg.Cc, lpeg.Cf, lpeg.Cg, lpeg.Ct | |
| local function to8(n) | |
| ... -- Lua code to normalize UTF-16 to UTF-8 |
| // Copyright (c) 2014-2018 The Bitcoin Core developers | |
| // Distributed under the MIT software license, see the accompanying | |
| // file COPYING or http://www.opensource.org/licenses/mit-license.php. | |
| #include <vector> | |
| #include <string> | |
| #include <cctype> | |
| #include <iostream> | |
| #include <assert.h> |
| [Unit] | |
| Description=ssh forwarding | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| ExecStart=/usr/bin/ssh -N -o ServerAliveInterval=60 -o StrictHostKeyChecking=no -R 0.0.0.0:2922:127.0.0.1:22 x@y -p 22 | |
| Restart=on-failure | |
| [Install] |
| package main | |
| import ( | |
| "flag" | |
| "log" | |
| "net/url" | |
| "os" | |
| "os/signal" | |
| "time" |
| Many users seem to use the gen_server for absolutely everything | |
| and often force their problems to fit the gen_sever even though the | |
| gen_server is not appropriate for their problems. | |
| The gen_server is an extremely simple bit of code | |
| which can be easily changed to fit other problems, though people don't | |
| often do this. | |
| In this posting I'll explain the basic idea of how the gen_server works. |