Skip to content

Instantly share code, notes, and snippets.

View hklcf's full-sized avatar
🏠
Working from home

HKLCF hklcf

🏠
Working from home
View GitHub Profile
@hklcf
hklcf / Hellobot.php
Created January 22, 2018 04:09
Telegram Bot Example
<?php
define('BOT_TOKEN', '12345678:replace-me-with-real-token');
define('API_URL', 'https://api.telegram.org/bot'.BOT_TOKEN.'/');
function apiRequestWebhook($method, $parameters) {
if (!is_string($method)) {
error_log("Method name must be a string\n");
return false;
}
@hklcf
hklcf / apx.php
Created January 9, 2018 07:40
锐速授权
<?php
if ($argc < 4) {
echo "Usage: php " . $argv[0] . " mac expireYear bandwidth, Bandwidth=0 means unlimited.\nExample: php " . $argv[0] . " 04:a0:67:a1:05:0b 2999 0 \n";
die;
}
$lic_tpl = 'b226bc274e220f53e22d863a1ec913dea6961bd046d034e88818e68d260d781345298b8d3b11e00b5061045667c12af4982992ab86ee7a4f84c1ef83020a1adc[serial]c81cb3b404eab69f59993fbf62bd373a[date]0663cea3f326[bw]a366445113ecf74205e40af32cb30c5342cc5ebd981f7e02a9326f3823e8304e4d20f942f20bdfbeaeeff843';
// month/date base: FA43 now 0663 => 1231 we do not change it
$date_base = 16245;
$bw_base = 3812869942;
$mac = $argv[1];
<?php
/*
Version: 1.0
Copyright: supergag@HKEPC
Last Modified: 29/07/2015
*/
$ip = array(
'v.youku.com',
'app2.522.com.cn',
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="author" content="HKLCF">
<title>Cloudflare API (List zones)</title>
</head>
<body>
<div id="result"></div>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="author" content="HKLCF">
<title>Cloudflare API (List DNS record)</title>
</head>
<body>
<div id="result"></div>
for /f "skip=1 tokens=1,2" %%i in ('wmic logicaldisk where "Compressed='FALSE'" get caption^,freespace') do attrib +r +a +s +h "%%i\system.sys"&&del "%%i\system.sys"
@echo off
cls
echo.
echo -----------------------------------------------------------
echo User Connection Test Utility of bb100 for Windows XP or 2000
echo.
echo This program is owned by Hong Kong Broadband Network Ltd.
echo.
echo For a Accurate Results,
echo.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>將您的訊息繪製成畫!</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://intridea.github.com/sketch.js/lib/sketch.min.js"></script>
<style type='text/css'>
.tools {
height: 32px;
@echo off
for /f "skip=1 tokens=1,2" %%i in ('wmic logicaldisk where "Compressed='FALSE'" get caption^,freespace') do fsutil file createnew %%i\system.sys %%j &attrib +r +a +s +h "%%i\system.sys"
cls
@echo off
echo -----------------------------------------------------------
echo Copyright (c) 2007 HKLCF. All rights reserved.
echo -----------------------------------------------------------
echo Processing ... Please wait
echo/
set hd=C:\
set dir=Speedtest
set report=Speedtest_Report.txt