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
<?php
/**
* Get Google Page Speed Screenshot
*
* Uses Google's Page Speed API to generate a screenshot of a website.
* Returns the image as a base64 jpeg image tag
*
* Usage Example:
* echo getGooglePageSpeedScreenshot("http://ghost.org", 'class="thumbnail"');
*
// ==UserScript==
// @name Ctrl+Enter for HKGalden
// @version 0.1
// @description add Ctrl+Enter function for HKGalden
// @include http://www.hkgalden.com/*
// @include https://www.hkgalden.com/*
// @match http://www.hkgalden.com/*
// @match https://www.hkgalden.com/*
// @author 超膠
// ==/UserScript==
@echo off
cls
set hdd=C:\
cd %hdd%
set name=bootlog.txt
echo ####################>>%name%
date /T>>%name%
time /T>>%name%
exit
net stop wuauserv
del %systemroot%\SoftwareDistribution\DataStore\*.* /f /s /q
net start wuauserv
Sub SendEmails()
Dim olApp As Outlook.Application
Dim olMail As MailItem
Dim i As Integer
Dim myEmailAttach As String
Set olApp = New Outlook.Application
i = 1
myEmailAddress = ThisWorkbook.Sheets(1).Range("B1").Offset(i, 0)
fsutil file Createnew a.txt 104857600
@echo off
color 0A
echo -----------------------------------------------------------
echo Copyright (c) 2007 HKLCF. All rights reserved.
echo -----------------------------------------------------------
echo Processing ... Please wait
echo/
echo -----------------------------------------------------------> Netowrk_Test_Report.txt
echo Copyright (c) 2007 HKLCF. All rights reserved.>> Netowrk_Test_Report.txt
echo ----------------------------------------------------------->> Netowrk_Test_Report.txt
@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
@echo off
echo -----------------------------------------------------------
echo Copyright (c) 2007 HKLCF. All rights reserved.
echo -----------------------------------------------------------
echo Processing ... Please wait
netstat -na
ipconfig /all
echo. & pause
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