在私人建站的過程中,最方便的莫過於使用寶塔的SSL自動續簽。但是,什麼免費的東西也有個但是,就是如果你一天之內申請次數過多,加上狗血的寶塔對多域名支持不友好的情況下,因為寶塔的GUI設計或者各種原因,導致不能再申請,或者你想你的網站的擁有一些與眾不同的證書,那麼申請一個付費又便宜的證書其實蠻適合私人站長的。

首先我們選擇一個賣證書的商家,這裡本站選擇了Namecheap,個人認為不會像狗爹那麼浮誇,比較老牌,有口碑,服務也比較專業。註冊好賬號之後,登入去,充錢:dashborard-top up, 支付流程就不多說了。

這裡選擇自己需要的證書,一定要按需選擇,不然就是燒錢無底洞。

單域名證書:可以綁定一條帶www和不帶www的域名,比如http://admin.com和http://www.admin.com就是一條。多域名證書:可以綁定250多條任意類型的域名。泛域名證書:可以綁定一條頂級域名和頂級域名下的所有二級域名,或者是一條二級域名和二級域名下的所有三級域名。

買好之後就可以開始部署自己的證書了,部署的步驟大概分為幾個:

第一步,在namecheap.com生成一個CSR(Certificate Signing Request),填寫要申請SSL證書的域名、國家、郵箱、公司等信息之後,對激活申請發起請求,會生成一個private key和certificate給你,這個privatekey後面有用到,現在這個certificate是沒什麼卵用的,生成的結果請你用txt文件保存起來。生成CSR的方式有很多種,可以軟件也可以網站生成,一般來說在Namecheap購買的可以到這個網址申請:https://decoder.link/csr_generator

第二步,進行DCV(domain control validation),就是證明你擁有這個域名的完全控制權(證明你交了租~)
有三種方式可以證明你擁有這個域名
1,通過向網域郵箱發送認證
2,在web服務器添加一個文件
3,修改DNS設置,添加一條CName Record

第三步,等待DCV生效,上面的方式還是第3點比較方便,你就去你的Name Server那裡設置添加一個CName Record,要填的variable有兩個,一個叫host,另一個叫target,這兩個值可以在namecheap–dashboard–已購的ssl產品目錄–edit method的下拉箭頭找到。缺點敏銳的偵查能力都找不到~大概等個5~30分鐘左右就行。

第四步,接收證書。到你剛剛填寫的郵箱裡查收郵件,郵件裡包含一個certificate

第五步,到寶塔裡配置,把剛才留下來的privatekey以及郵件發給你的certificate給填上寶塔網站裡的ssl裡,保存–強制https,即可

完成了之後再你的Namecheap的DashBoard裡就會出現一個鎖頭。

瀏覽器打開https://v2rayz.org,chrome瀏覽器按網址左邊的鎖頭,可以查看到證書的相關信息。

“””
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
yum -y install git
“””
安裝docker和git(如未安裝)

git clone https://github.com/etaf/shadowsocks-docker.git && cd shadowsocks-docker
在github下載Dockerfile和相關設置

cat shadowsocks_config.json
查看設置,有需要就修改

{
“server”:”::”,
“server_port”: 8838,
“local_address”:”127.0.0.1″,
“local_port”:1080,
“password”:”abcdefg”,
“timeout”:300,
“method”:”aes-256-cfb”,
“fast_open”:true
}

systemctl stop firewalld
用各種方式停止防火墻和開啟端口,這裡只使用firewalld

docker build -t etaf/shadowsocks ./
把你的設置和原來的image一起構建成docker image

sudo service docker restart
重啟docker

sudo docker run –restart=always -d -p 8838:8838 etaf/shadowsocks
運行Container和開機自啟動

docker logs $(docker ps -ql)
查看Contianer裡的輸出

Matplotlib是Python語言中比較流行的畫圖的包,用於製作靜態圖比較合適。

交易產品的蠟燭圖所需要的源數據也就是Open High Low Close的價格,還有就是日期時間,現在給出一個data.csv作為Sample

import numpy as np
import csv
import matplotlib.pyplot as plt
from matplotlib import dates, ticker
import matplotlib as mpl
from mpl_finance import candlestick_ohlc

mpl.style.use(‘default’)

fname = ‘data.csv’

# Empty lists to extract the data from csv files
date_data = []
open_data = []
high_data = []
low_data= []
close_data= []
trade = []
turn = []

# Extracting data
with open(fname, ‘r’) as csvfile:
data = csv.reader(csvfile, delimiter=’,’)
for line in data:
date_data.append(line[0])
open_data.append(line[1])
high_data.append(line[2])
low_data.append(line[3])
close_data.append(line[4])
trade.append(line[5])
turn.append(line[6])
# removing ‘-‘ indata
trade[18] = 0
turn[18] = 0


# Conversion to numpy arrays
open_val = np.array(open_data[1:], dtype=np.float64)
high_val = np.array(high_data[1:], dtype=np.float64)
low_val = np.array(low_data[1:], dtype=np.float64)
close_val = np.array(close_data[1:], dtype=np.float64)
trade_val = np.array(trade[1:], dtype=np.float64)
turn_val = np.array(turn[1:], dtype=np.float64)

# Matplotlib needs dataes in floating numbers to plot them under the hood
data_dates=[]
for date in date_data[1:]:
new_Date = dates.datestr2num(date)
data_dates.append(new_Date)


i = 0
ohlc_data = []
while i < len(data_dates):
stats_1_day = data_dates[i], open_val[i], high_val[i], low_val[i], close_val[i]
ohlc_data.append(stats_1_day)
i += 1

fig, ax1 = plt.subplots()
candlestick_ohlc(ax1, ohlc_data, width=0.5, colorup=’g’, colordown=’r’, alpha=0.8)
plt.show()

得出以下結果:

PYTHON

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
安裝Docker

docker pull [image name]
下載鏡像(image name:latest)

docker pull ubuntu

docker run –name Myubuntu1 -it ubuntu bash
在Container中運行ubuntu,進入bash,並使用interative mode

docker run -it –name [tag] -p 1234:80 -v $PWD/.:/home/test [name]
Interactively地去運行一個Container,端口指定

docker run -d -it –name [container name] -p 192.168.2.1:80:80 [image name]


docker help
一般性幫助
docker [command] –help
尋求幫助

docker images
查看所有鏡像

docker start [name]
運行Container

docker ps -a
列出所有Container

docker attach [name]
重新进入该Container

top -b
查看正在運行的進程

ctl+p & ctl+q
退出Container,進程繼續

exit
退出Container,進程結束

docker exec -it [name] [command]
在Container裡執行命令Without結束其他進程

docker stop [name]
結束Container

docker rm [name]
刪除Container

docker rmi [name]
刪除鏡像

docker inspect [name] | grep [content]
在鏡像信息裡查找需要的Content

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

docker build [path]
docker build .
建立鏡像

docker tag 40d13af0eebd [image name]
命名鏡像


sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
卸載Docker

docker -v
查看版本


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Dockerfile的用法


From [image name]

MAINTAINER admin@v2rayz.com

RUN yum -y install httpd

COPY index.html /var/www/html

EXPOSE 80 443 8080/tcp 5000/udp

CMD [“bash”, “/script.sh”]

以上命令都幹了什麼事情:
從dockerhub載入image
註明作者
運行命令
從本地copy一個文件到Contianer的路徑
打開80 443 8080的tcp端口和5000端口
執行bash /script.sh

yum install -y wget

安装wget

yum update

升级系统版本

cat /etc/redhat-release

查看系统版本

wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

下载并执行安装bbr魔改版内核脚本

./tcp.sh

在tcp.sh目录下运行,并输入对应数字,使用暴力BBR魔改版加速(不支持部分系统)

        眾所周知,翻墻,或者叫做“自行建立或者使用採用其他信道进行国际联网”是在某個地區的違法行為,那麼,是否能想象?假設我們不翻墻又能看到Youtube的片源呢?其實翻墻的網民很多都是整天沉浸在Youtube裡,裡面的精彩內容。假設有一天你被請去喝茶了,把你的手機檢查一遍,你可以大方地說:我並沒有“自行建立或者使用採用其他信道进行国际联网的喔,不信你看?”,然後讓他打開自己的手機連接這個網址,接著可以裝著尷尬地傻笑,喝下拿杯還熱的茶,並優雅地離開。

        一切都是源於一個叫Y2PHP的開源項目,但是這個項目已經被關停了。

        代碼是人類最高智慧的結晶,不是說項目流產就永遠不能用了。

        來點乾貨了,本站已经构建了一个。除非有刁民做在做坏事,否则是永久免费的。

 

V2RayZ.com加油站 720p版

打開網址:yt.pyzen.org,進入首頁

進行搜索,然後選擇你想看的視頻

yt.pyzen.org的清晰度只支持720p以下的,網絡狀況惡劣的時候可以選擇使用。

V2RayZ.com Youtube加油站 4K版

網絡狀況好的同學可以選擇4k版本:4k.pyzen.org,进入4K版首頁

至於速度,發帖日期的最高速度能上萬。當然了,這個只能當備份或者玩玩而已,如果想購買完整的v2ray機場服務請看到v2rayz.com,進入首頁看教程,到商店買服務。


pidof firefox
查找程序PID方法1
ps aux | grep -i firefox
查找程序PID方法2
pgrep firefox
查找程序PID方法3

pgrep firefox

查找程序PID

$ date
查看时间

$ timedatectl set-timezone Asia/Shanghai
调节时间为上海时区

$ uname -r
查看内核版本

shopt -s extglob
$ rm -v !(“filename”)
enable the extglob shell option , remove everything except a filename

cat /etc/os-release
查看Linux版本

yum install epel-release
CentOS7’s depending pip repositories
yum -y install python-pip
install python pip

$ jq . config.json
检查语法错误

1、查找文件

find / -name ‘filename’ or find -name ‘filename’

2、查找目录

find / -name ‘path’ -type d

3、查找内容

find . | xargs grep -ri ‘content’
//find . | xargs grep -ril ‘content’ 只显示文件名称

pwd: print current dir
ls -l: show details
ls -a: show hidden
ls -la: both hidden and details
clear: clear terminal
cd: just type cd to home directory
cd: change dir
cd..: go up once
cd ../..: go up twice
cd /: to the ver top

———————————————-
/soft/shadowsocks/userapiconfig.py

mkdir dirname: make dir
rmdir dirname: remove an empty dir

rm -rf dirname: remove an non-empty dir

touch filename: create file
rm filename: remove file
cp oldfilename newfilename: copy a file
mv oldfilename newfilename: rename a file
mv file dir: move a file to dir
cat file: read the file
grep content file: global regular expression print(search content in file)

name=ryan: store a variable called name as ryan
echo hello: print hello
echo $name: echo out the variable

cd bin dir
bash pycharm.sh: to run pycharm on linux

info commandName: print out the help document of a command
ctrl+ c: back to home

ls > filename: to copy all the ls result to a file(overwritten)
ls >> filename: to append all the result to a file (not over written)

-rw: means file
drw: means dir
rwx: means read, write, execute
-rwxrw-r-x: means a file, owner can rwx it, group can read write it, the rest of users can read and execute it
u – user
g – group
o – others

ryan ryan: first is the owner of the file, second is the group it belong to
sudo useradd Bucky: to add a new user named Bucky
sudo passwd Bucky: change passwd for Bucky
sudo groupadd hacker: add a group called hacker
sudo usermod -a -G hacker Bucky: append Bucky to hacker group(not removing the group it belongs before)
sudo usermod -a -g hacker Bucky: append Bucky to hacker group(removing the group it belongs before)
sudo userdel Bucky: delete Bucky user
———————————————————————————–

chmod o+w filename: to change the permission while others can write
chmod 754 filename: to change a file to -rwx r-x –r
7, 5, 4 represents user, group, others
4 – read
2 – write
1 – execute
0 – no permissions
chmod 777 filename: all permissions to all people

————————————–
sha1sum file: to get the hash number of the file

————————————————
compress and decompress:

gzip Grocery\ List: when there is a space in filename, need to backslash
gzip filename: to zip a file to filename.gz
gunzip story: to unzip a file

tar cvf target.tar fileA fileB:
make a target.tar to include fileA and fileB
cvf – create, visualize, file
xvf – extract, visualize, file

——————————————–
apt: avanced package tool
sudo: super user do

sudo apt-get update
sudo apt-get install python3

java -version: print the version of java

——————————————-
SSH: Secure Shell
Set up ssh private and public keys:
in the local machines:
ssh-keygen -t rsa: create a private key, saved in /home/user/.ssh/id_rsa.pub
ssh-copy-id root@server’s IP: to add copy of private key to the server
ssh root@server’s IP: to connect to the server, and automatically add
in the server:
nano /etc/ssh/sshd_config
find #Authentication:
PermitRootLogin without-password
reload ssh: to restart the ssh service, when configuration is made

———————————————
Transfer files using SFTP
sftp root@server’s IP
cd TargetDir
put Desktop/file: put the local file into the server via sftp
put -r Desktop/dir: to put a dir recursively (file in it included) to the working directory
get file Desktop/File: get the file from the server to the local machine and rename it as ‘File’
get -r dir Desktop/Dir: get the dir recursively from the server to the desktop and rename it as ‘Dir’
exit: to quit from ssh or sftp

——————————————————-
Partitioning:
sudo apt-get install gparted: to install an visualized app for partitioning
sudo gparted

——————————————————-
Command Shell:
#!/bin/sh:
adding to the header of a script, and make Linux run the following command
chmod +rx file: to change the permission of a file to readable and executable
bash script: to run the script

———————————————————-
Processes:
ps: to list the processes that we owned and controlled manually
ps -ax: list all the processes in the background including the system processes
PID TTY Time CMD
ProcessID Terminal 00:00:00(time of cpu comsummed) Name of command

without finishing the process, no control of the terminal, eg. xlogo
ctrl + c: interrupt the process in the foreground
cmd &: to run the cmd in the background
[1] 2710: JobNumber, PID
jobs: to list the current jobs(a special type of process)
fg %1: to turn the background job to the foreground
bg %1: to turn the background job to the foreground
ctrl + z: to pause the current foreground job
kill PID: to kill the process
kill JobNumber: to kill the job
kill -STOP cmd: to freeze the process
kill -CONT cmd: to unfreeze the process

————————————————————
Crontab:

Facebook被禁十週年了,想必有網民還記得以前可以自由連通Facebook的日子。如果沒有基本的言論自由,那麼這個文明就根本不可能構築起普世價值。所謂自由和民主,就是資本主義的兩個最大的囈語。我們都只是生活在六識之內,本來就無資格談論真正的自由,無自,何由?民主,主誰?真正的自由在於共產主義,在於禪。現階段為什麼這兩個東西忒流行,僅僅是因為資本主義還沒有走向消亡罷了,打開資本主義的K線圖,它還沒有走向頂背馳。

“自由”,本篇博客理解為“自我覺醒獨立的人類,並時刻進行實踐檢驗,最終通向‘聖人之道’的思想取向”。

翻墻是帶不來真正的自由,儘管達不到,但是我們可以依舊遊戲於六識之中,所謂突破六識自由的枷鎖在於纏。為何破墻者反被思維的墻而墻,破墻者反身變作築墻者?眾生業力之纏也,用《論語》來說便是:放於利而行,多怨。筑墻方看似放棄利益,從嚴管理,其實是維護自身利益。破墻方看似放縱利益,崇洋媚外,其實也是在維護自身利益。雙方構成一個動態的攻防合力,相互交織交纏,雙方都離不開彼此了。

那種破墻者反身變作築墻者的,便是最會謀取暴利的一小撮人。舉個例子,在很久很久以前,迅雷、百度網盤是不限速的,任意下載,簡直是通向世界的一扇重要門道。然而看看現在,便成了我掌握技術了,我就故意筑起墻,要收你的費。為什麼說他們雙方離不開彼此?沒有破墻者的技術力度加持請問那些國外的電影資源、數據文檔你有渠道轉向迅雷百度下載嗎?沒有築墻者的收費,沒有做得那麼簡單的軟件界面,廣大的小白群眾能那麼容易下載得到資源嗎?這顯然是雙方合力交織的結果。但是問題來了,為什麼我付費買的200M的寬帶了,我不能跑滿我的帶寬,那是我的帶寬,是我的合法資產,又不是你的帶寬,憑什麼限我速?為什麼要容許這種墻中墻的無賴行為?如果看官對本站有意見,請推薦一款開源的免費快速的國產下載工具。360公司IPO上市的一天,本站就已經嚴重看跌了(當然不會永遠跌),一間靠流氓軟件發家的公司,不跌才怪。自己是最不安全,最多病毒的軟件,居然能自稱360安全助手,多少國人的電腦因它的流氓而拖垮內存導致不能使用呢?

這裡的墻當然不僅僅特指那個所謂的DNS污染系統,國人最大問題是思想上自設防火墻。城市被劃為一個一個的封閉的小區,混雜了各種不同的人,老死不相往來,在電梯裡碰到也不會打個招呼,這是常態。大學被封閉式管理,為了所謂的天天被媒體放大了的“學生安全”,大學生只能在繈褓之下學習一些升級版的高中知識,都忘記自己已經是有自我保護能力的成年人,安保工作更是靠著模糊不堪的CCTV和事後處理機制。大學裡出現所謂的貼著教師優先的電梯和便道更是“墻中墻中墻”。放眼國外,有多少間大學是採取封閉式管理,用圍墻把大學圍住的呢?國人追求的“集中管理”,很容易就演變成一種享受極權主義的潛意識,而被管理者更是逆向合理化自己,認為被人管、有人管會帶來某種安全感,但卻完全放棄了自己可以選擇做某事的合法權利,小事諸如找一篇國外的論文。

說起論文也不能不提一下百度:中國最大局域網搜索引擎。本站的第六感覺告訴我,一個搜索引擎不連接互聯網,只是一潭死水,已經開始發臭。你搜到的每一條知識的結果只能是經過不斷複製粘貼並且經過審查過的內容。如果你的職業或者生活不需要更新知識,或者只是普及一下高中以下的知識,那還可以勉強用一下。但是對於那些想透過互聯網學習世界頂尖科技的人們來說,只能給它一個中指。

尤其對於想學習強國,樂於接受新事物的人,學習新語言、做海外商店、Python編程、量化交易、人工智能等,進行創造創新的人,用百度搜索就等於在一潭死水裡找死魚。用谷歌通向StackOverflow、Github、Youtube、Twitter等网,是君子履行“修身”的日常必備。“由知、德者,鮮矣”,沒有鮮活的智慧和對其實踐,是無法進行任何創新的,是故翻墻者,非崇洋而媚外,崇優也;由《論語》之知,師夷之長技以制夷也。

新用戶使用步驟:

進入主站v2rayz.com——點擊商店——註冊用戶——驗證郵箱

產品服務——購買服務——購買套餐——支付寶支付——我的服務——選擇套餐——下拉出現v2ray二維碼和url——使用

整體來說,此機場1080P是完全沒有問題,用戶體驗不錯。對於我這種之前使用ss的人來說,剛剛開始使用有點不適應,但是用了幾個月,在敏感時段能夠堅挺不倒,看著其它的ss節點紛紛掛掉的感覺實在有點邪惡。而且流量才30元就有300G,還可以自定義流量,大概0.5元/g,價格還算公道,對於那些心理有無限流量強迫症患者或者以前用慣了只有幾十G機場的用戶來說,也是一個治愈方案。

樓主還給了我推廣代碼,可以優惠到24軟妹幣:CN4J5CHH64

此時不褥更待何時?

 

為什麼要用V2RAY,而不用SSR。儘管SSR確實是比V2RAY實測的速度要快一丟丟,誠然,設置難度也比V2RAY要簡單得多。但是SSR的發明人逗B已經被起訴了,確實是防火長城的一個勝利節點,不管你在軟件裡怎麼添加混淆,也是逃不出防火墻的探測。現階段(2019年),防火長城會把所有認為沒有網址的流量轉發視為目標,從而使用TCP隔斷來阻礙用戶的翻墻行為。無論你搭建什麼VPS也好,只要是用shadowsocks的流量轉發,也有很高的幾率被封鎖IP,只要一碰到敏感時段或者GFW心情不好,就會碰到各種車禍。這就是為什麼Vultr之類的服務商頻頻被封鎖的真正原因。

相對而言,V2RAY的技術裡有真正的加密。單單從概率來說,V2RAY比起SS或者SSR來說被封的概率是很低的,現階段的GFW對V2RAY的識別能力還有待提升。只要互聯網世界的TLS還是有效的,簡單理解也就是說只要https還存在於互聯網,那麼採用TLS+WS的V2RAY使用還是有效的。究竟是“穩”重要,還是“快”重要,有一年以上翻墻經驗的看官應該可以自己判斷了。

技術上网的官方購買渠道:https://v2rayz.com

或微信、浏览器扫小熊二维码