跳到主要內容

發表文章

VMware vCenter 6.0 Appliance and Flash Read Cache

這幾天玩了 vCenter 6.0 的 deploy,跟以前版本比較不一樣的是沒有直接提供 linux base 的 vCenter Server Appliance,而是要先找一台 Windows VM,mount 上 vCenter Server Appliance 的 iso 然後再用 Firefox 打開 iso 裡的 html 去做 deploy 和 upgrade。 關鍵字就是,要先用 VM mount iso 還有要用 Firefox 開。 另外還有試玩了一下 VMware Fash Read Cache。 這跟之前把 SSD storage 拿來當 host swap cache 用途不一樣 要透過 vSphere web client > ESXi host > Manage > Settings > Virtual Flash > Flash Read Cache Resource Management 來打開。 之前拿去當 host swap cache 的 SSD 是不能再拿來當 Flash Read Cache 的,所以如果之前有把 SSD 設定成 host swap cache 要先刪掉,這樣 SSD 才可以被 Flash Read Cache 使用。 Flash Read Cache 是依照 VM 的 Disk 來設定的,所以如果VM的 Disk 是由很多個小 Disk 組成的,那麼就要一個一個  Disk 去設定 cache 的大小。 還有 VM Hardware Version 要10 以上,不然即使透過 web client 去設定 VM disk device 也不會看到有 Virtual Flash Read Cache 的選項。 Fash Read Cache 拿來當 vCenter Appliance 或者 read loading 比較重的 VM application 可能有些幫助, 我是覺得比以前只能拿來當 host swap cache 有用一點點啦.....

Putty Terminal Setting for CentOS

一樣的 shell 和 putty 設定,但是 Debian 或者 Ubuntu 的 command line 下, Home / End 鍵正常,但是 CentOS 卻不能使用。 原來 CentOS 可以裝 ncurses-term 這個 package,這樣 terminal 就可以使用 putty-256color 。 Putty > Connection > Data > Terminal-type string > putty-256color screenrc 裡面則是不要再手動設定 terminal,這樣 Home / End 鍵在 command line 就可以正常使用啦~ Update: fix-typo... no dash between 256 and color...

Artistic Automatic Code Formatter

可以自動重排 C / C++ / Java / C# 的工具   Artistic 目前喜歡的參數… (~/.astylerc) --style=linux --indent=force-tab --pad-header --pad-oper Sublime AStyleFormatter Plugin 預設值是 --style=google --indent 是看 sublime 的設定 indent 其實比較喜歡 space=4,可是 team 裡好像是用 tab 比較多。我只是不能忍受 space 和 tab 在同一個檔案裡混用… 對於 bracket style / pad-oper 和 pad-header 則是有莫名的強迫症傾向…

Jenkins CI build verison

目前的 project 是會去讀某個特定檔案裡的字串來當作 installer 的版號 而且剛好 build 環境有裝 perl 所以要用 Jenkins 的 build 版號來取代那個特定的檔案就變得超容易 set /a BUILD_VER=%BUILD_NUMBER%+2140 perl -pi.bak -e 's/2140/%BUILD_VER%/g' src\path\to\version.h -p  processes, then prints  <>  line by line -i  activates in-place editing. Files are backed up using the  .bak  extension REF:  How to replace a string in an existing file in Perl?

wxWidget with Visual Studio

wxWidgets Compile Option:     UNICODE=1 SHARED=1 VENDOR=xxx MONOLITHIC=1 Visual Studio x64/Release Project Properties: C/C++ > General > Additional Include Directories:     "C:\wxWidgets-2.9.4\lib\vc_x64_dll\mswu";     "C:\wxWidgets-2.9.4\include"; C/C++ > Preprocessor > Preprocessor Definitions:     WXUSINGDLL; _UNICODE Linker > General > Additional Library Directories:     "C:\wxWidgets-2.9.4\lib\vc_x64_dll" Linker > Input > Additional Dependencies:     "wxmsw29u.lib" Hints:     Include path 記得要設定到對的path, 因為 setup.h 在很多個目錄都可能會出現,在我的環境裡我要使用的是 " C:\wxWidgets-2.9.4\lib\vc_x64_dll\mswu\wx\setup.h ",如果設錯的會,compiler 會抱怨找不到  wxbase294.lib ... 但這個檔案應該是錯誤的,他真的不存在,選到正確的 path 後就不會該 error  了       如果沒有設定正確的 Additional Dependencies 會出現 unresolved external symbol 如下的 compile error.... error LNK2019: unresolved external symbol "__declspec(dllimport) pub...

windows 7 瘦身

為什麼喜歡用 OSX ? 我想有一半以上的原因是因為它的字體吧! 雖然 windows 的瀏覽器可以用微軟正黑體或者 Google Noto Fonts 但我還是很不習慣 windows 系統預設過於纖細且不平衡的字體.... 以前勤奮的時候還會用 GDI++ or MacFonts 去渲染系統的字型 但是 OSX 一裝好就都不用再做其他調整真的讓我很開心... 但有時候還是得要用 windows 例如公司專案的 Microsoft Visual Studio...選者 vSphere Client 在 Parallels 裡面用 Garena 打 LoL...etc... Windows VM 要怎麼瘦身呢? 關閉系統還原點 關閉 Hibernation: powercfg /h off 討人厭的 winsxs: 清理磁碟空間的時候,點選清理系統檔案  ( KB52386 ) 刪除%systemroot%/software distrobution/download 裡面的暫存檔 不過這樣我的 winsxs 還是有將近 10G... 我想還是要等 windows 10 出來後,看能不能讓 windows 不要再越用越肥大了... 或說我把用了一年的 Mavericks 升級到 Yosemite 瞬間多了 30多G 的可用空間出來... OSX 真的是太強大了.... Ref:  Disk Cleanup Wizard addon lets users delete outdated Windows updates on Windows 7 SP1 or Windows Server 2008 R2 SP1