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 | |
| ######################################################################### | |
| # File Name: Advanced_ls_commond.sh | |
| # Author: LookBack | |
| # Email: admin#dwhd.org | |
| # Version: | |
| # Created Time: 2015年09月09日 星期三 03时52分41秒 | |
| # usage: wget -cq http://www.dwhd.org/script/lsmod -O /bin/lsmod && chmod +x /bin/lsmod && echo 'alias ls="/bin/lsmod"' >> ~/.bashrc && . ~/.bashrc | |
| ######################################################################### |
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 | |
| $data = [ | |
| (object)[], | |
| (object)[] | |
| ]; | |
| echo json_encode($data) . "\n"; | |
| echo json_encode($data, JSON_FORCE_OBJECT); |
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 | |
| $pharFile = 'bin/fanyi.phar'; | |
| if (file_exists($pharFile)) { | |
| unlink($pharFile); | |
| } | |
| $phar = new Phar($pharFile); |
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 | |
| // 循环次数 | |
| $batch = 10; | |
| // 请求地址 | |
| $url = 'http://example.com/'; | |
| // 请求头 |
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 | |
| try { | |
| // 请求头 | |
| $headers = [ | |
| 'Content-Type: application/json', | |
| ]; | |
| $payload = json_encode([ | |
| 'msgtype' => 'markdown', |
OlderNewer