显示标签为“Linux”的博文。显示所有博文
显示标签为“Linux”的博文。显示所有博文

2012年10月11日星期四

[Linux] Connect to My EC2


To use SSH connect to my EC2:

ssh -i "key file" ubuntu@ec2-23-23-28-26.compute-1.amazonaws.com

To use SCP copy file to my EC2:

ssh -i "key file" "source file" ubuntu@ec2-23-23-28-26.compute-1.amazonaws.com:"destination file"

Now I plan to deploy Django on my EC2 server!

2012年10月9日星期二

[Linux] Auto Indent in Vim


Basically, other IDE already support this function.
For VIM, we have to type in following command in ~/.vimrc

set cindent
set smartindent
set autoindent
set expandtab
set tabstop=2
set shiftwidth=2

Also, there is a documentation about indent in VIM available here:

2011年7月19日星期二

[Linux] VirtualBox里debian的分辨率修改

之前使用VirtualBox安装debian,发现没有办法改分辨率,很难受。
经过查找,找到了x-windows修改分辨率的方法: 

使用gtf 1280 800 60得到要修改的代码,修改/etc/X11/xorg.conf如下: 

Section "Monitor" 
Identifier "Configured Monitor"
Option "DPMS"
Modeline "1280x800_60.00" 83.46 1280 1344 1480 1680 800 801 804 828 -HSync +Vsync
Modeline "1024x768_60.00" 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync
EndSection
 

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
SubSection   "Display"
Modes "1280x1024_60.00" "1024x768_60.00"
EndSubSection
EndSection