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
@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
[variable]
var1=5
var2=1
var3=800
var4=
var5=
var6=
var7=
var8=
pos1=3211553
netsh interface ip add dns "區域連線" 208.67.222.222
netsh interface ip add dns "區域連線" 208.67.220.220
<?php
$type = array('jpg', 'jpeg', 'gif', 'png');
$dir = './pic';
if($handle = opendir($dir)) {
while(false !== ($file = readdir($handle))) {
$ext = pathinfo($file);
$ext = $ext['extension'];
if($file != "." && $file != ".." && in_array($ext, $type)) {
$files[] = $file;
@echo off
ffmpeg -i "%~f1" -vf scale=-2:480 "%~n1_resize.mp4"
@echo off
echo -----------------------------------------------------------
echo Copyright (c) 2007 HKLCF. All rights reserved.
echo -----------------------------------------------------------
echo Processing ... Please wait
del /f /s /q "%systemdrive%\*.tmp"
del /f /s /q "%systemdrive%\*._mp"
del /f /s /q "%systemdrive%\*.log"
del /f /s /q "%systemdrive%\*.gid"
del /f /s /q "%systemdrive%\*.chk"
net time /setsntp:stdtime.gov.hk
net stop w32time
net start w32time
Sub ReadData(StockNo As String)
Columns("A:D").Clear
webURL = "URL;http://www.aastocks.com/tc/ltp/RTQuoteContent.aspx?symbol=" & StockNo & "&process=y"
With ActiveSheet.QueryTables.Add(Connection:=webURL, Destination:=Range("A1"))
.RefreshStyle = xlOverwriteCells
.WebTables = "6"
.Refresh BackgroundQuery:=False
End With
@echo off
echo -----------------------------------------------------------
echo Copyright (c) 2007 HKLCF. All rights reserved.
echo -----------------------------------------------------------
echo Processing ... Please wait
netstat -na
ipconfig /all
echo. & pause
@echo off
echo -----------------------------------------------------------
echo Copyright (c) 2007 HKLCF. All rights reserved.
echo -----------------------------------------------------------
echo Processing ... Please wait
ipconfig /all > ipconfig_all.txt
ping 192.168.0.1 > ping_gateway.txt
ping 210.6.236.1 > ping_dhcp.txt
ping 203.186.94.20 > ping_dns01.txt
ping 203.186.94.22 > ping_dns02.txt