Skip to content

Instantly share code, notes, and snippets.

View jjsty1e's full-sized avatar

jjsty1e jjsty1e

View GitHub Profile
@jjsty1e
jjsty1e / zentao.php
Created March 24, 2023 05:31
禅道bug提醒
<?php
try {
// 请求头
$headers = [
'Content-Type: application/json',
];
$payload = json_encode([
'msgtype' => 'markdown',
@jjsty1e
jjsty1e / concurrency.php
Created March 21, 2023 01:54
PHP并发请求测试
<?php
// 循环次数
$batch = 10;
// 请求地址
$url = 'http://example.com/';
// 请求头
<?php
$pharFile = 'bin/fanyi.phar';
if (file_exists($pharFile)) {
unlink($pharFile);
}
$phar = new Phar($pharFile);
<?php
$data = [
(object)[],
(object)[]
];
echo json_encode($data) . "\n";
echo json_encode($data, JSON_FORCE_OBJECT);
@jjsty1e
jjsty1e / lsmod
Last active March 30, 2018 08:24
ls extend
#!/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
#########################################################################
[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
@jjsty1e
jjsty1e / mq.js
Created September 7, 2017 10:13
web qq中的一份js代码
/**
* @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) {
@jjsty1e
jjsty1e / sort.php
Created June 14, 2017 06:09
my sort
<?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;
@jjsty1e
jjsty1e / keng.php
Last active June 14, 2017 00:13
php大坑
<?php
function getReferer($link)
{
$refMap = [
'baidu' => '百度',
'sougou' => '搜狗',
'360' => '360',
'google' => '谷歌'
];
@jjsty1e
jjsty1e / nginx.conf
Created June 7, 2017 08:02
nginx.conf
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;