跳到主要內容

發表文章

目前顯示的是 2014的文章

Windows Logon Type

Logon Type 2 – Interactive( 本機登入 ) Logon Type 3 – Network( 網路登入, Netbios 、 IIS 等登入方式 ) Logon Type 4 – Batch( 排程等批次 ) Logon Type 5 – Service( 服務 ) Logon Type 7 – Unlock( 解除螢幕鎖定 ) Logon Type 8 – NetworkCleartext( 網路明文登入, IIS ASP 登入 ) Logon Type 9 – NewCredentials( 新身份登入,通常為 RunAs 方式 ) Logon Type 10 – RemoteInteractive( 遠端登入,例如 Terminal Server 、 RDP 等方式,但 Windows 2000 沒有此類型,歸類為 Type2) Logon Type 11 – CachedInteractive( 快取登入 )

How do I compile ffmpeg on a QNAP NAS

Tested on QNAP TS-419p+ with ARM CPU, but should work the same way for others. Install “Optware (IPKG)” qpkg from  http://www.qnap.com/qpkg.asp In case the “ipkg update” fails, try to adjust the following two config files: [/opt/etc/ipkg] # more tsx19-kmod.conf src/gz cs08q1armel http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable [/opt/etc/ipkg] # more tsx19.conf src/gz cs08q1armel http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable ipkg update ipkg install optware-devel ipkg install git ipkg install yasm ipkg install lame mkdir /opt/compile cd /opt/compile git clone git://git.videolan.org/ffmpeg.git cd ffmpeg ./configure --enable-ssse3 --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame make make install replace built-in ffmpeg with link to new version rm /usr/bin/ffmpeg ln -s /opt/bin/ffmpeg /usr/bin http://bubbl

HTC Desire 816

教你如何正確將你的HTC Desire 816 官方解鎖 http://lbear.pixnet.net/blog/post/57481803 教你如何Root 你的HTC Desire 816 http://lbear.pixnet.net/blog/post/57481869-%E6%95%99%E4%BD%A0%E5%A6%82%E4%BD%95root-%E4%BD%A0%E7%9A%84htc-desire-816 LetsGoApp使用者指南 http://www.letsgoapp.net/?p=688

Squid refresh-pattern

套用沒有明確定義Expire or Cache-Control:max-age的Req fresh_pattern [-i] regexp min percent max [options] min參數是分鐘數量。它是過時響應的最低時間限制。如果某個響應駐留在cache裡的時間沒有超過這個最低限制,那麼它不會過期。 max參數是存活響應的最高時間限制。如果某個響應駐留在cache裡的時間高於這個最高限制,那麼它必須被刷新。 LM-factor算法 LM-factor=(response age)/(resource age)。 resource age =對象進入cache的時間-對象的last_modified response age =當前時間-對象進入cache的時間 假設源服務器上www.aaa.com/index.htm-----lastmodified 是 2007-04-10 02:00:00 squid上 proxy.aaa.com/index.htm index.htm進入cache的時間 2007-04-10 03:00:00 1)如果當前時間 2007-04-10 03:00:00 resource age =3點-2點=60分鐘 response age =0分鐘 index.htm還可以在cache停留的時間(resource age)*20%=12分鐘 也就是說,index.htm進入cache後,可以停留12分鐘,才被重新確認。 2)如果當前時間 2007-04-10 03:05:00 resource age =3點-2點=60分鐘 response age =5分鐘 index.htm還可以在cache停留的時間(resource age)*20%=12-5=7分鐘 LM-factor=5/60=8.3%<20% 一直到2007-04-10 03:12:00 LM-factor=12/60=20% 之後,cache中的頁面index.htm終於stale。 如果這時沒有index.htm的請求,index.htm會一直在緩存中 如果有index.htm請求,squid收到該請求後,由於已經過期, squid會向源服務器發一個index.htm是否有改變的請求

Microsoft System Powershell

$compObject = get-wmiobject -query "select * from SMS_R_SYSTEM WHERE Name='[computername]'" -computername [sccm-server] -namespace "ROOT\SMS\site_[yoursite]" $compObject.psbase.delete() Remove-DisabledMonitoringObject Remove-SCOMDisabledClassInstance # To find out what options are available to your output of the list of objects in the group use Get-Member (GM) cmdlet Get-SCOMGroup -DisplayName "UR Computer Group" | Get-SCOMClassInstance | GM # after looking at the GM output we decide that DisplayName will work best Get-SCOMGroup -DisplayName "UR Computer Group" | Get-SCOMClassInstance | sort DisplayName |FT DisplayName For UIGeneratedMonitor: Get-SCOMMonitor | where {$_.name -eq "UIGeneratedMonitorGUID#"} | select DisplayName For UIGeneratedRule: Get-SCOMRule | where {$_.name -eq "MomUIGeneratedRuleGUID#"} | select DisplayName Create SCOM 2012 Subscribers using PowerShell Add-SCOMNotificationSubscr

Hyper-V 計量

適用於Windows 2012 R2 Hyper-V Enable-VMResourceMetering Reset-VMResourceMetering Disable-VMResourceMetering Measure-VM –VMName Greendale-VM $report = Measure-VM –VMName Greendale-VM $report | Format-List Get-VM vm-guest-name | Enable-VMResourceMetering Get-VM vm-guest-name | Measure-VM | select * (Measure-VM -VMName vm-guest-name).NetworkMeteredTrafficReport Add-VMNetworkAdapterAcl -VMName SQL2012 -Action Meter -RemoteIPAddress 10.10.0.0/16 -Direction Outbound Parameter Set: VMName Add-VMNetworkAdapterAcl [-VMName] <String[]> -Action <VMNetworkAdapterAclAction> -Direction <VMNetworkAdapterAclDirection> [-ComputerName <String[]> ] [-LocalIPAddress <String[]> ] [-LocalMacAddress <String[]> ] [-Passthru] [-RemoteIPAddress <String[]> ] [-RemoteMacAddress <String[]> ] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>] Parameter Set: ManagementOS Add-VMNetworkAdapterAcl -Action <VM

Windows Server 2012 R2切換操作介面

Import-Module ServerManager 完整伺服器→基本伺服器(GUI操作) Uninstall-WindowsFeature Server-Gui-Shell -Restart 完整伺服器→核心伺服器 Uninstall-WindowsFeature Server-Gui-Mgmt-Infra -Restart 核心伺服器→完整伺服器 Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell -Restart Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell -Restart -Source wim:d:\sources\install.wim:2 核心伺服器→基本伺服器(GUI操作) Install-WindowsFeature Server-Gui-Mgmt-Infra -Restart Install-WindowsFeature Server-Gui-Mgmt-Infra -Restart -Source wim:d:\sources\install.wim:2 完整伺服器→桌面體驗 Install-WindowsFeature Desktop-Experience -Restart

在system volume information出現Volume Shadow大容量檔案,修改Shadow Copy存放位置時出現錯誤訊息: 0x8004231d

假設:快照來源為O碟,快照目的地為D碟 請先檢查快照有沒有停用 列出所有快照檔案 vssadmin list shadowstorage Resize快照檔案(如不做此動作,會出現0x8004231d錯誤訊息) vssadmin resize shadowstorage /for=O: /on=D: /maxsize=320mb 刪除快照設定 vssadmin delete shadowstorage /for=O: /on=D:

Linux壓力測試

DD function dd_direct () {     setup     dd if=/dev/zero of=/mnt/dest/zero bs=$1 count=$2 oflag=direct     cleanup } function dd_nodirect () {     setup     dd if=/dev/zero of=/mnt/dest/zero bs=$1 count=$2     cleanup } dd_direct 1M 10000  dd_direct 16M 625  dd_direct 1G 10  dd_nodirect 1M 10000  dd_nodirect 16M 625  dd_nodirect 1G 10  IOZone function iozone_async () {     setup     iozone -c -e -s 10G -r $1 -i 0 -i 1 -i 2 -i 3 -i 4 -i 5 -i 6 -i 7 -f /mnt/dest/iozone     cleanup } function iozone_sync () {     setup     iozone -o -c -e -s 10G -r $1  -i 0 -i 1 -i 2 -i 3 -i 4 -i 5 -i 6 -i 7 -f /mnt/dest/iozone     cleanup } iozone_async 1M   iozone_async 4M  iozone_async 8M  iozone_async 16M  iozone_sync 1M  iozone_sync 4M  iozone_sync 8M  iozone_sync 16M

Adobe Lightroom 5.4序號

修改hosts 127.0.0.1 activate.adobe.com 序號 1160-4443-1009-6768-3227-9416 1160-4903-6679-7869-8158-3458 1160-4048-7192-7859-0182-7092 1160-4540-5427-1256-6156-5887 1160-4574-1162-8484-6639-6832 1160-4416-5580-8572-8618-2655 1160-4539-1638-1168-8548-0562

還原Exchange 2010 mailbox

1.New-MailboxDatabase -Name "RDB" -Server SRVEXMBS1 -EDBFilePath "E:\MAILBOX\RDB.edb" –Logfolderpath "D:\MAILBOX" -Recovery 2.還原使用者到SRVEXMBS1的RDB 3.New-MailboxRestoreRequest -SourceDatabase RDB -SourceStoreMailbox '$Displayname' -TargetMailbox '$Displayname' 4.Dismount-Database "RDB" 查看還原狀態 Get-MailboxRestoreRequest 參考文章 http://blogs.technet.com/b/dpm/archive/2012/04/16/restoring-exchange-2010-mailbox-databases-to-rdb-using-system-center-data-protection-manager.aspx http://www.testlabs.se/blog/2010/01/02/restore-single-user-mailbox-content-using-exchange-2010-and-dpm-2010-beta-2/