Skip to content

Instantly share code, notes, and snippets.

@luhaoming
luhaoming / jcbhelper.user.js
Last active August 1, 2023 04:31
jcb keyboard helper
// ==UserScript==
// @name jcbhelper.user
// @namespace http://tampermonkey.net/
// @version 0.4
// @description try to take over the world!
// @author You
// @match https://ezweb.easycard.com.tw/Event01/JCBLoginRecordServlet*
// @match https://ezweb.easycard.com.tw/Event01/JCBLoginServlet*
// @icon https://www.google.com/s2/favicons?sz=64&domain=easycard.com.tw
// @grant none
@luhaoming
luhaoming / poya_voucher.user.js
Last active September 7, 2022 01:36
get poya vouchers
// ==UserScript==
// @name poya_vouchers
// @namespace http://tampermonkey.net/
// @version 0.7
// @description try to take over the world!
// @author Haoming (葉大雄)
// @match https://www.poyabuy.com.tw/V2/ECoupon/List*
// @icon https://www.google.com/s2/favicons?sz=64&domain=poyabuy.com.tw
// @grant none
// ==/UserScript==
@luhaoming
luhaoming / yahoo_chkin.user.js
Last active August 2, 2022 03:35
yahoo checkin
// ==UserScript==
// @name yahoo checkin
// @namespace http://tampermonkey.net/
// @version 0.6
// @description try to take over the world!
// @author haoming
// @match https://*.yahoo.com/points/checkin?id=*
// @icon https://www.google.com/s2/favicons?sz=64&domain=yahoo.com
// @grant none
// ==/UserScript==
// ==UserScript==
// @name yahoo coupon
// @namespace http://tampermonkey.net/
// @version 0.4
// @description 領取yahoo全站
// @author Haoming
// @match https://tw.buy.yahoo.com/coupons/brand?bdid=*
// @match https://tw.buy.yahoo.com/coupons
// @icon https://www.google.com/s2/favicons?sz=64&domain=yahoo.com
// @source
@luhaoming
luhaoming / fblink_sanitizer .user.js
Last active November 23, 2018 02:34
Facebook link sanitizer
@luhaoming
luhaoming / remove_cygwin.cmd
Created November 14, 2018 04:25
remove cygwin at windows7
## remove registry
reg delete /f HKEY_CURRENT_USER\Software\Cygwin
reg delete /f HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
## remove shortcut
del c: /s "cygwin*.lnk"
## remove files
rd /s/q c:\cygwin64
@luhaoming
luhaoming / vpnuser.sh
Created August 31, 2018 05:32
openvpn user management
vpnuser make <username>
vpnuser dele <username>
@luhaoming
luhaoming / chkssl.sh
Last active March 7, 2018 02:52
check ssl cert expiration
#!/bin/bash
DAYS=30
RECIPIENT="username@email.com"
while read TARGET
do
if [ -z "$TARGET" ];then continue; fi
@luhaoming
luhaoming / dateFormat.js
Last active April 11, 2022 15:17
xuite javascripts
/*
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
* MIT license
*
* Includes enhancements by Scott Trenda <scott.trenda.net>
* and Kris Kowal <cixar.com/~kris.kowal/>
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.
@luhaoming
luhaoming / cpualert.vbs
Created January 18, 2018 01:48
cpualert.vbs
'==== summary =====
' 每10分鐘測試CPU使用率, 若連續測試超過10次 則透過SMTP寄送警訊給管理者
' 如有需要, 修改以下內容
' objMessage.Subject 警訊內容
' objMessage.From 寄件人
' objMessage.To    收件人
' objMessage.TextBody 警訊內容
' 提供寄信的SMTP主機
' objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver
'==== summary =====