<?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
<?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); |
Systems that has AmbientCapabilities
support (usually kernel >= linux4.3)
[Unit]
Description=FRP Server Daemon
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
[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 |
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 |
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:]]*}"}" |
NGINXACCESS_WITH_FORWARD_HOST %{IPORHOST:remote_addr}(\:%{INT:remote_port})? - %{USERNAME:remote_user} \[%{HTTPDATE:time_local}\] "(?:%{WORD:method} %{NOTSPACE:request}(?: HTTP/%{NUMBER:http_version})?|%{DATA:rawrequest})" %{INT:status} %{INT:bytes_sent} %{QS:http_referer} %{QS:http_user_agent} %{QS:http_x_forwarded_for} "%{IPORHOST:http_host}"
this works for
10.88.1.12 - - [07/Jan/2017:12:13:33 +0800] "GET / HTTP/1.1" 200 21783 "http://example.com/refererUrl" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36" "1.2.3.4,4.5.6.7" "www.example2.com"
10.88.1.12:8123 - - [07/Jan/2017:12:13:33 +0800] "GET / HTTP/1.1" 200 21783 "http://example.com/refererUrl2" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36" "1.2.3.4,4.5.6.7" "www.example3.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
#!/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 | |
条件:
样本数据expr.txt
其列数未知
第一列是年份日期,第二列是时间,要求把第一二列整体代表的所在日期时间提前7583580秒(大约87.7天) 其他列原样输出
$ cat expr.txt
2016-11-04 12:03 1478232180 col2 col2 col3
2016-08-08 17:30 1470648600 col2 none
例子如下
$ awk '{gsub(/-/," ",$1 );gsub(/:/," ",$2);d=$1" "$2" 00";d=mktime(d);d=d + 7583580;d=strftime("%Y-%m-%d %H:%M",d);out="";for (i=3;i<=NF;i++){out=out" "$i};print d" "out }' expr.txt