分类 未分类 下的文章

2019年宁夏中小学幼儿园教师全员岗位培训继续教育网络培训挂机

Tampermonkey脚本

// ==UserScript==
// @name         国培计划挂机
// @namespace    http://herokay.cn/
// @version      0.1
// @description  try to take over the world!
// @author       herokay
// @match        http://nxgp2019.w.px.teacher.com.cn/home/student/*/course/learn/*
// @grant        none
// @require      file:///D:/ocrad.js
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    window.alert = function(txt)
    {
        console.info(txt);
    }
    function recognize_image()
    {
        OCRAD(document.getElementById("pxCheckCode"), {
            numeric: true
        }, function(text){
            $('#inputvalcode1').val(text);
            console.info( text);
            $('#comfirmButtonTo').click();
        })
    }
    function run()
    {
        // recognize_image() ;
        //console.info(TimeNum);

        if(TimeNum>600)
        {
            if( $('#btn_min').attr('class')=='max')
            {
                btnOclick();
                setTimeout("$('#inputvalcode1').click();",5000);
            }
            else
            {
                setTimeout("$('#inputvalcode1').click();",5000);
            }
            if($("#pxCheckCode").is(":visible"))
            {
                recognize_image();
            }
        }
    }
    setInterval(run, 10000);
})();

将ocrd.js文件放入D盘根目录
Tampermonkey插件设置为可访问本地文件

ocrad.zip

树莓派Nginx + PHP7.3 + mysql


在 Pi 的终端运行以下命令

sudo apt-get update
php扩展可以一个一个安装,缺哪个按如下方式安装即可
sudo apt-get install php7.3-fpm php7.3-cli php7.3-curl php7.3-gd php7.3-cgi
sudo apt-get install php7.3-mysqli
sudo service php7.3-fpm restart

sudo apt-get install nginx
sudo service nginx start

修改nginx配置

sudo nano /etc/nginx/sites-available/default

重启nginx
sudo service nginx restart

安装mysql

sudo apt install mariadb-server
mysql添加用户密码
create user pi@localhost identified by 'raspberry';
grant all privileges on *.* to pi@localhost identified by 'raspberry';
flush privileges; 

参考:http://shumeipai.nxez.com/2018/04/25/install-pi-dashboard-with-nginx-php7-on-pi.html