This file contains 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', |
This file contains 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 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 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 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 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
[elasticsearch-6.x] | |
name=Elasticsearch repository for 6.x packages | |
baseurl=https://artifacts.elastic.co/packages/6.x/yum | |
gpgcheck=1 | |
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch | |
enabled=1 | |
autorefresh=1 | |
type=rpm-md |
This file contains 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
/** | |
* @license almond 0.3.2 Copyright jQuery Foundation and other contributors. | |
* Released under MIT license, http://github.com/requirejs/almond/LICENSE | |
*/ | |
//Going sloppy to avoid 'use strict' string cost, but strict practices should | |
//be followed. | |
/*global setTimeout: false */ | |
var requirejs, require, define; | |
(function (undef) { |
This file contains 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 | |
$len = count($arr); | |
for ($i = 0; $i < $len; $i++) { | |
for ($j = 0; $j < $i; $j++) { | |
if ($arr[$i] < $arr[$j]) { | |
$temp = $arr[$i]; | |
$arr[$i] = $arr[$j]; | |
$arr[$j] = $temp; |
This file contains 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 getReferer($link) | |
{ | |
$refMap = [ | |
'baidu' => '百度', | |
'sougou' => '搜狗', | |
'360' => '360', | |
'google' => '谷歌' | |
]; |
This file contains 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
server { | |
listen 80; | |
server_name domain.com www.domain.com; | |
return 301 https://www.domain.com$request_uri; | |
} | |
server { | |
listen 443; | |
server_name www.domain.com domain.com; | |
root /alidata/www/geekerism; |
NewerOlder