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 | |
$curl = curl_init(); | |
//似乎GET也可以:http://www.topspeed-network.com/action/cardDetails?number=89860424181940054639&operatorsId=3 | |
curl_setopt_array($curl, array( | |
CURLOPT_URL => "http://www.topspeed-network.com/action/cardDetails", | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_ENCODING => "", | |
CURLOPT_MAXREDIRS => 10, |
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 humanFileSize($size, $unit="") { | |
if( (!$unit && $size >= 1<<30) || $unit == "GB") | |
return number_format($size/(1<<30),2)." GB"; | |
if( (!$unit && $size >= 1<<20) || $unit == "MB") | |
return number_format($size/(1<<20),2)." MB"; | |
if( (!$unit && $size >= 1<<10) || $unit == "KB") | |
return number_format($size/(1<<10),2)." KB"; | |
return number_format($size)." bytes"; |
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
import json | |
import os | |
import sys | |
import requests | |
if len(sys.argv) != 3: | |
print('使用方法:./' + sys.argv[0] + ' url file') | |
exit(-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
import json | |
import os | |
import time | |
import yaml | |
from requests_oauthlib import OAuth2Session | |
# Azure SDK 必须这么做,因为Azure服务器可能不按顺序返回参数. | |
os.environ['OAUTHLIB_RELAX_TOKEN_SCOPE'] = '1' | |
os.environ['OAUTHLIB_IGNORE_SCOPE_CHANGE'] = '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
/* | |
* KERN_SLABALLOC.C - Kernel SLAB memory allocator | |
* | |
* Copyright (c) 2003,2004 The DragonFly Project. All rights reserved. | |
* | |
* This code is derived from software contributed to The DragonFly Project | |
* by Matthew Dillon <[email protected]> | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions |
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 | |
//composer require google/apiclient:"^2.0" | |
//composer require phpmailer/phpmailer | |
require './vendor/autoload.php'; | |
if (php_sapi_name() != 'cli') { | |
throw new Exception('This application must be run on the command line.'); | |
} |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <time.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> |
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 | |
require 'vendor/autoload.php'; | |
use Aws\CloudWatch\CloudWatchClient; | |
use Aws\Ec2\Ec2Client; | |
use Aws\Sts\StsClient; | |
// 采样10分钟数据是防止数据不对齐问题. | |
function Ec2Meters($cloudwatchClient, $instance, $MetricName) |
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
-- 只扫原生WS,不要太恐慌. | |
local stdnse = require "stdnse" | |
local http = require "http" | |
categories = { "default", "discovery", "safe" } | |
portrule = function(host, port) | |
return true | |
end |
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
{ | |
"log": { | |
"access": "/var/log/v2ray/access.log", | |
"error": "/var/log/v2ray/error.log", | |
"loglevel": "warning" | |
}, | |
"inbounds": [ | |
{ | |
"port": 60080, | |
"listen": "127.0.0.1", |