This file contains hidden or 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
cd /opt | |
wget http://apache-mirror.rbc.ru/pub/apache/kafka/0.10.1.0/kafka_2.11-0.10.1.0.tgz | |
tar xvzf kafka_2.11-0.10.1.0.tgz | |
ln -s kafka_2.11-0.10.1.0/ kafka | |
vi /etc/systemd/system/kafka-zookeeper.service | |
[Unit] | |
Description=Apache Zookeeper server (Kafka) | |
Documentation=http://zookeeper.apache.org |
This file contains hidden or 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
[Unit] | |
Description=Redis In-Memory Data Store | |
After=network.target | |
[Service] | |
Type=forking | |
User=redis | |
Group=redis | |
ExecStart=/usr/local/bin/redis-server /etc/redis/6379.conf | |
ExecStop=/usr/local/bin/redis-cli shutdown |
This file contains hidden or 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
from Crypto.Cipher import AES | |
from Crypto import Random | |
BS = 16 | |
pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS) | |
unpad = lambda s : s[0:-ord(s[-1])] | |
class AESCipher: | |
def __init__( self, key ): | |
""" |
This file contains hidden or 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
from Crypto.Cipher import AES | |
from Crypto import Random | |
import base64 | |
block_size = AES.block_size | |
#unpad = lambda s : s[0:-ord(s[-1])] | |
def pad(plain_text): |
This file contains hidden or 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
# 一键shadowsocks-libev + 锐速(自己换内核重启) + supervisor | |
sudo apt install software-properties-common -y | |
add-apt-repository ppa:max-c-lv/shadowsocks-libev | |
apt update | |
apt install shadowsocks-libev rng-tools -y | |
cat > /etc/shadowsocks-libev/config.json << EOF | |
{ | |
"server":"0.0.0.0", |
This file contains hidden or 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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQChWdDv1Iv6yucLA96bTltTBLgqQx/WDq/MR6jiqytZCi0M66v67E/bFazqqLTqhkjkm52TO/LIMXpNGzyrfMIuPfIL1PbytKp7EY2auxmhaed7DmNcBoMH1JXpTaY0/V+/1lnTi5FY3YTkQ+0JXrJ+t3MMr8e0hZBbLosnl269jjXvWADlRE0B+8t+MMbkj8uycQ8ZQa4tJfZeT7waW5eByyE++lmQZHZqA64cUmxIRwcAjcNxvDxEtKDML9b7Kr0kvJprLkAzuPXYuumPXk5Jv+YSpwx5WXoFy6z1lwfjjayUDC2+43Xt8ht/mQD7xsuUvMgpD8E2pc+m0f4Puivp [email protected] |
This file contains hidden or 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
# | |
# OpenSSL example configuration file. | |
# This is mostly being used for generation of certificate requests. | |
# | |
# This definition stops the following lines choking if HOME isn't | |
# defined. | |
HOME = . | |
RANDFILE = $ENV::HOME/.rnd |
This file contains hidden or 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
/* | |
lower_bound:Returns an iterator pointing to the first element in the range [first,last) | |
which does not compare less than val. | |
upper_bound:Returns an iterator pointing to the first element in the range [first,last) | |
which compares greater than val. | |
*/ | |
#include <iostream> | |
#include <iterator> |