Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block luhaoming

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
luhaoming / fblink_sanitizer .user.js
Last active Nov 23, 2018
Facebook link sanitizer
View fblink_sanitizer .user.js
luhaoming / remove_cygwin.cmd
Created Nov 14, 2018
remove cygwin at windows7
View remove_cygwin.cmd
## remove registry
reg delete /f HKEY_CURRENT_USER\Software\Cygwin
## remove shortcut
del c: /s "cygwin*.lnk"
## remove files
rd /s/q c:\cygwin64
luhaoming /
Created Aug 31, 2018
openvpn user management
vpnuser make <username>
vpnuser dele <username>
luhaoming /
Last active Mar 7, 2018
check ssl cert expiration
while read TARGET
if [ -z "$TARGET" ];then continue; fi
luhaoming / dateFormat.js
Last active Jan 18, 2018
xuite javascripts
View dateFormat.js
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <>
* MIT license
* Includes enhancements by Scott Trenda <>
* and Kris Kowal <>
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.
View cpualert.vbs
'==== summary =====
' 每10分鐘測試CPU使用率, 若連續測試超過10次 則透過SMTP寄送警訊給管理者
' 如有需要, 修改以下內容
' objMessage.Subject 警訊內容
' objMessage.From 寄件人
' objMessage.To    收件人
' objMessage.TextBody 警訊內容
' 提供寄信的SMTP主機
' objMessage.Configuration.Fields.Item ("
'==== summary =====
luhaoming /
Created Dec 25, 2017
full and diff backup with 7zip at linux
# daily backup
# last update 2017-12-25
function usage {
echo "$1 not set"
echo "usage: "
echo "7zback <BackToPath> <Bac
luhaoming / pchome.cmd
Last active Dec 4, 2017
daily download pchome by bitsadmin
View pchome.cmd
:: @echo off
:: daily download pchome by bitsadmin
set /a dt=%date:~0,4%%date:~5,2%%date:~8,2%
set pchome=!3c.htm
bitsadmin.exe /transfer "download" %pchome% d:\local\downloads\pchome.html
luhaoming / withBig5.php
Created Oct 18, 2017
check the string contains big5 charactor
View withBig5.php
function withBig5($arg_strContent)
$blnEnglishOnly= true;
$intLoopCount = 0;
$intContentLength = strlen($arg_strContent);
while ($intLoopCount < $intContentLength)
$chrSingle = substr($arg_strContent,$intLoopCount,1);
if(ord($chrSingle) > 0x80)
luhaoming / bootnotice.cmd
Created Oct 18, 2017
bootnotice at windows
View bootnotice.cmd
@echo off
::boot notice
:: change these setting
set upw=yourpass
set title="Boot Notice"
set emailclient="D:\tasks\sendEmail.exe"
You can’t perform that action at this time.