MySQL 创建定时任务

查看是否开启

show variables like '%sche%';

开启

set global event_scheduler =1;

查看已经存在的定时任务

SELECT * FROM information_schema.EVENTS;

 

use database;

create event test
on schedule every 60 second
do

[something];

 

UPDATE Files SET usr_id=8362 WHERE usr_id=0 AND file_created BETWEEN '2018-01-16 00:00:00.000000' AND '2019-01-02 08:00:00.000000'

 

via https://segmentfault.com/a/1190000005142597

DDCC

ipstresser.com

webstresser.org

兑换商

Exchange webmoney and paypal
http://exwp.com/index_en.html
汇率最佳,24h到帐,已兑换1500 WMZ

Exchange BTC to WMZ
https://btc2wm.me/

BTC to CNY
https://www.alfacashier.com/

BTC to CNY
https://www.megachange.is/en/

SQL服务器搭建

Ubuntu 16.04.2 LTS

sudo apt-get update
sudo apt-get install apache2
sudo systemctl restart apache2

sudo apt-get install mysql-server
mysql_secure_installation
sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
sudo apt install unzip
#sudo apt-get install php-mbstring

cd /var/www/html/
wget https://files.phpmyadmin.net/phpMyAdmin/4.7.6/phpMyAdmin-4.7.6-all-languages.zip
unzip -x *.zip
mv phpMyAdmin-4.7.6-all-languages phpmyadmin
sudo systemctl restart apache2

/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

1.ping 远程地址 判断远端服务网络正常

2.telnet 远程地址 端口号,拒绝了访问3306端口
telnet 192.168.99.100 3306

3.
vi /etc/mysql/mysql.conf.d/mysqld.cnf
修改MySQL配置文件,将bind_address = 127.0.0.1注释掉或修改成0.0.0.0
sudo /etc/init.d/mysql restart

netstat -an|grep 3306
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN

4.编辑后重启mysql ,再次查看3306端口
telnet 192.168.99.100 3306

5.授权访问,
用root身份登录到mysql,使用grant命令分配权限,
如果操作所有库就把 database_name.* 改成 *.* ,user_name是用户名,%是所有ip地址可访问,
如果限制固定ip访问就改成ip,user_password是密码,
mysql -uroot -p
mysql> grant all on database_name.* to user_name@'%' identified by 'user_password';
mysql> flush privileges; #让权限立即生效
mysql> exit;

开启慢查询
mysql -uroot -p
set global slow_query_log=ON;
set global long_query_time=1;
set global log_queries_not_using_indexes = 1;
将字符编码设置为UTF-8
set character_set_database=utf8;
set character_set_server=utf8;

show variables like '%char%';

mysql> show variables like '%char%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)

phpmyadmin
Users overview
User name Host Password Global privileges Grant
root % Yes ALL PRIVILEGES Yes

客户端连接:

mysql -u 用户名 -p密码 -h 服务器IP地址 -P 服务器端MySQL端口号 -D 数据库名

注意:
(1)服务器端口标志-P一定要大些以区别于用户-p,如果直接连接数据库标志-D也要大写;
(2)如果要直接输入密码-p后面不能留有空格如-pmypassword;
(3)命令结束段没有';'分号。

例子:
mysql -u lzpddd -pmypassword -h 192.168.1.88 -P 3306 -D mydb

闲置服务器的CPU算力挖XMR

Centos 6

矿池:xmr.nanopool.org

yum -y install epel-release
yum -y install centos-release-scl cmake3 hwloc-devel libmicrohttpd-devel openssl-devel
yum -y install devtoolset-4-gcc*
yum -y install git
scl enable devtoolset-4 bash
git clone https://github.com/fireice-uk/xmr-stak-cpu xmr-stak
cd xmr-stak

#调整百分之二的开发者捐赠
sed -i 's/2.0/0.0/g' donate-level.h
cmake3 .
make install

cd /root/xmr-stak/bin
先运行一遍
./xmr-stak-cpu

会给出推荐的CPU配置信息,将它编辑进config.txt,并填写钱包地址、矿池地址、Payment ID等信息
httpd_port 设置http访问端口,可以用网页查看矿机状态

"cpu_threads_conf" :
[
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 0 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 1 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 2 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 3 },
],
"pool_address" : "xmr-eu1.nanopool.org:14444",
"wallet_address" : "42bhDV2R5zF4KkQ5maiwJCiiwxckdhTcqEFGgwggbr938TXNC5Di6d8jXqrT3anyZ22j7DEE74GkbVcQFyH2nNiC3fpvU7j.0648b3bdea5e2d3a63bb2bbb9ee7592abab7728bc93e18d3ddac22c21937fed8",
"pool_password" : "x",
"httpd_port" : 3128,
正式运行:
./xmr-stak-cpu
EDIT: 关于Payment ID:
openssl rand -hex 32

EDIT: 关于Linux下挖矿出现MEMORY ALLOC FAILED: mmap failed
解决方案:
sysctl -w vm.nr_hugepages=128
echo "* soft memlock 262144" >> /etc/security/limits.conf
echo "* hard memlock 262144" >> /etc/security/limits.conf
reboot

编译好的绿色版(centos 6 x64)

bin

卸载阿里云自带监控程序

wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh

chmod +x quartz_uninstall.sh
./quartz_uninstall.sh

rm -f /usr/sbin/aliyun-service
rm -rf /usr/local/aegis
killall -9 aliyun-service > /dev/null 2>&1

Python 调用 zip 压缩和解压

zip.exe和unzip.exe下载 放到C:\Windows\System32 下面

 

使用SpeedTest给自己的VPS测速

speedtest_cli

 

打包python文件成exe格式

1. 直接在命令行用pip安装 pyinstaller
pip install pyinstaller

2. 下载安装pyinstaler运行时所需要的windows拓展---pywin32
pywin32:http://sourceforge.net/projects/pywin32/files/pywin32/
点击最新的Build再点击pywin32-219.win-amd64-py2.7.exe(这里要根据你的windows x86或者x64和你的python版本来选择)

3.在命令行中切换到要打包的程序所在目录,直接输入下面的指令即可
pyinstaller -F -w demo.py

 

Via

取出多个文件夹里面的第一图片,并以文件夹命名

manga