$ brew cask install mounty
打开 https://github.com/Dreamacro/maxmind-geoip/releases/latest 下载最新的 Country.mmdb
虽然查看的 cpu 信息是 ARMv7 但是 clash 还是只能运行 armv5 的,
cat /proc/cpuinfo | grep ARM
Processor : ARMv7 Processor rev 0 (v7l)
打开 https://github.com/Dreamacro/clash/releases/latest 下载 clash-linux-armv5-v1.1.0.gz
,并解压该文件
- 安装 docker 和 docker-compose
- 创建一个名为 wp-demo 的目录
- cd wp-demo
- vim docker-compose.yml
填写以下内容
version: '3.1'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Playbook - http://play.golang.org/p/3wFl4lacjX | |
package main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"encoding/base64" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
字符串查找比较 | |
利用系统功能调用从键盘输入一个字符串,然后输入单个字符,查找该字符串中是否有该字符(区分大小写)。具体要求如下: | |
(1) 如果找到,则在屏幕上显示: | |
Success! Location: X | |
其中,X为该字符在字符串中第一次出现的位置 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
用系统功能调用实现简单输入输出 | |
利用系统功能调用从键盘输入,转换后在屏幕上显示,具体要求如下: | |
(1) 如果输入的是字母(A~Z,区分大小写)或数字(0~9),则将其转换成对应的英文单词后在屏幕上显示,对应关系见下表 | |
(2) 若输入的不是字母或数字,则在屏幕上输出字符“*”, | |
(3) 每输入一个字符,即时转换并在屏幕上显示, |
Dockerized: V2ray + WebSocket + TLS + Web
also see: https://toutyrater.github.io/advanced/wss_and_web.html
Server side sontents:
- Caddyfile
- config.json
- docker-compose.yml
Client side contents:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias qcli='docker exec -it qtumportal qcli' | |
qcli listunspent 0 999999 '["qLn9vqbr2Gx3TsVR9QyTVB5mrMoh4x43Uf"]' \ | |
| grep amount \ | |
| awk '{print $2}' \ | |
| awk -F, '{print $1}' \ | |
| awk BEGIN{RS=EOF}'{gsub(/\n/, " + "); print}' \ | |
| bc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { PrivateKey, Networks } = require('qtumcore-lib'); | |
// Qtum address is 'qUbxboqjBRp96j3La8D1RYkyqx5uQbJPoW' | |
// | |
// /dapp # qcli gethexaddress qUbxboqjBRp96j3La8D1RYkyqx5uQbJPoW | |
// 7926223070547d2d15b2ef5e7383e541c338ffe9 | |
const privateKey = PrivateKey.fromWIF('cMbgxCJrTYUqgcmiC1berh5DFrtY1KeU4PXZ6NZxgenniF1mXCRk'); | |
const privateKeyHex = '0x' + privateKey.toString().padStart(64, '0'); | |
console.log(privateKeyHex); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uncomment to print commands being executed | |
# set -x | |
pid=0 | |
# SIGTERM-handler | |
term_handler() { | |
echo "Handler INT"; | |
if [ $pid -ne 0 ]; then | |
kill -SIGTERM "$pid" | |
wait "$pid" |