跳到主要內容

發表文章

user specific sshd config

When ssh to some AWS EC2 AMI such as RedHat , Amazon Linux and Ubuntu, ssh will prompt some message like below: Please login as the user "ec2-user" rather than the user "root". The secret is here: # cat /root/.ssh/authorized_keys no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"ec2-user\" rather than the user \"root\".';echo;sleep 10" Summary: You can define user-specific sshd config in ~/.ssh/authorized_keys file

[Android] Trigger

This app Trigger formerly known as NFC Task Launcher. You can trigger tasks (change profile) not only by NFC by also Wifi, Bluetooth status....etc... So, give it a try, it's great! NFC Smart Tags! http://www.youtube.com/watch?v=LfkFgtoQtFQ

Sync facebook upcoming events to Google calendar

Login your facebook account > Events > Setting Icon > Export links for import Copy the links and login to Google Calendar > Other Calendars > Add by URL sync calendar from URL After that, you can have your facebook events in Google Calendar, and with Cal app , it's a wonderful user experience to get noticed for my events :>

netsted hypervisor in ESXi 5.1

check if ESXi can support VHV https://[your-esxi-host-ip-address]/mob/?moid=ha-host&doPath=capability check filed "nestedHVSupported" create a VM with "Hardware Version 9" choose VM type as "Others 64bit" ssh into ESXi, modify {VM}.vmx +vhv.enable = "true" !guestOS = "vmkernel5" REF: http://www.virtuallyghetto.com/2012/08/how-to-enable-nested-esxi-other.html

upload single ssh public key for all ec2 regions

Prerequisite: EC2-API-Tools ssh-keygen to create ssh key pairs on linux Parameters:   region names: such as ap-southeast-2,.... keypair-names: for example, my-ec2-keypairs for r in us-east-1 ues-east-2 us-west-1 us-west-2 ap-southeast-1 ap-southeast-2 eu-west-1; do ec2-import-keypair --region $r your-keypair-name --public-key-file ~/.ssh/id_rsa.pub ; done REF: http://aws.typepad.com/aws/2010/09/new-amazon-ec2-feature-bring-your-own-keypair.html http://www.pyrosoft.co.uk/blog/2010/10/27/import-your-own-rsa-ssh-key-into-amazon-ec2/

time filed and time taken field in IIS log

IIS 的 log file 有一些很有趣的東西。分別是 time filed 和最後的 time taken欄位。 如果有一筆record長成這樣: #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip sc-status sc-substatus sc-win32-status time-taken 2012-11-28 22:25:17 192.168.0.21 GET /Main.aspx - 80 AWalker 192.168.0.100 200 0 0 764 那麼 time filed 的 22:25:17 代表的是 request 送到 server 的時間嗎? time taken filed 的 764 則是代表 server 共花了 0.764 second 完成了這項 request,那要怎麼定義完成? server 送出就算了嗎? 我的答案是: 22:25:17 是 server 完成這筆 request 的時間。client 發出這筆 request 的 時間必需往前回推。 而 time taken 則會包括 client acknowledge 的時間,並不僅僅是 server 運算處理完畢的時間。 ref: what-does-the-time-field-in-the-log-indicate-exactly time-vs-time-taken-fields-in-iis-logging http://forums.iis.net/t/1188041.aspx

VMware vSphere Client release console not work in Parallels

在 Parallels 裡面的VM使用 VMware vSphere Client 時,一但點進 VM 的 console 後, 就會沒辦法 release console。 這是因為 vSphere 和 Parallels 都用了 "ctrl + alt" 這組熱鍵。解決的方法就是改掉 Parallels 的熱鍵設定。但是 Parallels 8 以後,就不能在 Preferences 裡面改 "Release Input"  的設定了。新的設定方式是要在 Mac 的 KeyBoard 裡新增 App 的熱鍵。 Ref:  CTRL + ALT Release Input Parallels Desktop shortcut cannot be changed in Preferences