Go语言一般指go(又称 Golang够浪)

够浪的下载地址
https://golang.google.cn/
https://golang.google.cn/dl/
https://golang.google.cn/doc/install?download=go1.15.windows-amd64.msi

package main

import "fmt"

func main() {
   fmt.Println("Hello, 大球Cat!")
}

go run cat.go
go build cat.go

wget https://golang.google.cn/dl/go1.15.linux-arm64.tar.gz
tar -C /usr/local -xzf go1.15.linux-arm64.tar.gz
export PATH=$PATH:/usr/local/go/bin

可以交叉编译

set GOOS=linux
set GOARCH=arm64

参考文献:
https://www.runoob.com/go/go-environment.html

公钥、私钥、加密、解密、RSA

密钥还有很多种存储方式,比如java形式的base64,还有c#形式的xml等
私钥也可以用来加密,公钥解密,需要用到BouncyCastle.Crypto.dll这个库

IBufferedCipher c = CipherUtilities.GetCipher("RSA/ECB/PKCS1Padding");
c.Init(false, PublicKeyFactory.CreateKey(Convert.FromBase64String(pubKey)));
byte[] wb = c.DoFinal(buf, 0, l);

公钥解密的栗子,用的是base64格式的密钥

参考文献:
http://www.itkeyword.com/doc/8759566037018943514/c
https://blog.csdn.net/theodore26/article/details/50331049

redis批量导入

cat test.txt
a,1
b,2
c,3
cat test.txt | awk -F "," '{print $1" "$2" "$3" "$4}'
a 1
b 2
c 3
cat ../test.txt | awk -F "," '{print $1" "$2}' | xargs -n4 sh -c 'src/redis-cli set $1 $2' sh
cat ../test.txt | awk -F "," '{print "set "$1" "$2}' | src/redis-cli --pipe
cat ../f0.txt | awk -F "," '{print "set "$1" "$2}' | src/redis-cli --pipe
time cat ../f0.txt | awk -F "," '{print "set "$1" "$2}' | src/redis-cli -n 0 --pipe

挂载exFat分区

原来也不是直接可以挂载的,还要装点儿东西
sudo apt-get install exfat-fuse
然后就可以挂啦
sudo mount /dev/sda /mnt/usb_flash

单机HBase

http://www.apache.org/dyn/closer.cgi/hbase/
https://mirror.bit.edu.cn/apache/hbase/
https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/
wget https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/hbase-1.3.6/hbase-1.3.6-bin.tar.gz
tar zxf hbase-1.3.6-bin.tar.gz
mv hbase-1.3.6 hbase

sudo vi /etc/profile 添加

export HBASE_HOME=/home/user/hbase
export PATH=$HBASE_HOME/bin:$PATH

source /etc/profile
hbase version
HBase 1.3.6

Source code repository git://Sakthis-MacBook-Pro-2.local/Users/sakthi/dev/hbase revision=806dc3625c96fe2cfc03048f3c54a0b38bc9e984
Compiled by sakthi on Tue Oct 15 01:55:41 PDT 2019
From source with checksum d587feefff2057a2e5001da5db4a6fac

JDK要配好java -version

vi /home/user/hbase/conf/hbase-env.sh

export JAVA_HOME=/home/user/miku/jdk
export HBASE_MANAGES_ZK=true

vi /home/user/hbase/conf/hbase-site.xml

<configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>file:/home/user/miku/data</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>file:/home/user/miku/data/zookeeper</value>
    </property>
</configuration>

/home/user/hbase/bin/start-hbase.sh # stop-hbase.sh 停止
hbase shell

status
create 'table1','field1'
t1 = get_table('table1')
t1.put 'row1', 'field1:qualifier1', 'value1'
t1.scan

参考:
https://blog.csdn.net/ouzhuangzhuang/article/details/89876152