DD windows

KS3B 2T

wget -O- https://down.zhujiwiki.com/windows-dd/Windows7-Joodle-Template.gz |gunzip|dd of=/dev/sda

Username: Admin
Password: Password147

7欧SSD
wget -O- 'https://down.tn/Windows/ISO/Win2012R2CN.gz' | gunzip | dd of=/dev/sda
用户:Administrator
密码:Laiboke.com

20欧
wget -O- 'https://down.tn/Windows/ISO/DD-Joodle/Windows2012R2-Joodle-Template.gz' | gunzip | dd of=/dev/sda
用户:Administrator
密码:Password147

 

http://windowstemplate.com/

 

图形

刚刚启动,成交量持续放大,放量拉升,缩量回调。

红宝丽

山西证券

 

 

Ubuntu 16 install Python 3.5.1

Ubuntu 16.04 x64

sudo apt-get update
sudo apt-get install gcc -y
sudo apt-get install build-essential -y
sudo apt-get install libssl-dev openssl -y
sudo apt-get install build-essential

wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
tar zxvf Python-3.5.1.tgz
cd Python-3.5.1
./configure&& make && make install

sudo rm /usr/bin/python
sudo ln -s /usr/local/bin/python3.5 /usr/bin/python

sudo rm /usr/bin/pip
sudo ln -s /usr/local/bin/pip3 /usr/bin/pip
#pip install --upgrade pip

pip install bs4
pip install requests
pip install python-wordpress-xmlrpc
pip install lxml
pip install shadowsocks
pip install PySocks
#sudo apt-get install python-socks
#pip install socksipy-branch
#pip uninstall socksipy-branch

wget https://github.com/jedisct1/libsodium/releases/download/1.0.12/libsodium-1.0.12.tar.gz
tar xf libsodium-1.0.12.tar.gz && cd libsodium-1.0.12
./configure && make -j2 && make install
ldconfig

nohup sslocal -s krypt.91js.pw -p 30405 -l 7769 -k 密码 -t 600 -m chacha20

 

在 /etc/rc.local文件的倒数第二行添加(即exit 0前面一行)
nohup sslocal -s krypt.91js.pw -p 30405 -l 7769 -k 密码 -t 600 -m chacha20

 

sudo chown root:root /etc/rc.local
sudo chmod 755 /etc/rc.local
sudo systemctl enable rc-local.service

Debian 8 install Python3.5.1

Debian 8 x64 (jessie)
python --version
sudo apt-get update

bash: sudo: command not found.
su -
apt-get install sudo

sudo apt-get update
dpkg -l python*

sudo apt-get install build-essential -y
sudo apt-get install libncurses5-dev libncursesw5-dev libreadline6-dev -y
sudo apt-get install libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev -y
sudo apt-get install libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev -y

sudo apt-get install libssl-dev openssl

wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
tar zxvf Python-3.5.1.tgz
cd Python-3.5.1
./configure --prefix=/usr/local/python35
make all
sudo make install

安装好后把 python3 添加到PATH里,打开~/.bashrc 文件,在最后添加:
$ vi ~/.bashrc
添加
export PATH=$PATH:/usr/local/python35/bin

echo "export PATH=$PATH:/usr/local/python35/bin" >> ~/.bashrc
cat ~/.bashrc
保存后:
source ~/.bashrc

python3 --version

sudo rm /usr/bin/python /usr/bin/python2
sudo ln -s /usr/local/python35/bin/python3.5 /usr/bin/python
sudo ln -s /usr/local/python35/bin/pip3 /usr/bin/pip
sudo pip install --upgrade pip
http://www.moguf.com/post/setuppython3

ubuntu运行ss客户端

pip install shadowsocks

apt-get install build-essential
wget https://github.com/jedisct1/libsodium/releases/download/1.0.12/libsodium-1.0.12.tar.gz
tar xf libsodium-1.0.12.tar.gz && cd libsodium-1.0.12
./configure && make -j2 && make install
ldconfig

sslocal -s server_ip -p server_port -l 1080 -k password -t 600 -m chacha20

-k 密码要加"双引号"

 

 

illegal multibyte sequence

UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 840: illegal multibyte sequence

#!/usr/bin/python3
# -*- coding:utf8 -*-
import codecs

然后指定解码方式:
open("filename",'w',encoding="utf8")

Windows 安装 64位 mysql

下载mysql-5.7.19-winx64,
1.以管理员身份打开CMD
2.进入解压目录
cd C:\mysql-5.7.19-winx64\bin
3.安装:
安装并初始化,记下初始密码
mysqld --initialize --user=mysql --console

A temporary password is generated for root@localhost: hs/sIrK3g%tB
安装服务
mysqld -install
启动服务
net start mysql

修改默认密码和数据库的字符集:
mysql -u root -p
mysql> alter user root@localhost identified by "12345";
mysql> set character_set_client=utf8;
......
查看数据库的字符集是否全部为utf8
mysql> show variables like 'character%';

+--------------------------+----------------------------------------+
| Variable_name | Value |
+--------------------------+----------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | utf8 |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | C:\mysql-5.7.19-winx64\share\charsets\ |
+--------------------------+----------------------------------------+
8 rows in set, 1 warning (0.00 sec)

mysql> exit;

Python 3.5无法通过pip 直接安装Mysqldb

去第三方非官方库下载mysqlclient-1.3.10-cp35-cp35m-win_amd64.whl

http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient

pip install mysqlclient-1.3.10-cp35-cp35m-win_amd64.whl

C:\mysql-5.7.19-winx64>pip install mysqlclient-1.3.10-cp35-cp35m-win_amd64.whl
Processing c:\mysql-5.7.19-winx64\mysqlclient-1.3.10-cp35-cp35m-win_amd64.whl
Installing collected packages: mysqlclient
Successfully installed mysqlclient-1.3.10

给VPS添加SWAP交换分区

cd /var

vi fakeswap.sh

 

#!/bin/bash

SWAP="${1:-512}"

NEW="$[SWAP*1024]"; TEMP="${NEW//?/ }"; OLD="${TEMP:1}0"

umount /proc/meminfo 2> /dev/null
sed "/^Swap\(Total\|Free\):/s,$OLD,$NEW," /proc/meminfo > /etc/fake_meminfo
mount --bind /etc/fake_meminfo /proc/meminfo

free -m

 

chmod +x fakeswap.sh
sh fakeswap.sh
sh fakeswap.sh 1024
free -m

echo "/var/swapfile swap swap defaults 0 0" >>/etc/fstab

echo "cd /var && sh fakeswap.sh 6144" >> /etc/rc.d/rc.local

DHT磁力链接搜索引擎 python编写

cd /home
tar zxvf zsky.tar.gz
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl stop iptables.service
systemctl disable iptables.service
setenforce 0
sed -i s/"SELINUX=enforcing"/"SELINUX=disabled"/g /etc/sysconfig/selinux
cd zsky
yum -y install wget gcc gcc-c++ python-devel mariadb mariadb-devel mariadb-server
yum -y install epel-release python-pip redis
pip install -r requirements.txt
pip install redis
systemctl start mariadb.service
systemctl enable mariadb.service
systemctl start redis.service
systemctl enable redis.service
mysql -uroot -e"create database zsky default character set utf8mb4;"
python manage.py init_db
#建表
python manage.py create_user
#按照提示输入用户名、密码、邮箱
nohup gunicorn -k gevent --access-logfile zsky.log --error-logfile zsky_err.log manage:app -b 0.0.0.0:80 --reload>/dev/zero 2>&1&
#开启网站访问,访问日志是当前目录下zsky.log,错误日志是当前目录下zsky_err.log
#如果不想要日志 就运行下面这条命令
#nohup gunicorn -k gevent manage:app -b 0.0.0.0:80 --reload>/dev/zero 2>&1&
nohup python simdht_worker.py >/dev/zero 2>&1&

#开机自启动
chmod +x /etc/rc.d/rc.local
echo "systemctl start mariadb.service" >> /etc/rc.d/rc.local
echo "systemctl start redis.service" >> /etc/rc.d/rc.local
echo "cd /home/zsky" >> /etc/rc.d/rc.local
echo "nohup python simdht_worker.py >/dev/zero 2>&1&" >> /etc/rc.d/rc.local
echo "nohup gunicorn -k gevent manage:app -b 0.0.0.0:80 --reload>/dev/zero 2>&1&" >> /etc/rc.d/rc.local

ps -ef|grep python
kill -9 xxx
python simdht_worker.py

 

0 * * * * ps -ef | grep "python simdht_worker.py" | grep -v grep | awk '{print $2}' | xargs kill -9
1 * * * * cd /root/zsky/ && python simdht_worker.py

zsky.tar

 

/usr/bin/mysqldump  -u root -p zsky | gzip > /root/zsky.sql.gz

 

链接

blueangelhost.com

host.ag