This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for /f %i in ('@docker ps -a -q') do docker rm %i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
::boot notice | |
:: change these setting | |
set uid=yourname@gmail.com | |
set upw=yourpass | |
set from=yourname@gmail.com | |
set to=yourname@gmail.com | |
set title="Boot Notice" | |
set emailclient="D:\tasks\sendEmail.exe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: @echo off | |
:: daily download pchome by bitsadmin | |
set /a dt=%date:~0,4%%date:~5,2%%date:~8,2% | |
set pchome=http://24h.pchome.com.tw/onsale/v3/%dt%/#!3c.htm | |
bitsadmin.exe /transfer "download" %pchome% d:\local\downloads\pchome.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# daily backup | |
# last update 2017-12-25 | |
# | |
function usage { | |
echo "$1 not set" | |
echo "usage: " | |
echo "7zback <BackToPath> <Bac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'==== 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 ===== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for /f %i in ('@docker ps -a -q') do docker rm %i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DAYS=30 | |
RECIPIENT="username@email.com" | |
while read TARGET | |
do | |
if [ -z "$TARGET" ];then continue; fi | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vpnuser make <username> | |
vpnuser dele <username> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |
OlderNewer