<?php
return call_user_func(function () {
$defaultIncludes = [];
$composerAutoload = [];
$composerAutoload[] = (getenv("COMPOSER_HOME") ?: getenv("HOME") . '/.composer/') . '/vendor/autoload.php';
$composerAutoload[] = getcwd() . DIRECTORY_SEPARATOR . '/vendor/autoload.php';
foreach ($composerAutoload as $autoloader) {
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 | |
set -eu | |
install_dir=${install_dir:-'/opt/ihipop/'} | |
run_user=${run_user:-'www-data'} | |
[[ "${install_dir}" = "" || "${install_dir}" = "/" ]] && { echo install_dir ${install_dir} is not Valid ;exit 1;} | |
function trim() { | |
local var="$*" | |
# remove leading whitespace characters | |
var="${var#"${var%%[![:space:]]*}"}" |
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 | |
Swoole\Runtime::enableCoroutine(); | |
$processContainer = []; | |
for ($i = 0; $i < 2; $i++) { | |
$process = new \Swoole\Process(function (\Swoole\Process $workerProcess) { | |
\Swoole\Coroutine::create(function () use ($workerProcess) { | |
while (true) { | |
$socket = $workerProcess->exportSocket(); | |
$pid = posix_getpid(); | |
echo 'Idle:' . $pid . PHP_EOL; |
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
{ | |
"response": { | |
"allExpress": [ | |
{ | |
"display": 1, | |
"name": "申通快递", | |
"id": 1 | |
}, | |
{ | |
"display": 1, |
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 create_uuid() | |
{ | |
$str = md5(uniqid(mt_rand(), true)); | |
$uuid = substr($str, 0, 8) . '-'; | |
$uuid .= substr($str, 8, 4) . '-'; | |
$uuid .= substr($str, 12, 4) . '-'; | |
$uuid .= substr($str, 16, 4) . '-'; | |
$uuid .= substr($str, 20, 12); |
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
#!/usr/bin/env python3 | |
# -*- encoding: utf-8 -*- | |
# Created on 2016-11-23 | |
# ihipop@gmail.com | |
import requests, time, random, json | |
from pprint import pprint | |
import logging | |
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
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Firefox | |
Name[bg]=Firefox | |
Name[ca]=Firefox | |
Name[cs]=Firefox | |
Name[el]=Firefox | |
Name[es]=Firefox | |
Name[fa]=Firefox | |
Name[fi]=Firefox |
https://pgp.mit.edu/pks/lookup?op=vindex&search=0xFB2582AB8263F3DD
- 101AA90D 加密专用
- 4E017563 签名专用
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 | |
#touchpad_toggle.sh | |
action=${1:-'auto'} | |
#echo $action; | |
declare -i ID | |
ID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'` | |
declare -i STATE | |
if [ "$action" == "off" ];then | |
STATE=1; | |
elif [ "$action" == "on" ];then |
apt-get install fonts-droid-fallback ttf-wqy-zenhei ttf-wqy-microhei fonts-arphic-ukai fonts-arphic-uming xfonts-wqy ttf-mscorefonts-installer \
fonts-noto-cjk
IN Ubuntu 16.04 LTS