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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>田字格字帖生成器</title> | |
| <style> | |
| body, | |
| div, | |
| p, |
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
| $("a[action-type=batselect").click(); // 点击“批量管理”按钮 | |
| // 选中所有条目 | |
| var items = $$('div.markup_choose'); | |
| for (var i=0;i<items.length;i++) { | |
| items[i].click(); | |
| } | |
| $("a[action-type=cancel_follow_all]").click() //点击“取消关注” | |
| $("a[action-type=ok]").click() // 点击“确定” |
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
| <?php | |
| declare(ticks = 1); | |
| $max = 4; | |
| $child = 0; | |
| function sig_handler($signo) { | |
| global $child; | |
| switch ($signo) { | |
| case SIGCHLD: |
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
| __lookback = setInterval(()=>{ | |
| console.log([ | |
| document.querySelector("#bottom-area > div.bottom-widgetbar-content.backtesting > div.backtesting-content-wrapper > div > div > div.report-data > div:nth-child(3) > strong").innerHTML.replace(' ',''), | |
| document.querySelector("div > div.report-data > div:nth-child(1) > p > span").innerHTML.replace(' ',''), | |
| document.querySelector("div > div.report-data > div:nth-child(5) > p > span > span").innerHTML.replace(' ','') | |
| ].join("\t")) | |
| }, 3000) | |
| clearInterval(__lookback) |
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
| const Puppeteer = require('puppeteer'); | |
| const EventEmitter = require('events'); | |
| class Emitter extends EventEmitter {} | |
| const Event = new Emitter(); | |
| Event.on('goto', async (data) => { | |
| console.log('goto:'+data.url); | |
| browser = await Puppeteer.launch({headless: false}); | |
| page = await browser.newPage(); |
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
| <?php | |
| function ip_in_china_bmp($ip, $bmp='china_ip_list.bmp') { | |
| $offset = is_numeric($ip) ? $ip : ip2long($ip); | |
| $fp = fopen($bmp, 'r'); | |
| if (fseek($fp, ceil($offset / 8) - 1)) return FALSE; | |
| $byte = fread($fp, 1); | |
| $res = $byte & pack('C', 256 >> (fmod($offset - 1, 8) + 1)); | |
| return (!$res || $res === "\0") ? 0 : 1; | |
| } |
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
| <?php | |
| function ip_in_range( $ip, $range ) { | |
| if ( strpos( $range, '/' ) == false ) { | |
| $range .= '/32'; | |
| } | |
| // $range is in IP/CIDR format eg 127.0.0.1/24 | |
| list( $range, $netmask ) = explode( '/', $range, 2 ); | |
| $range_decimal = ip2long( $range ); | |
| $ip_decimal = ip2long( $ip ); | |
| $wildcard_decimal = pow( 2, ( 32 - $netmask ) ) - 1; |
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
| var marketOrder = { | |
| orderId : 0, | |
| timeout : 60, | |
| parameters : {}, | |
| make : function(method, parameters, timeout) { | |
| var $this = this; | |
| this.timeout == (timeout === undefined ? this.timeout : timeout); | |
| this.symbol = parameters.symbol; | |
| this.parameters = parameters; | |
| this.method = method; |
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
| -- http { | |
| -- lua_shared_dict srcache 100m; | |
| -- lua_shared_dict srcount 10m; | |
| -- lua_shared_dict srlock 10m; | |
| -- server { | |
| -- rewrite_by_lua_file srcache.lua; | |
| local srcache = ngx.shared.srcache | |
| local srcount = ngx.shared.srcount |
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
| #!/bin/bash | |
| apt-get update | |
| apt-get install -y git-core autoconf bison libxml2-dev libbz2-dev libmcrypt-dev libcurl4-openssl-dev libltdl-dev libpng-dev libpspell-dev libreadline-dev | |
| mkdir -p /etc/php7/conf.d | |
| mkdir -p /etc/php7/cli/conf.d | |
| mkdir /usr/local/php7 | |
| cd /tmp | |
| git clone https://github.com/php/php-src.git --depth=1 | |
| cd php-src | |
| ./buildconf |
NewerOlder