<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DkUBRH09cCp7ImA9WhBUFUw.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984</id><updated>2013-05-03T01:04:15.368+08:00</updated><category term="ruby" /><category term="growl" /><category term="icq" /><category term="router" /><category term="ant" /><category term="ant java" /><category term="cli" /><category term="qq" /><category term="java" /><category term="cygwin" /><category term="Dvorak" /><category term="CentOS" /><category term="ipad" /><category term="Gmail" /><category term="finder" /><category term="youtube" /><category term="Windows" /><category term="GTask" /><category term="kindle" /><category term="msn" /><category term="terminal" /><category term="git" /><category term="shell" /><category term="gem" /><category term="Linux" /><category term="iTerm" /><category term="webos" /><category term="mac" /><category term="palm" /><category term="ruby on rail" /><category term="openvpn" /><category term="freebsd" /><category term="vim" /><category term="alpine" /><category term="eclipse" /><category term="heroku" /><category term="Android" /><category term="Articles" /><category term="svn" /><category term="ZFS" /><title>AMing Blog</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://aming-blog.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Tommy Lau</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>59</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/AmingBlog" /><feedburner:info uri="amingblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CkUDRnw7eSp7ImA9WhVWE08.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-8922330450212028919</id><published>2012-04-25T10:17:00.001+08:00</published><updated>2012-04-25T10:17:57.201+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-25T10:17:57.201+08:00</app:edited><title>Download Google Drive for mac</title><content type="html">The Google Drive is debut and ready for use. Following is the link for the Google Drive installer for mac&lt;br /&gt;
&lt;br /&gt;
http://dl.dropbox.com/u/15969780/installgoogledrive.dmg&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/grOtwyJvGpw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/8922330450212028919/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2012/04/download-google-drive-for-mac.html#comment-form" title="1 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/8922330450212028919?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/8922330450212028919?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/grOtwyJvGpw/download-google-drive-for-mac.html" title="Download Google Drive for mac" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2012/04/download-google-drive-for-mac.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQESXg7eCp7ImA9WhVTGUs.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-6033343167426530162</id><published>2012-02-06T20:15:00.002+08:00</published><updated>2012-03-06T00:01:48.600+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-06T00:01:48.600+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="CentOS" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rail" /><title>Ruby on Rails on CentOS 5.7</title><content type="html">I am trying to deploy a rails application on the CentOS 5.7.&lt;br /&gt;
&lt;br /&gt;
Here is the steps I used to deploy a Rails application on a clean CentOS 5.7. Please comment if you have any suggestions.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Install Prereq Package&lt;/li&gt;
&lt;code&gt;yum update -y yum install -y curl curl-devel mysql mysql-server mysql-devel httpd httpd-devel autoconf automake binutils gcc gcc-c++ zlib-devel openssl-devel readline-devel apr-devel apr-util-devel /sbin/chkconfig --levels 235 mysqld on /sbin/chkconfig --levels 234 httpd on &lt;/code&gt;
&lt;li&gt;Install Ruby&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Step 1: Download&lt;/li&gt;
&lt;code&gt;# Source code: version 1.8.7-2011.12 curl -O http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-1.8.7-2011.12.tar.gz &lt;/code&gt;
&lt;li&gt;Step 2: Install&lt;/li&gt;
&lt;code&gt;# Extract it: tar xzvf ruby-enterprise-1.8.7-2011.12.tar.gz # Run the installer (completely safe, none of your system files will be touched!): ./ruby-enterprise-1.8.7-2011.12/installer # Simply press Enter if asking for your input &lt;/code&gt;
&lt;li&gt;Step 3 Install Passenger&lt;/li&gt;
&lt;code&gt;/opt/ruby-enterprise-1.8.7-2011.12/bin/passenger-install-apache2-module # Simply press Enter if asking for your input &lt;/code&gt;
&lt;li&gt;Step 4: Make Phusion Passenger use Ruby Enterprise Edition instead of regular Ruby&lt;/li&gt;
&lt;code&gt;# Follow the instructions that the Ruby Enterprise Edition installer gave you. &lt;/code&gt;
&lt;li&gt;Step 5: Add Ruby enterprise to path&lt;/li&gt;
&lt;code&gt;export PATH=/opt/ruby-enterprise-1.8.7-2011.12/bin:$PATH &lt;/code&gt; &lt;/ul&gt;&lt;li&gt;Reboot&lt;/li&gt;
&lt;code&gt; reboot &lt;/code&gt;
&lt;li&gt;Deploy the rails app&lt;/li&gt;
&lt;code&gt;&lt;span style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;1. gem install rubygems-update&lt;/span&gt;&lt;div style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt;"&gt;2. update_rubygems&lt;/div&gt;&lt;div style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt;"&gt;3. gem install sqlite3 -v '1.3.5'&amp;nbsp;&lt;/div&gt;# create /etc/httpd/conf.d/passenger.conf&lt;/code&gt;&lt;code&gt;# LoadModule passenger_module /opt/ruby-enterprise-1.8.7-2011.12/lib/ruby/gems/1.8/gems/passenger-3.0.11/ext/apache2/mod_passenger.so # PassengerRoot /opt/ruby-enterprise-1.8.7-2011.12/lib/ruby/gems/1.8/gems/passenger-3.0.11
# PassengerRuby /opt/ruby-enterprise-1.8.7-2011.12/bin/ruby 
# 
# &amp;nbsp;virtualhost *:80="" /virtualhost 
# &amp;nbsp; &amp;nbsp;ServerName server_name/server_name 
# &amp;nbsp; &amp;nbsp;DocumentRoot app_dir/public/app_dir 
# &amp;nbsp; &amp;nbsp;SetEnv rails_env production 
# &amp;nbsp; &amp;nbsp; directory="" app_dir="" p="" public=""=""/app_dir=""/directory 
# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Allow from all 
# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Options -MultiViews 
#
# &lt;/code&gt;&lt;code&gt;# Place the rails app under 
# Configuration of the database setting. Open the &lt;app_dir&gt;/config/database.yml with editor&lt;/app_dir&gt; 
# Change the username and password under the production tag according the database settings 
# For example2: 
# production: 
# &amp;nbsp;adapter: mysql2 
# &amp;nbsp;encoding: utf8 
# &amp;nbsp;database: production 
# &amp;nbsp;username: 
# &amp;nbsp;password: 
# &amp;nbsp;socket: /var/lib/mysql/mysql.sock&lt;/code&gt;&lt;/ol&gt;&lt;ol&gt;&lt;li&gt;Init the rails app&lt;/li&gt;
&lt;code&gt;/opt/ruby-enterprise-1.8.7-2011.12/bin/bundle install --no-deployment --without development --without test # Run only if the db is not created and the user has privilege to create database. # RAILS_ENV=production /opt/ruby-enterprise-1.8.7-2011.12/bin/rake db:create RAILS_ENV=production /opt/ruby-enterprise-1.8.7-2011.12/bin/rake db:migrate RAILS_ENV=production /opt/ruby-enterprise-1.8.7-2011.12/bin/rake assets:precompile &lt;/code&gt;  &lt;code&gt;# change the permissions of the application's directory chown -R apache:apache &lt;app_dir&gt;&lt;/app_dir&gt; chmod -R u=rw,g=r,o-rwx &lt;app_dir&gt;&lt;/app_dir&gt; chmod -R ug+X &lt;app_dir&gt;&lt;/app_dir&gt; chcon -R -u system_u -t httpd_sys_content_t &lt;app_dir&gt;&lt;/app_dir&gt; &lt;/code&gt;
&lt;li&gt;restart http server&lt;/li&gt;
&lt;code&gt; /etc/init.d/httpd restart &lt;/code&gt;  &lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/MUwIXw87jtk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/6033343167426530162/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2012/02/ruby-on-rails-on-centos-57.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/6033343167426530162?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/6033343167426530162?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/MUwIXw87jtk/ruby-on-rails-on-centos-57.html" title="Ruby on Rails on CentOS 5.7" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2012/02/ruby-on-rails-on-centos-57.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYMR385eip7ImA9WhdXE04.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-8209482780547515009</id><published>2011-08-23T15:54:00.002+08:00</published><updated>2011-08-26T12:49:46.122+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-26T12:49:46.122+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="freebsd" /><title>HOWTO: Setup a Pure-FTPd server with virtual users on FreeBSD</title><content type="html">&lt;h2&gt;Pure-FTPd&lt;/h2&gt;&lt;br /&gt;
Pure-FTPd is a free (BSD), secure, production-quality and standard-conformant FTP server.&lt;br /&gt;
&lt;br /&gt;
This guide provides instructions for using the virtual user system to  manage and control users. By using virtual users, FTP accounts can be  administrated without affecting system accounts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class="title"&gt;Push commits&lt;/span&gt;&lt;br /&gt;
&lt;p&gt;Let's initiate Pure-FTPd's installation by entering the following commands:&lt;br /&gt;
&lt;/p&gt;&lt;code&gt;% su&lt;br /&gt;
# portsnap fetch update&lt;br /&gt;
# cd /usr/ports/ftp/pure-ftpd&lt;br /&gt;
# make config&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
A menu containing Pure-FTPd options will pop-up. In my case, I've opted to leave these options at their defaults.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;# make install clean&lt;br /&gt;
# rehash&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Having finished the installation process we now move into the  configuration stage. We'll start by copying the sample configuration  file and set the configuration options:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;# cd /usr/local/etc&lt;br /&gt;
# cp pure-ftpd.conf.sample pure-ftpd.conf&lt;br /&gt;
# chmod 644 pure-ftpd.conf&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The &lt;i&gt;chmod&lt;/i&gt; command was run to be able to edit the file (default permissions are set to -r--r--r--).&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;# vi pure-ftpd.conf&lt;br /&gt;
&lt;br /&gt;
VerboseLog yes&lt;br /&gt;
PureDB /usr/local/etc/pureftpd.pdb&lt;br /&gt;
CreateHomeDir yes&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The &lt;i&gt;CreateHomeDir&lt;/i&gt; option makes adding virtual users more easy by creating a user's home directory upon login (if it doesn't already exist).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can either import users with system-level accounts (defined in &lt;i&gt;/etc/master.passwd&lt;/i&gt;)  at once or create new users manually. To import users that already  exist on your system into the virtual user database, enter these  commands:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;# pure-pwconvert &amp;gt;&amp;gt; /usr/local/etc/pureftpd.passwd&lt;br /&gt;
# chmod 600 /usr/local/etc/pureftpd.passwd&lt;br /&gt;
# pure-pw mkdb&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
It should be noted that &lt;i&gt;pure-pwconvert&lt;/i&gt; only imports accounts that have shell access. Accounts with the shell set to &lt;i&gt;nologin&lt;/i&gt; have to be added manually.&lt;br /&gt;
&lt;br /&gt;
To add users to the Pure-FTPd virtual user database manually, we need to  create a system-level account that will be associated with virtual  users. Create a new user named &lt;i&gt;vftp&lt;/i&gt; like this:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;# pw useradd vftp -s /sbin/nologin -w no -d /usr/home/vftp\&lt;br /&gt;
? -c "Virtual FTP user" -m&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Having done this we can now add users to the virtual users database using the commands below:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;# pure-pw useradd user -u vftp -g vftp -d /usr/home/vftp/user&lt;br /&gt;
# pure-pw mkdb&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Replace &lt;i&gt;user&lt;/i&gt; with the desired username. With &lt;i&gt;-d&lt;/i&gt; flag, the user will be chrooted. If you want to give user access to the whole filesystem, use &lt;i&gt;-D&lt;/i&gt; instead of &lt;i&gt;-d&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
If you want to add additional users, just repeat the commands above with a different user.&lt;br /&gt;
&lt;br /&gt;
To remove a user:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;# pure-pw userdel user&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to start Pure-FTPd:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;# /usr/local/etc/rc.d/pure-ftpd onestart&lt;/code&gt;&lt;br /&gt;
Initiate a FTP connection to test the server:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;% ftp localhost&lt;br /&gt;
&lt;br /&gt;
Trying 127.0.0.1...&lt;br /&gt;
Connected to localhost.&lt;br /&gt;
220---------- Welcome to Pure-FTPd [TLS] ----------&lt;br /&gt;
220-You are user number 2 of 50 allowed.&lt;br /&gt;
220-Local time is now 13:39. Server port: 21.&lt;br /&gt;
220-IPv6 connections are also welcome on this server.&lt;br /&gt;
220 You will be disconnected after 15 minutes of inactivity.&lt;br /&gt;
Name (localhost:username):&lt;/code&gt;&lt;br /&gt;
Now log in with a user account created as explained above. Commands such as &lt;i&gt;ls&lt;/i&gt;, &lt;i&gt;cp&lt;/i&gt;, &lt;i&gt;pwd&lt;/i&gt; and &lt;i&gt;less&lt;/i&gt; work just like in tcsh and bash shells. To quit the FTP session type &lt;i&gt;exit&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
To configure Pure-FTPd to start at boot time:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;# echo 'pureftpd_enable="YES"' &amp;gt;&amp;gt; /etc/rc.conf&lt;/code&gt;&lt;br /&gt;
To restart Pure-FTPd and determine if it is running:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;# /usr/local/etc/rc.d/pure-ftpd restart&lt;br /&gt;
# /usr/local/etc/rc.d/pure-ftpd status&lt;/code&gt;&lt;br /&gt;
Pure-FTPd provides useful features for personal users as well as  hosting providers. I've only touched the tip of the iceberg so do take a  look at the project's website for the excellent documentation that is  available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reference: http://forums.freebsd.org/showthread.php?t=591 &lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/ZPrlTPxmxJc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/8209482780547515009/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/08/howto-setup-pure-ftpd-server-with.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/8209482780547515009?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/8209482780547515009?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/ZPrlTPxmxJc/howto-setup-pure-ftpd-server-with.html" title="HOWTO: Setup a Pure-FTPd server with virtual users on FreeBSD" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/08/howto-setup-pure-ftpd-server-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cEQXo_fyp7ImA9WhdTGUU.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-8791468384047683387</id><published>2011-07-18T19:36:00.002+08:00</published><updated>2011-07-18T19:36:40.447+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-18T19:36:40.447+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Task Killers - Helping or Hurting?</title><content type="html">This is, hands down, the most commonly held conversation I have with any  new, current, or prospective Android user since the G1. It has occupied  space on every forum I have ever been to, and continues to be a staple  conversation in the community. So here we go, I am going to do my best  to answer this question here and now; Are Task Killing apps helping or  hurting our phones?&lt;br /&gt;
Task Killers were amongst the first 5,000 apps in the Market, and can be  seen in the form of dozens now, all claiming differences in performance  and functionality. The basic concept is the same for all of them, being  that a list is shows with how much memory each running app is using and  a big button to "kill" the running app, in order to free up space to  make everything else run faster. The applications do perform this job.  The app is halted and memory is freed. For a moment or two anyways.  Android was built to handle multi-tasking intelligently, and part of  this is resource resolution. I look to Android Engineer Dianne Hackborne  for backup.&lt;br /&gt;
Applications may seem present to the user without an actual process  currently running the app; multiple applications may share processes, or  one application may make use of multiple processes depending on its  needs; the process(es) of an application may be kept around by Android  even when that application is not actively doing something.&lt;br /&gt;
&lt;br /&gt;
So when you kill an application, you are killing all related services,  even if those services are being used to help other applications. So,  for example, you are trying to download a movie, and you decide the app  controlling the download needs more memory, so you kill any apps you  arent using. It's possible that, all of a sudden, you will nolonger be  downloading your movie, because you unknowingly killed a process  handling that download. Make sense?&lt;br /&gt;
Before you go there, I know. You have been in the IT field since the  lightbulb and you know what tasks you are killing and you know that they  are helping and you have never had a problem. Sure, I will admit that  if you know exactly what you are doing, and you are just that starved  for resources, you can use a Task Killer for some momentary relief of  memory. This would be very helpful for someone who felt they required  that level of control, except Android already does that. Here's the  application life cycle chart!&lt;br /&gt;
&lt;br /&gt;
&lt;div class="readableBigImage"&gt;&lt;img alt="" class="readable_class_big_image" height="711" src="http://4.bp.blogspot.com/_pBGp_D2eOHc/TFda3PBSZQI/AAAAAAAAARY/cPG0OgpzrOM/s1600/activitylifecycle.png" width="545" /&gt;&lt;/div&gt;&lt;br /&gt;
See? Android already has things built into the life cycle of every  application that monitors for whether or not an app needs more memory,  and is already prepared to handle any apps not in use. Additionally,  applications that are considered "critical" like the Phone app (you do  remember that these things make calls right?) will suspend all activity,  granting priority to that application. With this evidence, plus the  thousands that I have seen who claim that their phones run faster  without Task Killers than with them, I feel confident in saying that  Task Killing applications can often be more harmful than useful, and I  recommend not installing them at all. If you already have one installed,  uninstall it for a week, and if what I am saying here is not helpful,  write me and let me know!&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/GH4s-Z3JTAE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/8791468384047683387/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/07/task-killers-helping-or-hurting.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/8791468384047683387?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/8791468384047683387?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/GH4s-Z3JTAE/task-killers-helping-or-hurting.html" title="Task Killers - Helping or Hurting?" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_pBGp_D2eOHc/TFda3PBSZQI/AAAAAAAAARY/cPG0OgpzrOM/s72-c/activitylifecycle.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/07/task-killers-helping-or-hurting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YEQXw_fCp7ImA9WhZaEk4.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-625866682281571504</id><published>2011-06-28T11:18:00.000+08:00</published><updated>2011-06-28T11:18:20.244+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-28T11:18:20.244+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="freebsd" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><title>How to find size of a directory &amp; Free disk space</title><content type="html">&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;b&gt;'du' - Finding the size of a directory&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ du&lt;/b&gt;&lt;br /&gt;
Typing the above at the prompt gives you a list of directories                    that exist in the current directory along with their sizes.                    The last line of the output gives you the total size of the                    current directory including its subdirectories. The size given                    includes the sizes of the files and the directories that exist                    in the current directory as well as all of its subdirectories.                    Note that by default the sizes given are in kilobytes. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;b&gt;$                    du /home/david&lt;/b&gt;&lt;br /&gt;
The above command would give you the directory size of the directory                    /home/david&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ du -h&lt;/b&gt;&lt;br /&gt;
This command gives you a better output than the default one.                    The option '-h' stands for &lt;i&gt;human readable format&lt;/i&gt;. So                    the sizes of the files / directories are this time suffixed                    with a 'k' if its kilobytes and 'M' if its Megabytes and 'G'                    if its Gigabytes.&lt;/span&gt;                 &lt;br /&gt;
&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
$ du -ah&lt;/b&gt;&lt;br /&gt;
This command would display in its output, not only the directories                    but also all the files that are present in the current directory.                    Note that 'du' always counts all files and directories while                    giving the final size in the last line. But the '-a' &lt;i&gt;displays&lt;/i&gt;                    the filenames along with the directory names in the output.                    '-h' is once again human readable format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;b&gt;$                    du -c&lt;/b&gt;&lt;br /&gt;
This gives you a &lt;i&gt;grand total&lt;/i&gt; as the last line of the                    output. So if your directory occupies 30MB the last 2 lines                    of the output would be&lt;br /&gt;
&lt;br /&gt;
30M .&lt;br /&gt;
30M total&lt;br /&gt;
&lt;br /&gt;
The first line would be the default last line of the 'du' output                    indicating the total size of the directory and another line                    displaying the same size, followed by the string '&lt;i&gt;total&lt;/i&gt;'.                    This is helpful in case you this command along with the grep                    command to only display the final total size of a directory                    as shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ du -ch | grep total&lt;/b&gt;&lt;br /&gt;
This would have only one line in its output that displays the                    total size of the current directory including all the subdirectories.&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;&lt;b&gt;Note :&lt;/b&gt; In case you are not familiar with                    pipes (which makes the above command possible) refer to &lt;a href="http://www.codecoffee.com/tipsforlinux/articles/24.html"&gt;Article                    No. 24&lt;/a&gt; . Also grep is one of the most important commands                    in Unix. Refer to &lt;a href="http://www.codecoffee.com/tipsforlinux/articles/25.html"&gt;Article No. 25&lt;/a&gt; to know                    more about grep.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ du -s&lt;/b&gt;&lt;br /&gt;
This displays a summary of the directory size. It is the simplest                    way to know the total size of the current directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;$                    du -S&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
This would display the size of the current directory excluding                    the size of the subdirectories that exist within that directory.                    So it basically shows you the total size of &lt;i&gt;all the files&lt;/i&gt;                    that exist in the current directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;$                    du --exculde=mp3&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
The above command would display the size of the current directory                    along with all its subdirectories, &lt;i&gt;&lt;b&gt;but&lt;/b&gt;&lt;/i&gt; it would                    exclude all the files having the given pattern present in their                    filenames. Thus in the above case if there happens to be any                    mp3 files within the current directory or any of its subdirectories,                    their size &lt;i&gt;would not be included&lt;/i&gt; while calculating the                    total directory size.&lt;br /&gt;
&lt;br /&gt;
- &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt; 'df' - finding the disk free space / disk usage&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ df&lt;/b&gt;&lt;br /&gt;
Typing the above, outputs a table consisting of 6 columns. All                    the columns are very easy to understand. Remember that the 'Size',                    'Used' and 'Avail' columns use kilobytes as the unit. The 'Use%'                    column shows the usage as a percentage which is also very useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ df -h&lt;/b&gt;&lt;br /&gt;
Displays the same output as the previous command but the '-h'                    indicates &lt;i&gt;human readable format&lt;/i&gt;. Hence instead of kilobytes                    as the unit the output would have 'M' for Megabytes and 'G'                    for Gigabytes. &lt;br /&gt;
&lt;br /&gt;
Most of the users don't use the other parameters that can be                    passed to 'df'. So I shall not be discussing them.&lt;br /&gt;
&lt;br /&gt;
I shall in turn show you an example that I use on my machine.                    I have actually stored this as a script named &lt;i&gt;'usage&lt;/i&gt;'                    since I use it often. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt; Example :&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
I have my Linux installed on /dev/hda1 and I have mounted my                    Windows partitions as well (by default every time Linux boots).                    So 'df' by default shows me the disk usage of my Linux as well                    as Windows partitions. And I am only interested in the disk                    usage of the Linux partitions. This is what I use :&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ df -h | grep /dev/hda1 | cut -c 41-43&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This command displays the following on my machine&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;45%&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Basically this command makes 'df' display the disk usages of                    all the partitions and then extracts the lines with /dev/hda1                    since I am only interested in that. Then it cuts the characters                    from the 41st to the 43rd column since they are the columns                    that display the usage in % , which is what I want.&lt;br /&gt;
&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/S8my6Nwt00g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/625866682281571504/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/06/how-to-find-size-of-directory-free-disk.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/625866682281571504?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/625866682281571504?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/S8my6Nwt00g/how-to-find-size-of-directory-free-disk.html" title="How to find size of a directory &amp; Free disk space" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/06/how-to-find-size-of-directory-free-disk.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUBRXk-cSp7ImA9WhZVGUo.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-7699785726448771163</id><published>2011-06-02T09:30:00.000+08:00</published><updated>2011-06-02T09:30:54.759+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-02T09:30:54.759+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="webos" /><category scheme="http://www.blogger.com/atom/ns#" term="GTask" /><title>GTask v1.0.0</title><content type="html">WebOS client for the Google Task. Keep track of what you need to do. Manage you task list and synchronize with the Google Task.&lt;br /&gt;
&lt;br /&gt;
Have been a WebOS user for a year. I am also a user of the Google Task. I  cannot find a good application to synchronize between my Palm pre phone  and the Google task. Recently Google has release its Task API for access  task list through Restful interface. So I make a WebOS Google Task client. It is easy to use just get the authorization to access the task list by  login the Google account. The task will be available as list format on  the device.&lt;br /&gt;
&lt;br /&gt;
This is the first version, only have limited functions:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Login to the Google Task for access right.&lt;/li&gt;
&lt;li&gt;Get the list of tasks from the Google task.&lt;/li&gt;
&lt;li&gt;Remove the task from the list.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Any comments are welcome.&lt;br /&gt;
&lt;br /&gt;
Ref: https://developer.palm.com/appredirect/?packageid=info.xming.gtask&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/hQ3GFyU7mg8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/7699785726448771163/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/06/gtask-v100.html#comment-form" title="3 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/7699785726448771163?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/7699785726448771163?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/hQ3GFyU7mg8/gtask-v100.html" title="GTask v1.0.0" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/06/gtask-v100.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QNSX07cSp7ImA9WhZWE0w.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-926190217176706826</id><published>2011-05-12T12:44:00.000+08:00</published><updated>2011-05-14T04:43:18.309+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-14T04:43:18.309+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="vim" /><title>Removing carriage returns from MS-DOS (^M) in VIM</title><content type="html">If you ever try to edit a MS-DOS file, you'll notice that each line ends with a ^M character. This is caused by the funny way that MS-DOS treats the end-of-line. (For some background on this problem take a look at The EOL Story.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Remove the ^M in Vim&lt;br /&gt;
&lt;/h2&gt;To remove the ^M characters from a MS-DOS file, enter the command:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;:%/{Ctrl+V}{Ctrl+M}//{Enter}&lt;/blockquote&gt;&lt;br /&gt;
This command starts with a colon (:) to tell Vim to enter ex mode. All ex start with a line number range, in this case its from the first line (1) to the last ($). The slash indicates the start of the "from text". The {Ctrl+V} tells Vim to treat the next character as a regular character even if it's a special one. The next character is {Ctrl+M}. (This would be treated as {Enter} without the {Ctrl+V}.) The next slash ends the "from text". What follows is the "to text" enclosed by slashes. In this case it's nothing (//).&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Not display the ^M&lt;br /&gt;
&lt;/h2&gt;You also can &lt;br /&gt;
&lt;blockquote&gt;:set fileformats=dos&lt;/blockquote&gt;It will hide the ^M's, without touching the file.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Using dos2unix&lt;br /&gt;
&lt;/h2&gt;There's a program called dos2unix that should strip those for you. Windows uses different line-ending characters which is why that happens.&lt;br /&gt;
&lt;blockquote&gt;dos2unix &lt;filename&gt;&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/UgUjK8-XQOk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/926190217176706826/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/05/removing-carriage-returns-from-ms-dos-m.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/926190217176706826?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/926190217176706826?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/UgUjK8-XQOk/removing-carriage-returns-from-ms-dos-m.html" title="Removing carriage returns from MS-DOS (^M) in VIM" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/05/removing-carriage-returns-from-ms-dos-m.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8DQHc8fCp7ImA9WhZXFEo.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-2481436560518742339</id><published>2011-05-04T10:57:00.002+08:00</published><updated>2011-05-04T10:57:51.974+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-04T10:57:51.974+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="freebsd" /><category scheme="http://www.blogger.com/atom/ns#" term="git" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><title>Using GIT to Manage Config Files</title><content type="html">One thing I like about GIT, among others, is that it creates a repository locally. This makes simple things easy, still not disallowing complex things.&lt;br /&gt;
&lt;br /&gt;
A good use of GIT is to manage the configuration files in a GNU/Linux system. This article describes the way I do it.&lt;br /&gt;
&lt;br /&gt;
In this example, I will use the Squid proxy/cache server configuration as an example, but the principles apply to any configuration.&lt;br /&gt;
&lt;br /&gt;
Ok, so here are the steps.&lt;br /&gt;
&lt;br /&gt;
Zeroth step is to install GIT. ;-) On Debian/Ubuntu systems, install the "git-core" package.&lt;br /&gt;
&lt;br /&gt;
First create a git repository in /etc/. On Ubuntu systems, you may have to use "sudo", or become root with "sudo -s" before running the following commands.&lt;br /&gt;
&lt;br /&gt;
# cd /etc&lt;br /&gt;
# git init&lt;br /&gt;
&lt;br /&gt;
This will create a GIT repository in /etc/.git/. This step needs to be done only once. Any recent version of GIT should accept the "init" command, otherwise run "git init-db".&lt;br /&gt;
&lt;br /&gt;
Now add and commit a file, so GIT will create the "master" branch. We add the "hostname" file in this example.&lt;br /&gt;
&lt;br /&gt;
# git add hostname&lt;br /&gt;
# git commit -m "Initial commit." hostname&lt;br /&gt;
&lt;br /&gt;
If you don't use the "-m" option, GIT will start an editor to enter a comment.&lt;br /&gt;
&lt;br /&gt;
I prefer to use three branches.&lt;br /&gt;
&lt;br /&gt;
    master: This is the branch that holds the working configuration of the running system.&lt;br /&gt;
    stock: This branch contains the "default" configuration files as installed.&lt;br /&gt;
    play: This branch is used for experimenting.&lt;br /&gt;
&lt;br /&gt;
Now that the "master" branch is already created, let's create the other two.&lt;br /&gt;
&lt;br /&gt;
# git branch stock&lt;br /&gt;
# git branch play&lt;br /&gt;
&lt;br /&gt;
You can always use "git branch" command to see available branches with active branch highlighted.&lt;br /&gt;
&lt;br /&gt;
In this example, we install Squid, and manage its configuration file /etc/squid/squid.conf using GIT.&lt;br /&gt;
&lt;br /&gt;
Let us switch to the "stock" branch, install Squid, add the config file, commit it, and switch back to the "master" branch. Switching to a branch is called "checking out".&lt;br /&gt;
&lt;br /&gt;
# git checkout stock&lt;br /&gt;
# apt-get install squid&lt;br /&gt;
# git add squid/squid.conf&lt;br /&gt;
# git commit -m "Adding stock config file." squid/squid.conf&lt;br /&gt;
# git checkout master&lt;br /&gt;
&lt;br /&gt;
It is always a good idea to switch back quickly to the "master" branch, as we need to keep the "stock" branch clean without any of our changes going there accidentally.&lt;br /&gt;
&lt;br /&gt;
Now you will notice that the "squid/squid.conf" file has gone missing, because we added it in the "stock" branch, not in "master".&lt;br /&gt;
&lt;br /&gt;
To get the config file to the "master" branch, we need to merge it with the "stock" branch.&lt;br /&gt;
&lt;br /&gt;
# git merge stock&lt;br /&gt;
&lt;br /&gt;
I do all my experimenting, however small, in the "play" branch. Before starting an experiment, I switch to the "play" branch and merge it with "master", so both "master" and "play" will be identical at the beginning.&lt;br /&gt;
&lt;br /&gt;
# git checkout play&lt;br /&gt;
# git merge master&lt;br /&gt;
&lt;br /&gt;
Now the experimenting begins. I would change the config file, start/restart Squid, and 1001 other things.&lt;br /&gt;
&lt;br /&gt;
During experimenting, it is very useful to view the changes I have done by using the "git diff" command.&lt;br /&gt;
&lt;br /&gt;
Even if the experiments are not successful, I would still commit any partial work to continue later. There is nothing to worry as we are in the "play" branch. Use the "git branch" command to verify this.&lt;br /&gt;
&lt;br /&gt;
# git commit -m "Partially finished experiment." squid/squid.conf&lt;br /&gt;
&lt;br /&gt;
To get the system back to its previous state, we can always switch to the "master" branch.&lt;br /&gt;
&lt;br /&gt;
# git checkout master&lt;br /&gt;
&lt;br /&gt;
Make sure to commit the changes in the "play" branch before checking out the "master" branch. Otherwise, those changes will be lost.&lt;br /&gt;
&lt;br /&gt;
Once the experimenting is successful in the "play" branch, we can merge them to the master branch.&lt;br /&gt;
&lt;br /&gt;
# git checkout master&lt;br /&gt;
# git merge play&lt;br /&gt;
&lt;br /&gt;
When backing up the system, make sure you include /etc/.git/ to save the history of your configurations.&lt;br /&gt;
&lt;br /&gt;
Use "git log" to view the history of commits.&lt;br /&gt;
&lt;br /&gt;
Happy gitting!&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/GnSh2MY7eBY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/2481436560518742339/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/05/using-git-to-manage-config-files.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/2481436560518742339?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/2481436560518742339?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/GnSh2MY7eBY/using-git-to-manage-config-files.html" title="Using GIT to Manage Config Files" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/05/using-git-to-manage-config-files.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QEQHg9eyp7ImA9WhZRGEQ.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-3533590474281303306</id><published>2011-04-16T02:15:00.000+08:00</published><updated>2011-04-16T02:15:01.663+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-16T02:15:01.663+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="heroku" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rail" /><title>Managing Multiple Heroku Accounts</title><content type="html">I recently ran into an issue where my personal Heroku account and the owner account of a Heroku app that I was maintaining were different. For those that don’t know, your account is tied to an ssh key which allows you to run privileged commands via terminal. Though you can get most of these commands being a collaborator on a project, you cannot add addons or manage resources. For that you must be the owner. The issue in this situation was the ‘owner’ had no technical skills and was not going to be running commands. Even if he could run these commands, he was paying me to manage the whole process so I needed to act on his behalf. As you can imagine, I don’t want my personal account to ‘own’ his application. So how do you deal with this?&lt;br /&gt;
&lt;br /&gt;
Let’s understand a bit more about how your account is associated. When you install the Heroku gem and run your first command it will ask you to enter your email and password and set your default ssh key before the command is issued. It will store this data into a .heroku/credentials file in your home dir. The problem is you can’t add another email account. One option is to make multiple credential files for each account you want to impersonate. You would then need to change out the file based on what user you want to impersonate. Not ideal.&lt;br /&gt;
&lt;br /&gt;
Luckily someone else has had this problem and wrote up a Heroku add-on. @ddollar created heroku-accounts to manage this for us. The rest of this post is just an explanation of what I ended up doing and his readme is more than sufficient to guide you. What I find curious is Heroku has no official doc on how to tackle this problem though I suspect that will change soon (especially since a couple of my friends work there and will likely add it after reading this).&lt;br /&gt;
&lt;br /&gt;
Install the add-on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
heroku plugins:install git://github.com/ddollar/heroku-accounts.git&lt;br /&gt;
&lt;br /&gt;
Next set up your personal account (the one you use for all your side projects, hacking, etc). It will ask you for your email and password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
heroku accounts:add personal&lt;br /&gt;
&lt;br /&gt;
This way of adding an account will require you to tie your ssh key to the account manually. The command gives you an example to put into your ~/.ssh/config file, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Host heroku.personal&lt;br /&gt;
  HostName heroku.com&lt;br /&gt;
  IdentityFile /PATH/TO/PRIVATE/KEY&lt;br /&gt;
  IdentitiesOnly yes&lt;br /&gt;
&lt;br /&gt;
Since you most likely want this account to be your Heroku default run this command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
heroku accounts:default personal&lt;br /&gt;
&lt;br /&gt;
Next up, it’s time to make a new account for your client. In this case because we’re starting fresh you can use the auto option which will generate an ssh key and modify your .ssh config.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
heroku accounts:add &lt;client&gt; --auto&lt;br /&gt;
&lt;br /&gt;
It’s going to ask you for an email and password like the first account add. In this case you use your client’s owner email and password. Once in place you can run Heroku commands as owner.&lt;br /&gt;
&lt;br /&gt;
Now whenever you want to act on the behalf of the owner you just need to make sure you’re using the client account such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
heroku accounts:set &lt;client&gt;&lt;br /&gt;
&lt;br /&gt;
If you want to learn more about the commands this addon has, just ask help:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
heroku help&lt;br /&gt;
&lt;br /&gt;
The one command that I haven’t seen that would be nice is a way to see what account you’re acting as. I guess if you aren’t sure you can always use the set command.&lt;br /&gt;
&lt;br /&gt;
I foresee that I will have to act as owner on several Heroku accounts in the near future. Having a way to sanely change accounts is going to be vital. I don’t think I’ll be the only person with this situation. Hope this helps!&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/UXVuqBHvSPQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/3533590474281303306/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/04/managing-multiple-heroku-accounts.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/3533590474281303306?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/3533590474281303306?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/UXVuqBHvSPQ/managing-multiple-heroku-accounts.html" title="Managing Multiple Heroku Accounts" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/04/managing-multiple-heroku-accounts.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4HQ3Y7fyp7ImA9WhZRFU8.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-3621050332532289802</id><published>2011-04-11T19:22:00.000+08:00</published><updated>2011-04-11T19:22:12.807+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-11T19:22:12.807+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="freebsd" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><title>Ctrl-S hang Terminal</title><content type="html">It happened to me a lot many times. While working on terminal, sometime the terminal hangs due to pressing Ctrl-S.&lt;br /&gt;
&lt;br /&gt;
Ctrl-S and Ctrl-Q have been around since the days of green-screens and dumb terminals (aka the 80s). Ctrl-S is scroll-lock on, and Ctrl-Q is scroll lock off. This works in a lot of places on a lot of operating systems. Try it when booting or shutting down at a text screen. Chances are Ctrl-S will stop the scrolling messages. When done, press Ctrl-Q to continue. &lt;br /&gt;
&lt;br /&gt;
To resume the terminal press Ctrl-Q.&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/Vu-GmjOgTrE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/3621050332532289802/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/04/ctrl-s-hang-terminal.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/3621050332532289802?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/3621050332532289802?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/Vu-GmjOgTrE/ctrl-s-hang-terminal.html" title="Ctrl-S hang Terminal" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/04/ctrl-s-hang-terminal.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08ASX0_fip7ImA9WhZREkU.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-3200047621048644226</id><published>2011-04-09T02:04:00.000+08:00</published><updated>2011-04-09T02:04:08.346+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-09T02:04:08.346+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="freebsd" /><title>Use Tmpfs for /tmp</title><content type="html">Add the following line in the /etc/fstab&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;tmpfs /tmp  tmpfs rw,mode=777 0 0&lt;/blockquote&gt;&lt;br /&gt;
and then run "mount /tmp" or reboot the machine&lt;br /&gt;
&lt;br /&gt;
Ref:&lt;br /&gt;
http://wiki.freebsd.org/TMPFS&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/XRFxEquj6N4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/3200047621048644226/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/04/use-tmpfs-for-tmp.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/3200047621048644226?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/3200047621048644226?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/XRFxEquj6N4/use-tmpfs-for-tmp.html" title="Use Tmpfs for /tmp" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/04/use-tmpfs-for-tmp.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYARno9fCp7ImA9WhZTGUk.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-365280789273402255</id><published>2011-03-24T14:29:00.000+08:00</published><updated>2011-03-24T14:29:07.464+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-24T14:29:07.464+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="freebsd" /><category scheme="http://www.blogger.com/atom/ns#" term="svn" /><title>Using Subversion in FreeBSD</title><content type="html">General Information&lt;br /&gt;
Subversion (SVN) is an alternative to using Concurrent Version System (CVS) for collaborative development, though it has other uses if you develop on more than one machine and wish to keep all your work in a central location.  This guide will show you how to setup Subversion with Webaccess via the Apache2 mod_dav svn module.  If you already use apache 1.3 you can continue to use that, just change the port that apache2 listens on in its httpd.conf file.&lt;br /&gt;
&lt;br /&gt;
Subversion Book is an excellent resource for information outside the scope of this guide.&lt;br /&gt;
&lt;br /&gt;
Requirements&lt;br /&gt;
&lt;br /&gt;
    Local root access on the box or be able to su to root.&lt;br /&gt;
    A SSH client such as puTTy or SecureCRT (if you are setting it up remotely).&lt;br /&gt;
    A plain text editor, I prefer nano&lt;br /&gt;
&lt;br /&gt;
Installation&lt;br /&gt;
We have to start out by building apache2.  Because we are building it with the intention of using Subversion with it, we must build it with Berkeley DB (sleepycat) support, as the Subversion filesystem is actually built as a sleepycat database.  It is this that allows for the versioning of files.&lt;br /&gt;
#&lt;br /&gt;
#  cd /usr/ports/www/apache2&lt;br /&gt;
make install WITH_BERKELEYDB=db42&lt;br /&gt;
We make sure that the apache2 aprutil library is known, this file sometimes seems to get "lost"&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
#  ldconfig -m /usr/local/lib/apache2/&lt;br /&gt;
echo "/usr/local/lib/apache2" &gt;&gt; /etc/ld.so.conf&lt;br /&gt;
echo "/usr/local/lib/apache2" &gt;&gt; /etc/ld-elf.so.conf&lt;br /&gt;
Instruct the Operating System to run apache2 at startup&lt;br /&gt;
#  echo 'apache2_enable="YES"' &gt;&gt; /etc/rc.conf&lt;br /&gt;
Now to build Subversion&lt;br /&gt;
#&lt;br /&gt;
#  cd /usr/ports/devel/subversion&lt;br /&gt;
make install -DWITH_MOD_DAV_SVN&lt;br /&gt;
&lt;br /&gt;
Configuration&lt;br /&gt;
OK, subversion and apache with berkeley db support are now compiled and installed.  You have a choice of either creating a single huge repository for all of your projects, or individual repositories for each.  I will detail each now.&lt;br /&gt;
&lt;br /&gt;
General Setup&lt;br /&gt;
Create Subversion Home folder&lt;br /&gt;
#  mkdir -p /usr/home/svn&lt;br /&gt;
Create a generic repository format&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
#  mkdir -p /usr/home/svn/default/trunk&lt;br /&gt;
mkdir /usr/home/svn/default/branches&lt;br /&gt;
mkdir /usr/home/svn/default/tags&lt;br /&gt;
Copy some files will need for the web interface&lt;br /&gt;
#  cp /usr/ports/devel/subversion/work/subversion-1.0.6/tools/xslt/* /usr/local/www/data-dist/&lt;br /&gt;
&lt;br /&gt;
Note:  The path to the tools/xslt will change with versions of subversion so change the &lt;em&gt;subversion-1.0.6&lt;/em&gt; to whatever it is for your version of subversion, ie subversion-1.0.7 or subversion-1.0.8 and so on.&lt;br /&gt;
Setup Blanket Access:  If you wish to enable htaccess style password login to the subversion repository then use this system. This is the basic access control system, which can be extended to enable per directory access control as well.&lt;br /&gt;
#&lt;br /&gt;
#  mkdir /usr/home/svn/access&lt;br /&gt;
touch /usr/home/svn/access/users&lt;br /&gt;
Create the users using the htpasswd utility&lt;br /&gt;
#  htpasswd -mb /usr/home/svn/access/users &lt;em&gt;username&lt;/em&gt; &lt;em&gt;password&lt;/em&gt;&lt;br /&gt;
Configuring Apache2 for Blanket Access control&lt;br /&gt;
#  nano -w /usr/local/etc/apache2/httpd.conf&lt;br /&gt;
Add the following to the httpd.conf file, this can be at the bottom or wherever, it will create a http://www.myservername.com/svn/ URL which you can then access&lt;br /&gt;
## SVN WebDAV Repository Setup&lt;br /&gt;
&lt;Location /svn&gt;&lt;br /&gt;
     DAV svn&lt;br /&gt;
     SVNParentPath /usr/home/svn/repos&lt;br /&gt;
     SVNIndexXSLT "http://www.myservername.com/svnindex.xsl"&lt;br /&gt;
    &lt;br /&gt;
     # anonymous first&lt;br /&gt;
     Satisfy Any&lt;br /&gt;
     Require valid-user&lt;br /&gt;
    &lt;br /&gt;
     # authenticating them valid ones&lt;br /&gt;
     AuthType Basic&lt;br /&gt;
     AuthName "Subversion Repositories"&lt;br /&gt;
     AuthUserFile /usr/home/svn/access/users&lt;br /&gt;
&lt;/Location&gt;&lt;br /&gt;
This can also be placed inside a virtual host directive&lt;br /&gt;
&lt;br /&gt;
Extending the Blanket Access control to enable Per-Directory Access control&lt;br /&gt;
#  touch /usr/home/svn/access/control&lt;br /&gt;
If you are going to use a single large repository with all your projects in and you wish to allow and deny some users access to certain parts of the repository, then you can setup the control file like this.  In this example I will use users with the names of admin, manager (a project manager), commiter, client.  The access rules are inheritted, but I will demonstrate how to override an inheritted value.  If someone is not mentioned at all within the tree, then they are denied access.&lt;br /&gt;
[/]&lt;br /&gt;
admin = rw&lt;br /&gt;
manager = r&lt;br /&gt;
&lt;br /&gt;
[/bigproject]&lt;br /&gt;
manager = rw&lt;br /&gt;
commiter = r&lt;br /&gt;
&lt;br /&gt;
[/bigproject/trunk]&lt;br /&gt;
commiter = rw&lt;br /&gt;
client = r&lt;br /&gt;
&lt;br /&gt;
[/bigproject/branches]&lt;br /&gt;
client = r&lt;br /&gt;
&lt;br /&gt;
[/bigproject/trunk/manager_notes]&lt;br /&gt;
client =&lt;br /&gt;
commiter =&lt;br /&gt;
In this file from the very start the admin has full rights to the whole repository, and the manager can read and see all of the projects, but he has full access to the whole of the bigproject folder and the commiter can read the whole of the bigproject folder, all the development is to be kept in trunk so the commiter has full access to that, and the clients might want to be able to get the latest builds of a project, so they can read it.  They might also want access to the stable branches, so they are allowed read access to that.  Finally, the project manager has some project notes which he doesn't want anyone else to gain access to, so the client and commiter are set to empty permissions which denys them access to that folder.  You can also specify general access rights for all by using the '*' and assigning access rights to that.&lt;br /&gt;
Now the same again, but using per directory access control on a multiple repository system&lt;br /&gt;
[bigproject:/]&lt;br /&gt;
admin = rw&lt;br /&gt;
manager = rw&lt;br /&gt;
commiter = r&lt;br /&gt;
&lt;br /&gt;
[bigproject:/trunk]&lt;br /&gt;
commiter = rw&lt;br /&gt;
client = r&lt;br /&gt;
&lt;br /&gt;
[bigproject:/branches]&lt;br /&gt;
client = r&lt;br /&gt;
&lt;br /&gt;
[bigproject:/trunk/manager_notes]&lt;br /&gt;
client =&lt;br /&gt;
commiter =&lt;br /&gt;
Edit the apache2 config file to use per-directory access control.  Find the Blanket Access control Location area and add the below lines just underneath the SVNIndexXSLT&lt;br /&gt;
# If we are using the Per-Directory Access Control then we leave this uncommented&lt;br /&gt;
# Access Control&lt;br /&gt;
AuthzSVNAccessFile /usr/home/svn/access/control&lt;br /&gt;
It should look like this&lt;br /&gt;
## SVN WebDAV Repository Setup&lt;br /&gt;
&lt;Location /svn&gt;&lt;br /&gt;
     DAV svn&lt;br /&gt;
     SVNParentPath /usr/home/svn/repos&lt;br /&gt;
     SVNIndexXSLT "http://www.myservername.com/svnindex.xsl"&lt;br /&gt;
    &lt;br /&gt;
     # If we are using the Per-Directory Access Control then we leave this uncommented&lt;br /&gt;
     # Access Control&lt;br /&gt;
     AuthzSVNAccessFile /usr/home/svn/access/control&lt;br /&gt;
    &lt;br /&gt;
     # anonymous first&lt;br /&gt;
     Satisfy Any&lt;br /&gt;
     Require valid-user&lt;br /&gt;
    &lt;br /&gt;
     # authenticating them valid ones&lt;br /&gt;
     AuthType Basic&lt;br /&gt;
     AuthName "Subversion Repositories"&lt;br /&gt;
     AuthUserFile /usr/home/svn/access/users&lt;br /&gt;
&lt;/Location&gt;&lt;br /&gt;
&lt;br /&gt;
Building a Single General Repository&lt;br /&gt;
Create our single main repository&lt;br /&gt;
#&lt;br /&gt;
#  svnadmin create /usr/home/svn/repos&lt;br /&gt;
svn import /usr/home/svn/default file:///usr/home/svn/repos -m "initial import"&lt;br /&gt;
Should you later want to divide this repository into project folders, you will need to checkout the whole repository and use the svn move, svn copy and so on commands, which can be found in the Subversion Book&lt;br /&gt;
&lt;br /&gt;
Building a Multiple Project Repository&lt;br /&gt;
Make a new repository&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
#  mkdir /usr/home/svn/repos&lt;br /&gt;
svnadmin create /usr/home/svn/repos/&lt;em&gt;projectname&lt;/em&gt;&lt;br /&gt;
svn import /usr/home/svn/default file:///usr/home/svn/repos/&lt;em&gt;projectname&lt;/em&gt; -m "Initial Import"&lt;br /&gt;
&lt;br /&gt;
Final Setup&lt;br /&gt;
Make sure that apache can read the svn repositories&lt;br /&gt;
#  chown -R www:www /usr/home/svn&lt;br /&gt;
and make the access control and userlist readable only by apache.  All the contents are pretty much encrypted, but you don't want other shell users peeking at them, though they could get through via a php script, but this is the best way to go about it.&lt;br /&gt;
#&lt;br /&gt;
#  chmod 600 /usr/home/svn/access/control&lt;br /&gt;
chmod 600 /usr/home/svn/access/users&lt;br /&gt;
There, you now have a fully working Subversion Repository.  To checkout the contents of the trunk of a project in your repository via the command line tool&lt;br /&gt;
#  svn checkout http://www.mydomain.com/svn/&lt;em&gt;projectname&lt;/em&gt;/trunk &lt;em&gt;projectname&lt;/em&gt;&lt;br /&gt;
this will make a folder called "projectname" in the current folder you are in when you run the command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have made changes to a project you can commit those changes by changing into the project folder then&lt;br /&gt;
#  svn commit -m "Notes regarding the changes"&lt;br /&gt;
And finally to update your copy of the code from the repository, change into the project folder then&lt;br /&gt;
#  svn update&lt;br /&gt;
These commands are all for the SVN Command line tool, which is installed as part of the devel/subversion port.  If you wish to use the command line tool and not create the files needed for running a repository with apache2, then use&lt;br /&gt;
#&lt;br /&gt;
#  cd /usr/ports/devel/subversion&lt;br /&gt;
make install clean&lt;br /&gt;
and skip the remaining steps.&lt;br /&gt;
&lt;br /&gt;
There is also a range of clients.  The best for Windows, in my opinion, is TortoiseSVN, a comprehensive list of other clients for SVN can be found here &lt;br /&gt;
&lt;br /&gt;
Reference&lt;br /&gt;
http://www.bsdguides.org/guides/freebsd/misc/subversion.php&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/TjBkndj-V44" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/365280789273402255/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/03/using-subversion-in-freebsd.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/365280789273402255?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/365280789273402255?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/TjBkndj-V44/using-subversion-in-freebsd.html" title="Using Subversion in FreeBSD" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/03/using-subversion-in-freebsd.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcDRXk5fyp7ImA9Wx9VEU8.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-414522290303532573</id><published>2011-01-27T19:34:00.000+08:00</published><updated>2011-01-27T19:34:34.727+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-27T19:34:34.727+08:00</app:edited><title>Use a Google Voice Number from Outside the U.S.</title><content type="html">With Google Voice, you can send text messages and place calls to regular phone numbers from the computer or your mobile phone.&lt;br /&gt;
&lt;br /&gt;
Visit the YouTube channel of Google Voice to learn about all the other cool things that you may do with your Google Voice account.&lt;br /&gt;
&lt;br /&gt;
While Google Voice is no longer an invitation-only service, you need to be in the United States (that is, your computer must have a U.S. IP Address) and you must also have a local US phone number in order to activate your Google Voice phone number.&lt;br /&gt;
&lt;br /&gt;
How to Get Google Voice outside the U.S.?&lt;br /&gt;
There are however some simple workarounds that will help you enable Google Voice from anywhere outside the USA. I activated Google Voice from India but the same procedure should work with other countries as well.&lt;br /&gt;
&lt;br /&gt;
Step 1: &lt;a href="http://aming-blog.blogspot.com/2011/01/how-to-get-us-phone-number.html"&gt;Get a US Phone Number&lt;/a&gt;. This process should not take more than five minutes.&lt;br /&gt;
&lt;br /&gt;
Step 2: Download and install Hotspot Shield (make sure you decline the optional toolbar). This is required because you can't sign-in to Google Voice from a non-US I.P. address.&lt;br /&gt;
&lt;br /&gt;
[*] Hotspot Shield may insert audio ads in websites which are annoying but the reason I recommend it is because the software requires no configuration and you can easily disable it with a simple right click.&lt;br /&gt;
&lt;br /&gt;
Step 3: Start Hotspot Shield, if it's not already running on your system, and then visit IP2Location to confirm that your location is listed as "United States." If not, disconnect your current Hotspot Shield session and reconnect to get yourself a new IP Address.&lt;br /&gt;
&lt;br /&gt;
Step 4: Launch the Express Talk softphone software (you may have previously downloaded this software for activating your local US phone number).&lt;br /&gt;
&lt;br /&gt;
Step 5: Open voice.google.com in your web browser and sign-in with your Google account. If you get an error message saying – "Google Voice is not available in your country" – clear your browser cookies and try again.&lt;br /&gt;
&lt;br /&gt;
Use a Google Voice Number from Outside the U.S.&lt;br /&gt;
5a. It's time to pick a Google Voice phone number. You may enter a US area code and some word to get a memorable phone number or pick one from the available choices.&lt;br /&gt;
&lt;br /&gt;
5b. Enter a four digit pin for voicemail, accept the Terms and continue.&lt;br /&gt;
&lt;br /&gt;
Use a Google Voice Number from Outside the U.S.&lt;br /&gt;
5c. In the next screen, input your local US number that will ring when someone dials your Google Voice number.&lt;br /&gt;
&lt;br /&gt;
Use a Google Voice Number from Outside the U.S.&lt;br /&gt;
5d. Click Call Me Now. Google Voice will call your local number and this should ring the Express Talk software. Enter the confirmation code using the dial pad of Express Talk and once it is verified, your Google Voice phone number is ready for use.&lt;br /&gt;
&lt;br /&gt;
Also see: VoIP Services for Making Phone Calls&lt;br /&gt;
&lt;br /&gt;
Next steps – You may download the Google Voice App on your iPhone /Android or access it directly via m.google.com/voice if you have an unsupported mobile phone.&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/RuuQucHgfMQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/414522290303532573/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/01/use-google-voice-number-from-outside-us.html#comment-form" title="1 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/414522290303532573?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/414522290303532573?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/RuuQucHgfMQ/use-google-voice-number-from-outside-us.html" title="Use a Google Voice Number from Outside the U.S." /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/01/use-google-voice-number-from-outside-us.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4AR386eyp7ImA9Wx9VEU8.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-3483929336538986063</id><published>2011-01-27T19:32:00.000+08:00</published><updated>2011-01-27T19:32:26.113+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-27T19:32:26.113+08:00</app:edited><title>How to Get a US Phone Number</title><content type="html">This tutorial describes how you may easily get your own US phone number from anywhere in the world without spending a penny.&lt;br /&gt;
&lt;br /&gt;
Once you have a US local phone number, your friends and relatives in the US will be able to dial you from their landline or regular cell phones without paying international rates. The calls can be forwarded to your mobile phone or desktop based VoIP softphones (also see: Make phone calls over the Internet).&lt;br /&gt;
&lt;br /&gt;
[*] Skype also offers a service called Skype-In (also known as Online Number) where you can get a local phone number for USA but it costs around $18 for 3 months.&lt;br /&gt;
Getting your own USA Phone Number – Step by Step&lt;br /&gt;
&lt;br /&gt;
Step 1: Sign-up for a free account with CallCentric.com and click continue. CallCentric will send you a confirmation mail to verify your email address.&lt;br /&gt;
&lt;br /&gt;
Step 2: Once you’ve verified the email address, provide your city and country code, agree to the terms and conditions and click “Sign me up.”&lt;br /&gt;
&lt;br /&gt;
Step 3: CallCentric will now provide you with a virtual tour of their websites. Skip it and choose – “Go to My CallCentric.” The next screen will list your CallCentric # in the format 1777** – copy that number to the clipboard.&lt;br /&gt;
&lt;br /&gt;
Step 4: Open a new browser tab and go to phone.ipkall.com. Set the account type as SIP and paste the CallCentric # from the clipboard into the field that says SIP Username. The hostname is in.callcentric.com and choose the same email address and password that you used while setting up your CallCentric account.&lt;br /&gt;
&lt;br /&gt;
[*] The default area code for your local US phone number is 253 but you may choose a different one from the drop-down. For this example, I’ll go with 425.&lt;br /&gt;
&lt;br /&gt;
Step 5: Within a minute, you should get an email from ipkall.com with your new local phone number. Keep the email handy as you’ll need it while configuring the SIP client.&lt;br /&gt;
&lt;br /&gt;
Step 6: Now that we have got ourselves a US phone number, let’s activate it.&lt;br /&gt;
&lt;br /&gt;
6a. Download and install Express Talk on your computer. The trial version is good enough for our task. Make sure that you don’t install any of the “optional components” like toolbars, etc. during the setup.&lt;br /&gt;
&lt;br /&gt;
6b. During installation, choose the default options for all the wizard screens. When you are on “SIP Setup,” choose “Yes, I already have a SIP account” and click Next. Fill the SIP details as in Step 4 above. Finish the setup.&lt;br /&gt;
&lt;br /&gt;
6c. Once the setup is complete, go back to your My CallCentric page and refresh it. You should see a notification saying – “your phone is registered.” Done!&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/UKwTmRc6D14" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/3483929336538986063/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/01/how-to-get-us-phone-number.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/3483929336538986063?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/3483929336538986063?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/UKwTmRc6D14/how-to-get-us-phone-number.html" title="How to Get a US Phone Number" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/01/how-to-get-us-phone-number.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ECSXYzeip7ImA9Wx9WGUk.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-7423687463161767383</id><published>2011-01-25T16:54:00.000+08:00</published><updated>2011-01-25T16:54:28.882+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-25T16:54:28.882+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="cli" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><title>Access clipboard from Command Line in Mac X</title><content type="html">It lets you copy text to your clipboard from the command line. This means you can (among other things) copy the contents of a file on a remote server into your clipboard, ready for pasting:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;echo 'Hello World!' | pbcopy&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
Pastes from your clipboard to stdout.&lt;br /&gt;
&lt;blockquote&gt;echo `pbpaste`&lt;/blockquote&gt;&lt;br /&gt;
What can’t you do! Oh, you want examples? Well…&lt;br /&gt;
&lt;br /&gt;
    * You could grab the output of a grep/awk/sed to paste into IM/IRC.&lt;br /&gt;
    * You could use a macro tool (like iKey, QS, et cetera) to create text modifying workflows that grab highlighted text, manipulate it, and replace it inline.&lt;br /&gt;
    * You could pull changelogs from svn into the clipboard when tagging for release so you could email them to coworkers.&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/qJalP-ZzEpg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/7423687463161767383/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/01/access-clipboard-from-command-line-in.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/7423687463161767383?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/7423687463161767383?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/qJalP-ZzEpg/access-clipboard-from-command-line-in.html" title="Access clipboard from Command Line in Mac X" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/01/access-clipboard-from-command-line-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QBQXk6fyp7ImA9Wx9WGE0.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-3014010652278558146</id><published>2011-01-24T00:49:00.000+08:00</published><updated>2011-01-24T00:49:10.717+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-24T00:49:10.717+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><title>Add blank spacers to the Mac OS X Dock</title><content type="html">You can add blank spacers to the Mac OS X Dock by issuing a defaults write command in the Terminal, you can see the effect in the screenshot above with the space between the Firefox icon and iChat icon.&lt;br /&gt;
&lt;br /&gt;
To get a spacer paste the following command into the Terminal:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'&lt;/blockquote&gt;&lt;br /&gt;
You then must kill and relaunch the Dock to have the spacers appear, you can do this with the following command:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;killall Dock&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/3itj_OzmKaY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/3014010652278558146/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/01/add-blank-spacers-to-mac-os-x-dock.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/3014010652278558146?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/3014010652278558146?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/3itj_OzmKaY/add-blank-spacers-to-mac-os-x-dock.html" title="Add blank spacers to the Mac OS X Dock" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/01/add-blank-spacers-to-mac-os-x-dock.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYFQnYycSp7ImA9Wx9WEUs.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-4405166947837486797</id><published>2011-01-16T14:41:00.000+08:00</published><updated>2011-01-16T14:41:53.899+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-16T14:41:53.899+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="svn" /><title>SVN commits fail error- Can't get exclusive lock</title><content type="html">The SVN server is run On the Freebsd server and the subversion repository is NFS mounted. When doing a commit, an error message shown on the svn client:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;svn: Can't get exclusive lock on file '/svn/repo/db/transactions/7802-2.txn/rev-lock': No locks available&lt;/blockquote&gt;&lt;br /&gt;
The problem finally is solved by running &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=rpc.lockd&amp;amp;apropos=0&amp;amp;sektion=0&amp;amp;manpath=FreeBSD+7.2-RELEASE"&gt;rpc.lockd(8)&lt;/a&gt; and &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=rpc.statd&amp;amp;sektion=8&amp;amp;apropos=0&amp;amp;manpath=FreeBSD+7.2-RELEASE"&gt;rpc.statd(8)&lt;/a&gt;.&amp;nbsp;on the svn server and the nfs server.&lt;br /&gt;
&lt;br /&gt;
To enable rpc.lock and rpc.stat by adding the following to the /etc/rc.conf:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;rpc_lockd_enable="YES"&lt;br /&gt;
rpc_statd_enable="YES"&lt;/blockquote&gt;&lt;br /&gt;
Start the application by restarting the machines or using:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;# /etc/rc.d/lockd start&lt;br /&gt;
# /etc/rc.d/statd start&lt;/blockquote&gt;&lt;br /&gt;
Reference:&lt;br /&gt;
http://www.freebsd.org/doc/handbook/network-nfs.html&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/SipbEYAW3WE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/4405166947837486797/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/01/svn-commits-fail-error-cant-get.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/4405166947837486797?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/4405166947837486797?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/SipbEYAW3WE/svn-commits-fail-error-cant-get.html" title="SVN commits fail error- Can't get exclusive lock" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/01/svn-commits-fail-error-cant-get.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEHQXw4cSp7ImA9Wx9XEUg.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-8805328834492472224</id><published>2011-01-04T14:06:00.004+08:00</published><updated>2011-01-05T00:13:50.239+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-05T00:13:50.239+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="growl" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><category scheme="http://www.blogger.com/atom/ns#" term="iTerm" /><title>Growl Notification from iTerm 2</title><content type="html">The iTerm 2 project has been around for a while, but it recently caught my attention again as development has become very active recently. Recent versions of iTerm support Growl notifications which is one of my favorite feature.&lt;br /&gt;
&lt;br /&gt;
To enable the Growl notification, Go to Preferences-&amp;gt;AdvancedSettings, Check the Enable Growl notifications.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_0tOJFUOGYCY/TSNG0BgTQAI/AAAAAAAAAsI/VbhFnFVWRzI/s1600/itermgrowlnotify.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="195" src="http://2.bp.blogspot.com/_0tOJFUOGYCY/TSNG0BgTQAI/AAAAAAAAAsI/VbhFnFVWRzI/s320/itermgrowlnotify.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To initiate Growl events from the command line in iTerm with:&lt;br /&gt;
&lt;blockquote&gt;echo $'&lt;b&gt;\e]9;&lt;/b&gt;Growl Notification&lt;b&gt;\007&lt;/b&gt;'&lt;/blockquote&gt;&lt;br /&gt;
The example shows how to get an alert after a long make. I know I would never remember that command so I wrote a little Bash user defined function to do the same. Add this to ~/.bash_profile file:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;growl() { echo -e $'&lt;b&gt;\e]9;&lt;/b&gt;'${1}'&lt;b&gt;\007&lt;/b&gt;' ; return  ; }&lt;/blockquote&gt;&lt;br /&gt;
Now the command to initiate a notification would be:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;make; growl "make done"&lt;/blockquote&gt;&lt;br /&gt;
Reference:&lt;br /&gt;
http://sites.google.com/site/iterm2home/ &lt;br /&gt;
http://code.google.com/p/iterm2/&lt;br /&gt;
http://widgetterm.sourceforge.net/&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/8lW4DNdIAO4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/8805328834492472224/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2011/01/growl-notification-from-iterm-2.html#comment-form" title="5 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/8805328834492472224?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/8805328834492472224?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/8lW4DNdIAO4/growl-notification-from-iterm-2.html" title="Growl Notification from iTerm 2" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_0tOJFUOGYCY/TSNG0BgTQAI/AAAAAAAAAsI/VbhFnFVWRzI/s72-c/itermgrowlnotify.png" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2011/01/growl-notification-from-iterm-2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkENRH8ycSp7ImA9Wx9QFE4.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-3030992797498046658</id><published>2010-12-27T14:18:00.000+08:00</published><updated>2010-12-27T14:18:15.199+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-27T14:18:15.199+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ZFS" /><title>WD Advanced Format Drive speed issues on ZFS</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Disk-structure2.svg/220px-Disk-structure2.svg.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img alt="" border="0" class="thumbimage" height="200" src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Disk-structure2.svg/220px-Disk-structure2.svg.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Why change to 4096-byte sectors?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If you're familiar with disk structure, you know that disks are broken down into sectors, which are normally 512 bytes in size; all read or write operations occur in multiples of the sector size. When you look closer, hard disks actually include a great deal of extra data in between sectors. These extra bytes are used by the disk's firmware to detect and correct errors within each sector. As hard disks grow larger, the result is that more and more data must be stored on each square centimeter of disk, resulting in more low-level errors, thus straining the firmware's error correction capabilities.&lt;br /&gt;
One way around this problem is to increase the sector size from 512 bytes to a larger value, enabling more powerful error-correction algorithms to be used. These algorithms can use less data on a per-byte basis to correct for more serious problems than is possible with 512-byte sectors. Thus, changing to a larger sector size has two practical benefits: improved reliability and greater disk capacity—at least in theory.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Why are there performance effects?&lt;/b&gt;&lt;br /&gt;
Unfortunately, changing the apparent sector size in firmware can degrade performance. To understand why, you should understand something about file system data structures and how partitions are placed on the hard disk.&lt;br /&gt;
Most modern file systems use data structures that are 4096 bytes or larger in size. Thus, most disk I/O operations are in multiples of this amount. Consider what happens when Linux wants to read or write one of these data structures on a new disk with 4096-byte sectors. If the file system data structures happen to align perfectly with the underlying physical partition size, a read or write of a 4096-byte data structure results in a read or write of a single sector. The hard disk's firmware doesn't need to do anything extraordinary; but when the file system data structures do not align perfectly with the underlying physical sectors, a read or write operation must access two physical sectors. For a read operation, this takes little or no extra time because the read/write head on the disk most likely passes over both sectors in succession, and the firmware can simply discard the data it doesn't need. Writes of misaligned data structures, on the other hand, require the disk's firmware to first read two sectors, modify portions of both sectors, and then write two sectors. This operation takes longer than when the 4096 bytes occupy a single sector. Thus, performance is degraded.&lt;br /&gt;
How can you tell if your data structures are properly aligned? Most file systems align their data structures to the beginning of the partitions that contain them. Thus, if a partition begins on a 4096-byte (8-sector) boundary, it's properly aligned. Unfortunately, until recently, most Linux partitioning tools did not create partitions aligned in this way. The upcoming section, Aligning partitions, describes how to do the job with common Linux partitioning software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to fix in ZFS&lt;/b&gt;&lt;br /&gt;
So, what does this have to do with ZFS? ZFS doesn’t have a pre-set block size. It uses variable sized blocks depending on the amount of data it is writing. If it’s writing 1000 bytes, then it will write the minimum number of sectors necessary to fit that data, which in the case of 512-byte sectors, is 2. This means that writing 1000 bytes requires reading and writing 4096 bytes or maybe 8192 depending on alignment. This means that properly aligning the partition will not solve the issue with ZFS. Here we need a different solution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to fix in ZFS&lt;/b&gt;&lt;br /&gt;
There is a hack to force zpool creation with minimum sector size equal to 4k:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;%gnop create -S 4096 ${DEV0}&lt;br /&gt;
%zpool create tank ${DEV0}.nop&lt;br /&gt;
%zpool export tank&lt;br /&gt;
%gnop destroy ${DEV0}.nop&lt;br /&gt;
%zpool import tank&lt;/blockquote&gt;&lt;br /&gt;
Zpool created this way is much faster on problematic 4k sector drives  &lt;br /&gt;
which lies about its sector size (like WD EARS). This hack works perfectly  &lt;br /&gt;
fine when system is running. Gnop layer is created only for "zpool create"  &lt;br /&gt;
command -- ZFS stores information about sector size in its metadata. After  &lt;br /&gt;
zpool creation one can export the pool, remove gnop layer and reimport the  &lt;br /&gt;
pool. Difference can be seen in the output from the zdb command:&lt;br /&gt;
&lt;br /&gt;
- on 512 sector device (2**9 = 512):&lt;br /&gt;
&lt;blockquote&gt;%zdb tank |grep ashift&lt;br /&gt;
ashift=9&lt;/blockquote&gt;&lt;br /&gt;
- on 4096 sector device (2**12 = 4096):&lt;br /&gt;
&lt;blockquote&gt;%zdb tank |grep ashift&lt;br /&gt;
ashift=12&lt;/blockquote&gt;&lt;br /&gt;
This change is permanent. The only possibility to change the value of  &lt;br /&gt;
ashift is: zpool destroy/create and restoring pool from backup.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Reference:&lt;/b&gt;&lt;br /&gt;
http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/&lt;br /&gt;
http://hardforum.com/showthread.php?t=1546137&lt;br /&gt;
http://www.nexentastor.org/boards/1/topics/1318&lt;br /&gt;
http://kerneltrap.org/mailarchive/freebsd-fs/2010/12/21/6885750&lt;br /&gt;
http://www.cod3r.com/2010/06/zfs-on-western-digital-ears-drives/&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/nyQ8wRAWDEc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/3030992797498046658/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2010/12/wd-advanced-format-drive-speed-issues.html#comment-form" title="1 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/3030992797498046658?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/3030992797498046658?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/nyQ8wRAWDEc/wd-advanced-format-drive-speed-issues.html" title="WD Advanced Format Drive speed issues on ZFS" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2010/12/wd-advanced-format-drive-speed-issues.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0INQXs_eip7ImA9Wx9SE0s.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-5841498659199020318</id><published>2010-12-03T17:46:00.002+08:00</published><updated>2010-12-03T17:46:30.542+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-03T17:46:30.542+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="cygwin" /><category scheme="http://www.blogger.com/atom/ns#" term="gem" /><title>Gem for ruby in Cygwin</title><content type="html">don't try to install rubygems for cygwin using the gem that comes with the ruby one-click installer for windows. instead, get the tarball, or zip file, and install it using the included installer script.&lt;br /&gt;
&lt;br /&gt;
since rubygems is pure ruby you don't have to worry about having a compiler installed. it should just work with the default cygwin install plus ruby and its dependencies. to install it, do the following steps:&lt;br /&gt;
&lt;br /&gt;
download the rubygems tarball from ruby forge&lt;br /&gt;
unpack the tarball&lt;br /&gt;
in a bash terminal, navigate to the unpacked directory&lt;br /&gt;
run the following command:&lt;br /&gt;
ruby setup.rb install&lt;br /&gt;
update rubygems by running the following:&lt;br /&gt;
gem update --system&lt;br /&gt;
note: you may need to run the updated command twice if you have any previously installed gems.&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/AqU-YiSVWx0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/5841498659199020318/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2010/12/gem-for-ruby-in-cygwin.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/5841498659199020318?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/5841498659199020318?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/AqU-YiSVWx0/gem-for-ruby-in-cygwin.html" title="Gem for ruby in Cygwin" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2010/12/gem-for-ruby-in-cygwin.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcAQng5fip7ImA9Wx5aGUo.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-2737863930816379651</id><published>2010-11-17T01:07:00.001+08:00</published><updated>2010-11-17T13:00:43.626+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-17T13:00:43.626+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="alpine" /><category scheme="http://www.blogger.com/atom/ns#" term="Gmail" /><title>Setting Gmail account in Alpine</title><content type="html">On 2007 October 24 Google started supporting IMAP access to&amp;nbsp;&lt;a href="https://mail.google.com/" style="color: #cc0000; text-decoration: none;"&gt;Gmail (Google Mail)&lt;/a&gt;. To use Pine to access and manage your Gmail messages, type&amp;nbsp;&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;MSLA&lt;/kbd&gt;&amp;nbsp;(&lt;b&gt;M&lt;/b&gt;ain&amp;gt;&amp;nbsp;&lt;b&gt;S&lt;/b&gt;etup&amp;gt; collection&lt;b&gt;L&lt;/b&gt;ists&amp;gt;&amp;nbsp;&lt;b&gt;A&lt;/b&gt;dd) and add a collection like this:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', Trebuchet, Geneva, Arial, Helvetica, Verdana, 'Myriad Web', Syntax, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal; margin-left: 27px; margin-right: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', Trebuchet, Geneva, Arial, Helvetica, Verdana, 'Myriad Web', Syntax, sans-serif;"&gt;Nickname  : Gmail                                             
Server    : imap.gmail.com/ssl/user=&lt;i&gt;id@gmail.com&lt;/i&gt;                                                       
Path      :                                                                                                                 
View      :  
  &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;div style="font-family: 'Trebuchet MS', Trebuchet, Geneva, Arial, Helvetica, Verdana, 'Myriad Web', Syntax, sans-serif;"&gt;where the Nickname is anything you like and&amp;nbsp;&lt;i&gt;id@gmail.com&lt;/i&gt;&amp;nbsp;is replaced by your Gmail or&amp;nbsp;&lt;a href="http://www.google.com/a/" style="color: #cc0000; text-decoration: none;"&gt;Google Apps&lt;/a&gt;&amp;nbsp;sign-in ID.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial; font-size: 12px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style="font-size: 11px; line-height: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Creating the role&lt;/h3&gt;&lt;div style="line-height: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Now that you’ve configured your collection list, Alpine will now be able to fetch email from your Gmail account. To send mail, you need to create a role. From the main menu, press ‘S’ to enter the setup screen. Press ‘R’ and then ‘R’ again to get to the role rules screen. Press ‘A’ to create a rule. Give it nickname, and then set “Current Folder Type” to Specific. Highlight “Folder List”, press ‘T’ and then navigate to your Gmail inbox. Press return/enter to add it to the folder list.&lt;/div&gt;&lt;div style="line-height: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;That’s the most complicated part. Now, scroll down to the “Actions begin here” section. Change the Set From field to something like this:&lt;/div&gt;&lt;pre style="font-family: Courier, monospace; font-size: 11px; line-height: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;'John Doe' &lt;your_name@gmail.com&gt;&lt;/your_name@gmail.com&gt;&lt;/pre&gt;&lt;div style="line-height: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Change the name to your name and the email address to your Gmail address. Once that’s done, edit the Use SMTP Server field:&lt;/div&gt;&lt;pre style="font-family: Courier, monospace; font-size: 11px; line-height: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;smtp.gmail.com:587/tls/user=your_name@gmail.com&lt;/pre&gt;&lt;div style="line-height: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Again, change the email address to your Gmail address. Before saving and quitting the screen, make sure that all the options in the “Uses begin here” section are marked “With confirmation”.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: 'Trebuchet MS', Trebuchet, Geneva, Arial, Helvetica, Verdana, 'Myriad Web', Syntax, sans-serif;"&gt;Gmail's IMAP server is different, as is Gmail's POP server, which is discussed in&amp;nbsp;&lt;a href="http://www.ii.com/internet/messaging/pine/pc/#gmailPOP" style="color: #cc0000; text-decoration: none;" title="POPping Gmail is Different"&gt;POPping Gmail is Different&lt;/a&gt;&amp;nbsp;below. To successfully use Pine to access and manage your Gmail IMAP collection, I recommend that you do the following.&lt;nobr&gt;&lt;/nobr&gt;&lt;/div&gt;&lt;ol style="font-family: 'Trebuchet MS', Trebuchet, Geneva, Arial, Helvetica, Verdana, 'Myriad Web', Syntax, sans-serif;"&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;Important:&lt;/i&gt;&lt;/b&gt;&amp;nbsp;Read the Gmail Help article about&amp;nbsp;&lt;a href="http://mail.google.com/support/bin/answer.py?answer=77657&amp;amp;topic=12762" style="color: #cc0000; text-decoration: none;" title="How do actions sync in IMAP?"&gt;How do actions sync in IMAP?&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Keep in mind that...&lt;/li&gt;
&lt;ol type="a"&gt;&lt;li&gt;Each Gmail folder that you see in your Pine Gmail collection is actually a Gmail label.&lt;/li&gt;
&lt;li&gt;All your non-spam non-trash messages are in the&amp;nbsp;&lt;nobr&gt;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Gmail]/All Mail&lt;/code&gt;&lt;/nobr&gt;&amp;nbsp;special folder.&lt;/li&gt;
&lt;li&gt;Each non-spam non-trash message can appear in multiple folders.&lt;/li&gt;
&lt;li&gt;To put a message in multiple folders, use Pine's Save (&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;S&lt;/kbd&gt;) command multiple times. Be careful about whether you copy or move the message. Pine's Save&amp;nbsp;&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;^R&lt;/kbd&gt;&amp;nbsp;subcommand is a toggle that controls whether or not the message is&lt;b&gt;R&lt;/b&gt;emoved from the current folder after the Save is done.&lt;/li&gt;
&lt;li&gt;When you use Pine to "Delete" (&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;D&lt;/kbd&gt;) a non-spam non-trash message, the Gmail IMAP server immediately deletes &amp;amp; expunges the message from the current folder, but it will still be in the&amp;nbsp;&lt;nobr&gt;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Gmail]/All Mail&lt;/code&gt;&lt;/nobr&gt;&amp;nbsp;special folder and any other folders that it happens to be in.&lt;/li&gt;
&lt;li&gt;To "archive" a message that is in your Gmail INBOX, use the Pine&amp;nbsp;&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;D&lt;/kbd&gt;&amp;nbsp;command to Delete it from the INBOX. It will still be archived in&amp;nbsp;&lt;nobr&gt;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Gmail]/All Mail&lt;/code&gt;&lt;/nobr&gt;.&amp;nbsp;&lt;b&gt;&lt;i&gt;Tip:&lt;/i&gt;&lt;/b&gt;&amp;nbsp;When accesssing your Gmail INBOX with Pine, you can think of&amp;nbsp;&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;D&lt;/kbd&gt;&amp;nbsp;as meaning&amp;nbsp;&lt;b&gt;D&lt;/b&gt;one (but don't think this way in non-Gmail folders!).&lt;/li&gt;
&lt;li&gt;When you use Pine to "Delete" (&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;D&lt;/kbd&gt;) a message in the&amp;nbsp;&lt;nobr&gt;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Gmail]/All Mail&lt;/code&gt;&lt;/nobr&gt;&amp;nbsp;special folder, the command is ignored.&lt;/li&gt;
&lt;li&gt;To delete a message from all the folders it is in, including the special&amp;nbsp;&lt;nobr&gt;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Gmail]/All Mail&lt;/code&gt;&lt;/nobr&gt;&amp;nbsp;folder, use Pine's Save (&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;S&lt;/kbd&gt;) command to move or copy the message to the&amp;nbsp;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Gmail]/Trash&lt;/code&gt;&amp;nbsp;special folder.&lt;/li&gt;
&lt;li&gt;When you use Pine to "Delete" (&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;D&lt;/kbd&gt;) a message in either the&amp;nbsp;&lt;nobr&gt;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Gmail]/Trash&lt;/code&gt;&lt;/nobr&gt;&amp;nbsp;or the&amp;nbsp;&lt;nobr&gt;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Gmail]/Spam&lt;/code&gt;&lt;/nobr&gt;&amp;nbsp;special folder, the message is immediately deleted &amp;amp; expunged and cannot be recovered.&lt;/li&gt;
&lt;li&gt;To search all your non-spam non-trash Gmail messages, open the&amp;nbsp;&lt;nobr&gt;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Gmail]/All Mail&lt;/code&gt;&lt;/nobr&gt;&amp;nbsp;folder and use Pine's Select (&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;;&lt;/kbd&gt;) command and other&amp;nbsp;&lt;a href="http://www.ii.com/internet/messaging/pine/pc/#mvAggregate" style="color: #cc0000; text-decoration: none;"&gt;aggregate operations&lt;/a&gt;&amp;nbsp;to zoom (&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;Z&lt;/kbd&gt;) in on the search results.&lt;/li&gt;
&lt;li&gt;Pine folder means Gmail label!&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Type&amp;nbsp;&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;MSC&lt;/kbd&gt;&amp;nbsp;(&lt;b&gt;M&lt;/b&gt;ain &amp;gt;&amp;nbsp;&lt;b&gt;S&lt;/b&gt;etup &amp;gt;&amp;nbsp;&lt;b&gt;C&lt;/b&gt;onfig) and use the following configuration settings.&lt;pre style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal; margin-left: 26px; margin-right: 17px;"&gt;:
incoming-archive-folders       = &lt;no set="" value=""&gt;
 :
read-message-folder            = &lt;no set="" value=""&gt;  
 :
[ ] &amp;nbsp;auto-move-read-msgs
 :
[X] &amp;nbsp;save-will-not-delete
 :
&lt;a href="http://www.ii.com/internet/messaging/pine/pc/#mvPrune" style="color: #cc0000; text-decoration: none;" title="link to 'Using Pine's pruned-folders Variable' below"&gt;pruning-rule&lt;/a&gt; =
               (*)  don't rename, don't delete  
 :&lt;/no&gt;&lt;/no&gt;&lt;/pre&gt;The first three settings and the last (pruning-rule) setting prevent Pine from trying to archive messages in a non-Gmail way (see #2f above for the Gmail way of archiving). The first three settings also work around a&amp;nbsp;&lt;a href="https://mailman1.u.washington.edu/mailman/private/alpine-alpha/2007-October/002741.html" style="color: #cc0000; text-decoration: none;" title="discussion about this bug in the alpine-alpha list [subscription required]"&gt;Gmail bug that causes Pine to complain about "Message to save shrank!"&lt;/a&gt;&amp;nbsp;[subscription to the&amp;nbsp;&lt;a href="http://www.washington.edu/alpine/" style="color: #cc0000; text-decoration: none;" title="University of Washington Alpine Information Center"&gt;Alpine&lt;/a&gt;-alpha list is required to view this link].&lt;br /&gt;
&lt;br /&gt;
The fourth setting,&amp;nbsp;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;save-will-not-delete&lt;/code&gt;, makes it easier to save a message in multiple folders (discussed in #2d above) and makes it less likely that you will misplace a message and need to go hunting for it in the&lt;nobr&gt;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Gmail]/All Mail&lt;/code&gt;&lt;/nobr&gt;&amp;nbsp;special folder.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;You might want to&amp;nbsp;&lt;a href="http://www.ii.com/internet/messaging/pine/pc/#recentIF" style="color: #cc0000; text-decoration: none;" title="link to 'Using the Incoming-Folders Collection (PIne Shortcuts)' below"&gt;set up incoming-folders (Pine shortcuts)&lt;/a&gt;&amp;nbsp;for your frequently used Gmail folders.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="font-family: 'Trebuchet MS', Trebuchet, Geneva, Arial, Helvetica, Verdana, 'Myriad Web', Syntax, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: 'Trebuchet MS', Trebuchet, Geneva, Arial, Helvetica, Verdana, 'Myriad Web', Syntax, sans-serif;"&gt;&lt;b&gt;&lt;i&gt;Notes:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;ul style="font-family: 'Trebuchet MS', Trebuchet, Geneva, Arial, Helvetica, Verdana, 'Myriad Web', Syntax, sans-serif;"&gt;&lt;li&gt;The Gmail special folders reside in&amp;nbsp;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Gmail]/&lt;/code&gt;&amp;nbsp;on some accounts and in&amp;nbsp;&lt;nobr&gt;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Google Mail]/&lt;/code&gt;&lt;/nobr&gt;&amp;nbsp;in other accounts. The name of this directory depends on whether the "Gmail" trademark belongs to Google in the account-holder's country.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;The Gmail IMAP server does not support many of the standard system&amp;nbsp;&lt;a href="http://deflexion.com/2006/05/server-side-message-labels" style="color: #cc0000; text-decoration: none;" title="link to 'Server-Side Message Labels' at Deflexion.com"&gt;IMAP flags&lt;/a&gt;. For example:&lt;ul&gt;&lt;li&gt;The \Answered flag and the \Recent flag are not supported in any Gmail folder.&lt;/li&gt;
&lt;li&gt;The \Deleted flag is not supported in the&amp;nbsp;&lt;nobr&gt;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;[Gmail]/All Mail&lt;/code&gt;&lt;/nobr&gt;&amp;nbsp;folder and is supported in a non-standard way in other folders (as discussed in #2e, 2f, 2g, and 2i above). On a&amp;nbsp;&lt;i&gt;standard&lt;/i&gt;&amp;nbsp;(non-Gmail) IMAP server, a message with the \Deleted flag is not actually deleted until it is expunged (&lt;kbd style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: bold;"&gt;X&lt;/kbd&gt;&amp;nbsp;command in Pine). For details, see&amp;nbsp;&lt;a href="http://deflexion.com/2006/05/imap-way-of-deleting-message" style="color: #cc0000; text-decoration: none;" title="link to 'The IMAP Way of Deleting a Message' at Deflexion.com"&gt;The IMAP Way of Deleting a Message&lt;/a&gt;&amp;nbsp;at Deflexion.com and&amp;nbsp;&lt;a href="http://www.ii.com/internet/messaging/pine/pc/#saveTrash" style="color: #cc0000; text-decoration: none;"&gt;Saving Your Trash&lt;/a&gt;&amp;nbsp;below, which discusses Pine's&amp;nbsp;&lt;code style="color: #003366; font-family: 'Panic Sans', Monaco, 'Courier New', Courier, 'Andale Mono', monospace; font-weight: normal;"&gt;expunge-only-manually&lt;/code&gt;&amp;nbsp;feature.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;The Gmail IMAP server does not support user-defined IMAP flags (IMAP&amp;nbsp; keywords), which are discussed in&amp;nbsp;&lt;a href="http://www.ii.com/internet/messaging/pine/pc/#keywords" style="color: #cc0000; text-decoration: none;" title="link to 'Setting Up Keywords (Labels)' below"&gt;Setting Up Keywords (Labels)&lt;/a&gt;&amp;nbsp;below.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="font-family: 'Trebuchet MS', Trebuchet, Geneva, Arial, Helvetica, Verdana, 'Myriad Web', Syntax, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: 'Trebuchet MS', Trebuchet, Geneva, Arial, Helvetica, Verdana, 'Myriad Web', Syntax, sans-serif;"&gt;&lt;b&gt;&lt;i&gt;See Also:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;ul style="font-family: 'Trebuchet MS', Trebuchet, Geneva, Arial, Helvetica, Verdana, 'Myriad Web', Syntax, sans-serif;"&gt;&lt;li&gt;&lt;a href="http://www.google.com/support" style="color: #cc0000; text-decoration: none;"&gt;Google Help&lt;/a&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;a href="https://mail.google.com/support" style="color: #cc0000; text-decoration: none;"&gt;Gmail Help&lt;/a&gt;&amp;nbsp;&amp;gt;&lt;a href="http://mail.google.com/support/bin/topic.py?topic=12760" style="color: #cc0000; text-decoration: none;"&gt;&amp;nbsp;IMAP Access&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Wired.com : Software : Web Services :&amp;nbsp;&lt;a href="http://www.wired.com/software/webservices/news/2007/10/imap" style="color: #cc0000; text-decoration: none;"&gt;IMAP, YouMAP, WeMAP: Mail Protocol's Proponents Argue for Better Support&lt;/a&gt;&amp;nbsp;by Paul Adams, which includes some quotes by me about Gmail and&amp;nbsp;&lt;nobr&gt;IMAP :-)&lt;/nobr&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ii.com/internet/messaging/pine/pc/#gmailPOP" style="color: #cc0000; text-decoration: none;" title="POPping Gmail is Different"&gt;POPping Gmail is Different&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://www.ii.com/internet/messaging/pine/pc/#gmailTips" style="color: #cc0000; text-decoration: none;"&gt;Gmail Tips&lt;/a&gt;&amp;nbsp;below&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/jAWwwSm6V1s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/2737863930816379651/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2010/11/setting-gmail-account-in-alpine.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/2737863930816379651?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/2737863930816379651?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/jAWwwSm6V1s/setting-gmail-account-in-alpine.html" title="Setting Gmail account in Alpine" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2010/11/setting-gmail-account-in-alpine.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0ECRnwyfyp7ImA9Wx9QFE4.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-4512051936167423840</id><published>2010-10-29T23:36:00.025+08:00</published><updated>2010-12-27T14:34:27.297+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-27T14:34:27.297+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Articles" /><title>蘋果Apple CEO賈伯斯Steve Jobs 對史丹佛畢業生演講</title><content type="html">今天，很榮幸來到各位從世界上最好的學校之一畢業的畢業典禮上。&lt;br /&gt;
我從來沒從大學畢業過，說實話，這是我離大學畢業最近的一刻。&lt;br /&gt;
今天，我只說三個故事，不談大道理，三個故事就好。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;第一個故事是關於人生中的點點滴滴如何串連在一起。&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
我在里德學院（Reed College）待了六個月就辦休學了。&lt;br /&gt;
到我退學前，一共休學了十八個月。那麼，我為什麼休學？（聽眾笑）這得從我出生前講起。&lt;br /&gt;
我的親生母親當時是個研究生，年輕未婚媽媽，她決定讓別人收養我。&lt;br /&gt;
她強烈覺得應該讓有大學畢業的人收養我，所以我出生時，她就準備讓我被一對律師夫婦收養。&lt;br /&gt;
但是這對夫妻到了最後一刻反悔了，他們想收養女孩。&lt;br /&gt;
所以在等待收養名單上的一對夫妻，我的養父母，在一天半夜裡接到一通電話， 問他們&lt;br /&gt;
「有一名意外出生的男孩，你們要認養他嗎？」&lt;br /&gt;
而他們的回答是「當然要」。&lt;br /&gt;
後來，我的生母發現，我現在的媽媽從來沒有大學畢業，我現在的爸爸則連高中畢業也沒有。&lt;br /&gt;
她拒絕在認養文件上做最後簽字。直到幾個月後，我的養父母保證將來一定會讓我上大學，她的態度才軟化。&lt;br /&gt;
十七年後，我上大學了。但是當時我無知地選了一所學費幾乎跟史丹佛一樣貴的大學（聽眾笑），我那工人階級的父母將所有積蓄都花在我的學費上。&lt;br /&gt;
六個月後，我看不出唸這個書的價值何在。那時候，我不知道這輩子要幹什麼，也不知道唸大學能對我有什麼幫助，只知道我為了唸這個書，花光了我父母這輩子的所有積蓄。&lt;br /&gt;
所以，我決定休學，相信船到橋頭自然直。&lt;br /&gt;
當時這個決定看來相當可怕，可是現在看來，那是我這輩子做過最好的決定之一。（聽眾笑）&lt;br /&gt;
&lt;div&gt;當我休學之後，我再也不用上我沒興趣的必修課，把時間拿去聽那些我有興趣的課。這一點也不浪漫。&lt;br /&gt;
我沒有宿舍，所以我睡在友人家裡的地板上，靠著回收可樂空罐的退費五分錢買吃的。&lt;br /&gt;
每個星期天晚上得走七哩的路，繞過大半個鎮 去印度教的 Hare Krishna 神廟吃頓好料，我喜歡 Hare Krishna 神廟的好料。&lt;br /&gt;
就這樣追隨我的好奇與直覺，大部分我所投入過的事務，後來看來都成了無比珍貴的經歷（And much of what I stumbled into&amp;nbsp;by following my curiosity and intuition turned out&amp;nbsp;to be priceless later on ）。&lt;br /&gt;
舉個例來說。當時里德學院有著大概是全國最好的書寫教育。&lt;br /&gt;
校園內的每一張海報上，每個抽屜的標籤上，都是美麗的手寫字。&lt;br /&gt;
因為我休學了，可以不照正常選課程序來，所以我跑去上書寫課。 我學了 serif 與 sanserif 字體，&lt;br /&gt;
學到在不同字母組合間變更字間距，學到活字印刷偉大的地方。&lt;br /&gt;
書寫的美好、歷史感與藝術感是科學所無法掌握的，我覺得這很迷人。&lt;br /&gt;
我沒預期過學這些東西能在我生活中起些什麼實際作用，不過十年後，當我在設計第一台麥金塔時，我想起了當時所學的東西，所以把這些東西都設計進了麥金塔裡，這是第一台能印刷出漂亮東西的電腦。&lt;br /&gt;
如果我沒沉溺於那樣一門課裡，麥金塔可能就不會有多重字體跟等比例間距字體了。&lt;br /&gt;
又因為 Windows抄襲了麥金塔的使用方式（聽眾鼓掌大笑）。&lt;br /&gt;
因此，如果當年我沒有休學，沒有去上那門書寫課，大概所有的個人電腦都不會有這些東西，印不出現在我們看到的漂亮的字來了。&lt;br /&gt;
當然，當我還在大學裡時，不可能把這些點點滴滴預先串連在一起，但在十年後的今天回顧，一切就顯得非常清楚。&lt;br /&gt;
我再說一次，你無法預先把點點滴滴串連起來；&lt;br /&gt;
只有在未來回顧時，你才會明白那些點點滴滴是如何串在一起的（you can't connect the dots look-ing forward;&amp;nbsp;you can only connect them looking backwards ）。&lt;br /&gt;
所以你得相信，眼前你經歷的種種，將來多少會連結在一起。&lt;br /&gt;
你得信任某個東西，直覺也好， 命運也好，生命也好，或者業力。&lt;br /&gt;
這種作法從來沒讓我失望，我的人生因此變得完全不同。（ Jobs停下來喝水）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;我的第二個故事，是有關愛與失去。&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
我很幸運－年輕時就發現自己愛做什麼事。我二十歲時，跟 Steve Wozniak在我爸媽的車庫裡開始了蘋果電腦的事業。&lt;br /&gt;
我們拚命工作，蘋果電腦在十年間從一間車庫裡的兩個小夥子擴展 !&lt;br /&gt;
成了一家員工超過四千人、市價二十億美金的公司。&lt;br /&gt;
在那事件之前一年推出了我們最棒的作品－麥金塔電腦（ Macintosh），那時我才剛邁入三十歲；然後，我被解僱了。&lt;br /&gt;
我怎麼會被自己創辦的公司給解僱了？（聽眾笑）&lt;br /&gt;
嗯，當蘋果電腦成長後，我請了一個我以為在經營公司上很有才幹的傢伙來，他在頭幾年也確實幹得不錯。&lt;br /&gt;
可是我們對未來的願景不同，最後只好分道揚鑣，董事會站在他那邊，就這樣在我 30歲的時候，公開把我給解僱了。&lt;br /&gt;
我失去了整個生活的重心，我的人生就這樣被摧毀。&lt;br /&gt;
有幾個月，我不知道要做些什麼。&lt;br /&gt;
我覺得我令企業界的前輩們失望－我把他們交給我的接力棒弄丟了。&lt;br /&gt;
我見了創辦 HP的 David Packard跟創辦Intel的 Bob Noyce，跟他們說很抱歉我把事情給搞砸了。&lt;br /&gt;
我成了公眾眼中失敗的示範，我甚至想要離開矽谷。&lt;br /&gt;
但是漸漸的，我發現，我還是喜愛那些我做過的事情，在蘋果電腦中經歷那些事絲毫沒有改變我愛做的事。&lt;br /&gt;
雖然我被否定了，可是我還是愛做那些事情，所以我決定從頭來過。 當時我沒發現，但現在看來，被蘋果電腦開除，是我所經歷過最好的事情。&lt;br /&gt;
成功的沉重被從頭來過的輕鬆所取代，每件事情都不那麼確定，讓我自由進入這輩子最有創意的年代。&lt;br /&gt;
接下來五年，我開了一家叫做 NeXT 的公司，又開一家叫做 Pixar 的公司，也跟後來的老婆（Laurene）談起了戀愛。&lt;br /&gt;
Pixar接著製作了世界上第一部全電腦動畫電影，玩具總動員（Toy Story），現在是世界上最成功的動畫製作公司（聽眾鼓掌大笑）。&lt;br /&gt;
然後，蘋果電腦買下了 NeXT，我回到了蘋果，我們在 NeXT發展的技術成了蘋果電腦後來復興的核心部份。&lt;br /&gt;
我也有了個美妙的家庭。&lt;br /&gt;
我很確定，如果當年蘋果電腦沒開除我，就不會發生這些事情。&lt;br /&gt;
這帖藥很苦口，可是我想蘋果電腦這個病人需要這帖藥。&lt;br /&gt;
有時候，人生會用磚頭打你的頭。不要喪失信心。&lt;br /&gt;
我確信我愛我所做的事情，這就是這些年來支持我繼續走下去的唯一理由&lt;br /&gt;
（I'm convinced that the only thing&amp;nbsp;that kept me going was thatI loved what I did）。&lt;br /&gt;
你得找出你的最愛，工作上是如此，人生伴侶也是如此。&lt;br /&gt;
你的工作將佔掉你人生的一大部分，唯一真正獲得滿足的方法就是做你相信是偉大的工作，而唯一做偉大工作的方法是 愛你所做的事（ And the only way to do great work is&amp;nbsp;to love what you do ）。&lt;br /&gt;
如果你還沒找到這些事，繼續找，別停頓。盡你全心全力，你知道你一定會找到。而且，如同任何偉大的事業，事情只會隨著時間愈來愈好。所以，在你找到之前，繼續找，別停頓。（聽眾鼓掌， Jobs喝水）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;我的第三個故事，是關於死亡。&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
當我十七歲時，我讀到一則格言，好像是「把每一天都當成生命中的最後一天，你就會輕鬆自在。（ If you live each day as if it was your last,&amp;nbsp;someday you'll most certainly be right ）」（聽眾笑）這對我影響深遠， 在過去 33 年裡，我每天早上都會照鏡子，自問：「如果今天是此生最後一日，我今天要做些什麼？」&lt;br /&gt;
每當我連續太多天都得到一個「沒事做」的答案時，我就知道我必須有所改變了。 提醒自己快死了，是我在人生中面臨重大決定時，所用過最重要的方法。&lt;br /&gt;
因為幾乎每件事－所有外界期望、所有的名聲、所有對困窘或失敗的恐懼－在面對死亡時，都消失了，只有最真實重要的東西才會留下（ Remember-ing that I'll be dead soon&amp;nbsp;is the most important tool I've ever encountered&amp;nbsp;to help me make the big choices in life.&amp;nbsp;Because almost everything - all external expectations,&amp;nbsp;all pride, all fear of embarrassment or failure -&amp;nbsp;hese things just fall away in the face of death,&amp;nbsp;leaving only what is truly important ）。&lt;br /&gt;
提醒自己快死了，是我所知避免掉入畏懼失去的陷阱裡最好的方法。&lt;br /&gt;
人生不帶來、死不帶去，沒理由不能順心而為。&lt;br /&gt;
一年前，我被診斷出癌症。我在早上七點半作斷層掃瞄，在胰臟清楚出現一個腫瘤，我連胰臟是什麼都不知道。&lt;br /&gt;
醫生告訴我，那幾乎可以確定是一種不治之症，預計我大概活不到三到六個月了。&lt;br /&gt;
醫生建議我回家，好好跟親人們聚一聚，這是醫生對臨終病人的標準建議。&lt;br /&gt;
那代表你得試著在幾個月內把你將來十年想跟小孩講的話講完。&lt;br /&gt;
那代表你得把每件事情搞定，家人才會儘量輕鬆。&lt;br /&gt;
那代表你得跟人說再見了。&lt;br /&gt;
我整天想著那個診斷結果，那天晚上做了一次切片，從喉嚨伸入一個內視鏡，穿過胃進到腸子，將探針伸進胰臟，取了一些腫瘤細胞出來。&lt;br /&gt;
我打了鎮靜劑，不醒人事，但是我老婆在場。她後來跟我說，當醫生們用顯微鏡看過那些細胞後，他們都哭了，因為那是非常少見的一種胰臟癌，可以用手術治好。&lt;br /&gt;
所以我接受了手術，康復了。（聽眾鼓掌）&lt;br /&gt;
這是我最接近死亡的時候，我希望那會繼續是未來幾十年內最接近的一次。&lt;br /&gt;
經歷此事後，我可以比先前死亡只是純粹想像時，要能更肯定地告訴你們下面這些：&lt;br /&gt;
沒有人想死。即使那些想上天堂的人，也想活著上天堂。（聽眾笑）&lt;br /&gt;
但是死亡是我們共同的終點，沒有人逃得過。&lt;br /&gt;
這是註定的，因為死亡很可能就是生命中最棒的發明，是生命交替的媒介，送走老人們，給新生代開出道路。&lt;br /&gt;
現在你們是新生代，但是不久的將來，你們也會逐漸變老，被送出人生的舞台。抱歉講得這麼戲劇化，但是這是真的。&lt;br /&gt;
你們的時間有限，所以不要浪費時間活在別人的生活裡。&lt;br /&gt;
不要被教條所侷限-- 盲從教條就是活在別人思考結果裡。&lt;br /&gt;
不要讓別人的意見淹沒了你內在的心聲。&lt;br /&gt;
最重要的，擁有追隨自己內心與直覺的勇氣，你的內心與直覺多少已經知道你真正想要成為什麼樣的人（have the courage to follow your heart and intuition.&amp;nbsp;They somehow already know&amp;nbsp;what you truly want to become），任何其他事物都是次要的。（聽眾鼓掌）&lt;br /&gt;
在我年輕時，有本神奇的雜誌叫做 《Whole Earth Catalog》，當年這可是我們的經典讀物。&lt;br /&gt;
那是位住在離這不遠的 Menlo Park 的 Stewart Brand發行的，他把雜誌辦得很有詩意。&lt;br /&gt;
那是 1960年代末期，個人電腦跟桌上出版還沒出現，所有內容都是打字機、剪刀跟拍立得相機做出來的。&lt;br /&gt;
雜誌內容有點像印在紙上的平面 Google，在Google 出現之前35年就有了：&lt;br /&gt;
這本雜誌很理想主義，充滿新奇工具與偉的見解。&lt;br /&gt;
Stewart 跟他的團隊出版了好幾期的《Whole Earth Catalog》，然後很自然的，最後出了停刊號。當時是 1970 年代中期，我正是你們現在這個年齡的時候。在停刊號的封底，有張清晨鄉間小路的照片，那種你四處搭便車冒險旅行時會經過的鄉間小路。&lt;br /&gt;
在照片下印了行小字：&lt;br /&gt;
&lt;blockquote&gt;求知若飢，虛心若愚（Stay Hungry , Stay Foolish）。&lt;/blockquote&gt;那是他們親筆寫下的告別訊息，我總是以此自許。&lt;br /&gt;
當你們畢業，展開新生活，我也以此祝福你們。&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/AddPp48lOUY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/4512051936167423840/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2010/10/apple-ceosteve-jobs.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/4512051936167423840?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/4512051936167423840?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/AddPp48lOUY/apple-ceosteve-jobs.html" title="蘋果Apple CEO賈伯斯Steve Jobs 對史丹佛畢業生演講" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2010/10/apple-ceosteve-jobs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QFQng6fCp7ImA9Wx5UGUU.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-6374170650579966792</id><published>2010-10-25T14:48:00.002+08:00</published><updated>2010-10-25T14:48:33.614+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-25T14:48:33.614+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="router" /><title>Understanding Network Interfaces</title><content type="html">&lt;div style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;a href="" id="vlan.and.bridging.concepts" name="vlan.and.bridging.concepts" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;VLAN and bridging concepts&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="level2" style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;h3 style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="" id="basics" name="basics" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Basics&lt;/a&gt;&lt;/h3&gt;&lt;div class="level3" style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Before getting too far into the details, it's important to know what VLANs are and how they work.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;A VLAN (Virtual LAN) is, in basic terms, a group of physical interfaces on a switch that behave as if they are a separate standalone switch. This allows us to use one physical switch, but partition it into multiple LANs, each one completely isolated from the others. The switch must support VLAN configurations - most cheap switches don't allow this, but high end manageable switches do, as does the internal switch on the OpenWRT.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;VLANs are used when you need to separate traffic between groups of devices, but you only want to use one physical switch. For example you might want one VLAN outside your firewall, for public web/mail servers, and another VLAN for your internal machines such as desktops and boxes with private data. They can't be placed on the same LAN for security reasons, so you use VLANs to isolate the groups of ports.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Let's say we have a 10 port switch, and we configure ports 1-5 as VLAN1 and 6-10 as VLAN2. All devices which are plugged into ports 1 thru 5 behave as if they are on their own switch, and devices in ports 6-10 act as if they're in another switch. The main rule is that communication between ports on separate VLANs is blocked - even if you configure devices with the same subnet, they will not be reachable to devices in other VLANs.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;And of course, it's also possible to configure it differently - if you later decide you need to put another device in VLAN1 and you've only used 4 ports in VLAN2, you can reconfigure _any_ of the VLAN2 ports into VLAN1 (not just port 6). So then you might end up with VLAN1 as ports 1-5 and 8, and VLAN2 as ports 6,7,9,10.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The number of VLANs that you can configure on any OpenWRT device is only limited by the number of ports.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The subject of VLANs can get very complicated and extensive, but this quick summary covers what's needed for using VLANs on the OpenWRT platform.&lt;/div&gt;&lt;/div&gt;&lt;h3 style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="" id="vlan.trunking" name="vlan.trunking" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;VLAN Trunking&lt;/a&gt;&lt;/h3&gt;&lt;div class="level3" style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;If you have a switch with multiple VLANs, you may want to attach a device (such as another switch) that needs to talk to more than one VLAN. This could be a firewall, which will take packets from one VLAN, filter them, then pass them to another VLAN. Alternatively, you might have a second switch that has the same two VLANs on them, and you want the two switches to exchange packets between each other for both VLANs, whilst maintaining the separation.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Rather than wasting ports by using separate ports per VLAN, we use a process known as trunking. One port on the switch must be configured as a trunk port, and this port will have connectivity to all VLANS for which it's set to be a trunk port. If you have a switch with 3 VLANs, you can configure one (or more) trunk port(s) to have connectivity to all VLANs, or just a subset of the VLANs.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;How does the switch maintain isolation with this port? This is done with "tagging". Every packet sent or received from the trunk port has a little tag attached to it, indicating what VLAN it is for or from. So a device receiving packets looks at the tag to see what VLAN that packet is from. When the device sends traffic to the switch, it will add a tag itself, and the switch will look at the tag and send the packet to the VLAN indicated.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In the example of an attached firewall, a packet coming in from the internal LAN will be sent out the trunk port to the firewall, tagged with the internal VLAN number. The firewall will process the packet, then send it back to the switch with a tag for the external VLAN, and the switch will look at this tag and send it to the outside device.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;You can see that a device such as a firewall will see each separate VLAN as if it's a different network interface. The internal VLAN is like a NIC on the inside of the network, and the external interface behaves just like a NIC on the outside. Because of this, most hosts and firewalls that support VLAN tags are setup such that each VLAN tag is as if it was another separate network interface, even though it's the same physical wire.&lt;/div&gt;&lt;/div&gt;&lt;h3 style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="" id="bridging" name="bridging" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Bridging&lt;/a&gt;&lt;/h3&gt;&lt;div class="level3" style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In networking, a bridge is a link between two ethernet interfaces in such a way as to link them together to the same LAN. If you have a box with two bridged ethernet interfaces, then connect each interface to separate switches, the two switches are effectively linked together as if they're connected with a cable. You can also link together a wired ethernet interface with a wireless interface - the two are then linked together, much like a wireless AP or bridge.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;One useful feature of bridging is that the Linux box which is doing the bridging can listen to and send its own traffic. It does this by creating another interface. If you link eth0 and eth1, they will be bound to an interface br0 (or br1, etc). You can then assign an IP address to br0 and it will behave like a normal network interface attached to this bridged network. You cannot configure an IP address on the bridge members (eth0 or eth1), it needs to be done on the bridge interface.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;This knowledge of bridges is important below.&lt;/div&gt;&lt;/div&gt;&lt;h2 style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="" id="interfaces.under.openwrt" name="interfaces.under.openwrt" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Interfaces under OpenWRT&lt;/a&gt;&lt;/h2&gt;&lt;div class="level2" style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;h3 style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="" id="architecture" name="architecture" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Architecture&lt;/a&gt;&lt;/h3&gt;&lt;div class="level3" style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;An OpenWRT box is actually three devices in one. It consists of a VLAN-configurable switch, a wireless port, and a Linux host. The switch and host are connected by one internal "wire", over which VLAN tagged packets are exchanged. All of the physical ethernet ports on the box are just ports on a single internal switch. VLANs are then used to separate the ports into groups. The diagram below shows the architecture.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a class="media" href="http://wiki.openwrt.org/_detail/oldwiki/openwrtdocs/asus-internals-default-sm.png?id=oldwiki%3Aopenwrtdocs%3Anetworkinterfaces" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="oldwiki:openwrtdocs:asus-internals-default-sm.png"&gt;&lt;img alt="" class="media" src="http://wiki.openwrt.org/_media/oldwiki/openwrtdocs/asus-internals-default-sm.png" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;By default, the switch is partitioned into two VLANs. Port 0 is configured as VLAN1, and this is labelled on the case as&amp;nbsp;&lt;acronym style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Wide Area Network"&gt;WAN&lt;/acronym&gt;. Ports 1-4 are configured as VLAN0, labelled on the case as LAN1-4. If you wanted, you could actually configure the&amp;nbsp;&lt;acronym style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Wide Area Network"&gt;WAN&lt;/acronym&gt;&amp;nbsp;port as a LAN port, and a LAN port as the&amp;nbsp;&lt;acronym style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Wide Area Network"&gt;WAN&lt;/acronym&gt;&amp;nbsp;port - the label on the chassis simply shows the&amp;nbsp;&lt;acronym style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Wide Area Network"&gt;WAN&lt;/acronym&gt;&amp;nbsp;port in the default config.&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;See&amp;nbsp;&lt;a class="urlextern" href="http://en.wikipedia.org/wiki/IEEE_802.1Q#Native_VLAN" rel="nofollow" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: url(http://wiki.openwrt.org/lib/tpl/ameoto/images/urlextern.png); background-origin: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 18px; padding-right: 0px; padding-top: 0px;" title="http://en.wikipedia.org/wiki/IEEE_802.1Q#Native_VLAN"&gt;http://en.wikipedia.org/wiki/IEEE_802.1Q#Native_VLAN&lt;/a&gt;&amp;nbsp;The native vlan is not tagged. Only the second VLAN needs to be tagged to separate the two data streams.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;There is an internal port, Port 5, which has a VLAN-tagged connection into the Linux internals. This port is linked to 'eth0' on the Asus WL-500gP. 'eth0' is not configured with an IP address - the kernel takes the raw packets from eth0 and using the VLAN tags, it sorts the packets from VLAN0 and VLAN1. Packets to/from VLAN1 are then mapped to a logical interface called 'vlan1', and packets to/from VLAN0 are mapped to a logical interface called 'vlan0'.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;There is another channel that's not shown here, which is used to configure the switch itself. The link used to send this configuration is not shown, and is a separate logical device under Linux.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Under OpenWRT, the vlan1 interface is then usually configured with the&amp;nbsp;&lt;acronym style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Wide Area Network"&gt;WAN&lt;/acronym&gt;&amp;nbsp;ip address, and all configuration that applies to the&lt;acronym style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Wide Area Network"&gt;WAN&lt;/acronym&gt;&amp;nbsp;interface (eg iptables rules and routes) are applied to the vlan1 interface.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The vlan0 interface is done a bit differently. By default, the wifi interface (eth2) is bridged to the LAN ports, ie any host associated on the wireless port is automatically in the same VLAN/subnet as hosts on the LAN ports. This is done with bridging (see above). As described above, when a bridge is created, a new logical interface is created, called br0, and also as above, this br0 interface is the one that needs to have any IP address configured. So, by default, vlan0 does not have an IP address configured, instead, the LAN interface address is configured on the br0 interface.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;There's also another interface visible from the shell - "eth1". This doesn't appear to be linked to anything, and is probably an unused wire on the ethernet controller, so it's ignored in all configuration. Pretend it doesn't exist. :)&amp;nbsp;&lt;strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;This is the case on the Asus WL-500gP, it may differ on other models&lt;/strong&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="" id="interface.configuration" name="interface.configuration" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Interface configuration&lt;/a&gt;&lt;/h3&gt;&lt;div class="level3" style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;With a knowledge of how interfaces are partitioned, it's now easier to understand how to configure interfaces under OpenWRT.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The following block configures the physical ports into VLANS:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="font-family: monospace; font-size: 14px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre;"&gt;vlan0hwname=et0
vlan0ports="1 2 3 4 5*"
vlan1hwname=et0
vlan1ports="0 5*"
&lt;/pre&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The "hwname" part is always "et0". The device "et0" is the switch itself and tells the system which switch to configure with VLANS. As there's only one switch, this must always be set to "et0". If you do not include port 5 in the VLAN then the traffic will remain on the switch and will never be seen by the cpu.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The ports then are configured. The vlan0 (LAN) is configured with four ports, plus the internal tagged port, port 5. The vlan1 (&lt;acronym style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Wide Area Network"&gt;WAN&lt;/acronym&gt;) is configured with only the one port, plus also the tagged port.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;This configuration then gives us "vlan1", tied to the&amp;nbsp;&lt;acronym style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Wide Area Network"&gt;WAN&lt;/acronym&gt;&amp;nbsp;port, and "vlan0" tied to the other ports. As mentioned earlier, you can change any other port to be the&amp;nbsp;&lt;acronym style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Wide Area Network"&gt;WAN&lt;/acronym&gt;&amp;nbsp;port - just set the vlan1 port to be something else, not that you really need to!&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Vlan 1, which connections the&amp;nbsp;&lt;acronym style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Wide Area Network"&gt;WAN&lt;/acronym&gt;&amp;nbsp;port to the CPU, is then configured with an IP address and mapped to the logical 'wan' interface name:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="font-family: monospace; font-size: 14px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre;"&gt;wan_ifname=vlan1
wan_ipaddr=a.b.c.d
wan_netmask=255.255.255.0
wan_proto=static
&lt;/pre&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Next the LAN side is configured. The bridge must be created and the IP address is assigned to the bridge not a vlan, but overall it's similar:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="font-family: monospace; font-size: 14px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre;"&gt;lan_ifname=br0
lan_ifnames="vlan0 eth2"
lan_proto=static
lan_ipaddr=w.x.y.z
lan_netmask=255.255.255.0
&lt;/pre&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The variable "lan_ifname", which sets the actual interface to configure the IP parameters with, should of course be br0 for a bridged interface. Then the variable "lan_ifnames" actually sets the interfaces which are to be bound to the bridge interface, in this case the vlan0 interface and the wireless interface. The vlan0 ports were defined earlier as wired ports 1-4, so these plus the wireless interface are now one single logical LAN.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;That's basically how the entire network device architecture is on this box. Below is an example of adding another VLAN.&lt;/div&gt;&lt;/div&gt;&lt;h3 style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="" id="dmz.vlan" name="dmz.vlan" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;DMZ Vlan&lt;/a&gt;&lt;/h3&gt;&lt;div class="level3" style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;See also&amp;nbsp;&lt;a class="wikilink1" href="http://wiki.openwrt.org/oldwiki/demilitarizedzonehowto" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="oldwiki:demilitarizedzonehowto"&gt;DemilitarizedZoneHowto&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;If you're running some public servers and are security conscious, you'll probably want to make use of a DMZ (Demilitarized Zone). This is a third VLAN in a network, configured with different rules to the internal secure network. Generally the DMZ is configured to allow access to certain ports from the internet that wouldn't normally be allowed to inside hosts.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Under OpenWRT, a DMZ is easy to configure. A third VLAN is created, and one or more physical ports are mapped to this VLAN, then suitable firewall rules are created for this VLAN. The picture below shows how a DMZ configuration would look inside the device:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a class="media" href="http://wiki.openwrt.org/_detail/oldwiki/openwrtdocs/asus-internals-dmz.png?id=oldwiki%3Aopenwrtdocs%3Anetworkinterfaces" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="oldwiki:openwrtdocs:asus-internals-dmz.png"&gt;&lt;img alt="" class="media" src="http://wiki.openwrt.org/_media/oldwiki/openwrtdocs/asus-internals-dmz.png" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The configuration lines that would be changed for this are:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="font-family: monospace; font-size: 14px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre;"&gt;vlan0ports="2 3 4 5*"
vlan2hwname=et0
vlan2ports="1 5*"
dmz_ifname=vlan2
dmz_proto=static
dmz_ipaddr=192.168.1.22
dmz_netmask=255.255.255.0
&lt;/pre&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;This configuration firstly changes the vlan0 to exclude port 1 which will be our DMZ port. Then the DMZ vlan is created, with ports 1 and 5 (remember 5 is the internal tagged port). Then the logical interface 'dmz' is configured and attached to vlan2. To bring up the new interface, just run "ifup dmz". And of course do your firewall configuration.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;You could even add more DMZ interfaces - you've got a total of six interfaces to play with (including the wireless port) so what we see is that this device is capable of some very impressive routing features - the limit is your imagination.&lt;/div&gt;&lt;/div&gt;&lt;h3 style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="" id="vlan.trunking.on.one.nic" name="vlan.trunking.on.one.nic" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;VLan Trunking on one NIC&lt;/a&gt;&lt;/h3&gt;&lt;div class="level3" style="font-family: sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Provided by&amp;nbsp;&lt;em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Trent W. Buck&lt;/em&gt;&amp;nbsp;aka&amp;nbsp;&lt;em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;twb on #openwrt&lt;/em&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Problem: server has room for only one physical NIC, but it needs access to the internet (i.e. an upstream network) as well as absolute dominion over two&amp;nbsp;&lt;em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;downstream&lt;/em&gt;&amp;nbsp;networks:&amp;nbsp;&lt;em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;admin&lt;/em&gt;&amp;nbsp;and&amp;nbsp;&lt;em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;prisoner&lt;/em&gt;.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;To achieve this, we will create three vlans on both the OpenWRT k7.09 and the Ubuntu 8.04 server. Further, all (or all but one) of the vlans need to be&amp;nbsp;&lt;em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;tagged&lt;/em&gt;&amp;nbsp;across the physical line between the OpenWRT and the Ubuntu server.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Use `robocfg show` to display vlan status. It's probably better (more portable) to cat something in `/proc/switch/`, but I don't know what.&lt;/div&gt;&lt;pre class="code" style="font-family: monospace; font-size: 14px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre;"&gt;OpenWRT# uci show network.eth0
    network.eth0=switch
    network.eth0.vlan0=1 5*
    network.eth0.vlan1=0 5
    network.eth0.vlan2=1t 2 5
    network.eth0.vlan3=1t 3 4 5
&lt;/pre&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In the above, the `5*` indicates that untagged packets on port 5 will be treated (tagged?) as vlan0. The `1t` tells the kernel to tag vlans 2 and 3 on port 1 - note that vlan1 is&amp;nbsp;&lt;strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;not&lt;/strong&gt;&amp;nbsp;tagged on port 1, which is why we eth0 instead of eth0.1 on the Ubuntu server.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Note that we do not set up interfaces eth0.2 or eth0.3, because the OpenWRT MUST NOT be accessible (at the IP layer) from the admin and prisoner networks.&lt;/div&gt;&lt;pre class="code" style="font-family: monospace; font-size: 14px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre;"&gt;Ubuntu# cat /etc/network/interfaces
    auto lo eth0 eth0.2 eth0.3

    iface lo inet loopback
    iface eth0 inet dhcp
    iface eth0.2 inet static
      address 192.168.67.1
      network 192.168.67.0
      netmask 255.255.255.0
      broadcast 192.168.67.255
    iface eth0.3 inet static
      address 192.168.68.1
      network 192.168.68.0
      netmask 255.255.255.0
      broadcast 192.168.68.255
&lt;/pre&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Note that the Ubuntu&amp;nbsp;&lt;em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;vlan&lt;/em&gt;&amp;nbsp;package says not to use vlan1, because it's generally reserved for… stuff. It seems to work for me here, probably because vlan1 is non-tagged.&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/Lr8UPNwp374" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/6374170650579966792/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2010/10/understanding-network-interfaces.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/6374170650579966792?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/6374170650579966792?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/Lr8UPNwp374/understanding-network-interfaces.html" title="Understanding Network Interfaces" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2010/10/understanding-network-interfaces.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0IEQHo5cSp7ImA9Wx9XEU8.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-6169121499422487322</id><published>2010-10-12T18:08:00.001+08:00</published><updated>2011-01-04T14:11:41.429+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-04T14:11:41.429+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Dvorak" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><title>Mac-Style Dvorak QWERTY Control Layout Switcher for Windows</title><content type="html">On Macs, there is a way to have the keyboard layout Dvorak when you type, but when you use a Command key, it switches back to QWERTY so you don't have to remap all the shortcuts or have them in inconvenient places. &lt;br /&gt;
&lt;br /&gt;
This Layout is created for the Dvorak windows users. The layout switches back to QWERTY if the Ctrl key is hold. After you have install the layout, "Dvorak - Ctrl QWERY" will be found".&lt;br /&gt;
&lt;br /&gt;
You can download the layout from the link below. Any comments are welcome.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://rapidshare.com/files/424569287/Dvorak_Ctrl.zip"&gt;http://rapidshare.com/files/424569287/Dvorak_Ctrl.zip&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/-aryVpYHySU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/6169121499422487322/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2010/10/mac-style-dvorak-qwerty-control-layout.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/6169121499422487322?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/6169121499422487322?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/-aryVpYHySU/mac-style-dvorak-qwerty-control-layout.html" title="Mac-Style Dvorak QWERTY Control Layout Switcher for Windows" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2010/10/mac-style-dvorak-qwerty-control-layout.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUACRHc7fCp7ImA9Wx5WF0g.&quot;"><id>tag:blogger.com,1999:blog-2861184151462384984.post-1567029244585391582</id><published>2010-09-29T17:49:00.000+08:00</published><updated>2010-09-29T17:49:25.904+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-29T17:49:25.904+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ipad" /><title>How to Sync Multiple Calendars to the iPad With Google Sync</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 24px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 18px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Yes, we’ve covered Apple’s iPad quite a bit this week. While there are other happenings in the mobile tech world, this was a big one — besides, I haven’t blogged much about it just yet. Oh, I will — I’ve been spending time with the device in bits and pieces over this holiday weekend — but I wanted to let the dust settle in terms of coverage. However, there’s one tidbit I wanted to share now, simply because it solves a problem for Google Calendar users that want to sync events with their iPad&amp;nbsp;&lt;a href="http://www.google.com/mobile/sync/" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #64a0c8; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;using Google Sync&lt;/a&gt;.&lt;/div&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 18px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;The problem is — using a Microsoft Exchange setup for Google accounts currently works for one single calendar on the iPad. I can’t have that, so I scoured the web for a workaround,&lt;a href="http://forums.macrumors.com/showthread.php?t=889140" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #64a0c8; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;found one in a MacRumors forum&lt;/a&gt;, and used it successfully. Here’s the method to use until Google addresses the issue for Apple’s iPad — you’ll need to use the Safari browser, although this might work with user agent string spoofing on other browsers too:&lt;/div&gt;&lt;ul style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; clear: none; display: block; font-size: 15px; font-weight: normal; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 18px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;li class="first" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://s0.wp.com/wp-content/themes/vip/gigaomnetwork2/img/ul-li-bg.png?v=7); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 15px; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 20px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Open Safari and then view its Preferences pane.&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://s0.wp.com/wp-content/themes/vip/gigaomnetwork2/img/ul-li-bg.png?v=7); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 15px; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 20px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;In Preferences, go to the Advanced tab and check “Show Develop menu in menu bar.” If you already have this checked, you can skip this step. Close the Preferences.&lt;a href="http://jkontherun.files.wordpress.com/2010/04/safari-preferences.jpg" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #64a0c8; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;img alt="" class="aligncenter size-full wp-image-61421" height="312" src="http://jkontherun.files.wordpress.com/2010/04/safari-preferences.jpg?w=500&amp;amp;h=312" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-style: initial; border-style: initial; border-top-color: black; border-top-style: solid; border-top-width: 1px; display: block; font-size: 15px; margin-bottom: 20px; margin-left: auto; margin-right: auto; margin-top: 20px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;" title="safari-preferences" width="500" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://s0.wp.com/wp-content/themes/vip/gigaomnetwork2/img/ul-li-bg.png?v=7); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 15px; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 20px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;In the Safari menu bar, you should now see a Develop menu option. Select it, choose the User Agent option and pick “Mobile Safari 3.1.3 — iPhone” This tells web sites that you’re using the iPhone’s browser. You need to do this to open up the mobile site for the Google Sync service.&lt;a href="http://jkontherun.files.wordpress.com/2010/04/iphone-user-agent.jpg" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #64a0c8; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://s0.wp.com/wp-content/themes/vip/gigaomnetwork2/img/ul-li-bg.png?v=7); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 15px; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 20px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;a href="http://jkontherun.files.wordpress.com/2010/04/iphone-user-agent.jpg" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #64a0c8; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;img alt="" class="aligncenter size-full wp-image-61422" height="171" src="http://jkontherun.files.wordpress.com/2010/04/iphone-user-agent.jpg?w=500&amp;amp;h=171" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-style: initial; border-style: initial; border-top-color: black; border-top-style: solid; border-top-width: 1px; display: block; font-size: 15px; margin-bottom: 20px; margin-left: auto; margin-right: auto; margin-top: 20px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;" title="iphone-user-agent" width="500" /&gt;&lt;/a&gt;In Safari, browse to&amp;nbsp;&lt;a href="http://m.google.com/sync" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #64a0c8; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;http://m.google.com/sync&lt;/a&gt;&amp;nbsp;and sign in if needed. Normally you’d do this on your mobile device, but Google isn’t yet recognizing the iPad properly. If you try to configure Google Sync from the iPad, it will say “Sorry, Google Sync is not supported on this device.”&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://s0.wp.com/wp-content/themes/vip/gigaomnetwork2/img/ul-li-bg.png?v=7); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 15px; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 20px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Now go to the Develop menu in Safari and choose to Disable JavaScript as shown by the check mark below.&lt;a href="http://jkontherun.files.wordpress.com/2010/04/disable-javascript.jpg" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #64a0c8; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;img alt="" class="aligncenter size-full wp-image-61423" height="281" src="http://jkontherun.files.wordpress.com/2010/04/disable-javascript.jpg?w=292&amp;amp;h=281" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-style: initial; border-style: initial; border-top-color: black; border-top-style: solid; border-top-width: 1px; display: block; font-size: 15px; margin-bottom: 20px; margin-left: auto; margin-right: auto; margin-top: 20px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;" title="disable-javascript" width="292" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://s0.wp.com/wp-content/themes/vip/gigaomnetwork2/img/ul-li-bg.png?v=7); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 15px; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 20px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Still in Safari, choose to manage your iPad. In my list, it’s the most recent device, but if you use Google Sync across multiple devices, it could appear anywhere in the list.&lt;a href="http://jkontherun.files.wordpress.com/2010/04/google-sync.jpg" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #64a0c8; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;img alt="" class="aligncenter size-full wp-image-61424" height="265" src="http://jkontherun.files.wordpress.com/2010/04/google-sync.jpg?w=373&amp;amp;h=265" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-style: initial; border-style: initial; border-top-color: black; border-top-style: solid; border-top-width: 1px; display: block; font-size: 15px; margin-bottom: 20px; margin-left: auto; margin-right: auto; margin-top: 20px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;" title="google-sync" width="373" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="last" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://s0.wp.com/wp-content/themes/vip/gigaomnetwork2/img/ul-li-bg.png?v=7); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 15px; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 20px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;In the next window, you’ll see that Google says you can sync up to one calendar to your device. Ignore that message because the workaround now allows multiple calendar selections. For instance, I chose three primary calendars and three shared calendars, offering both work and family events in one single view.&lt;a href="http://jkontherun.files.wordpress.com/2010/04/google-calendar-selection.jpg" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #64a0c8; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;img alt="" class="aligncenter size-full wp-image-61425" height="573" src="http://jkontherun.files.wordpress.com/2010/04/google-calendar-selection.jpg?w=375&amp;amp;h=573" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-style: initial; border-style: initial; border-top-color: black; border-top-style: solid; border-top-width: 1px; display: block; font-size: 15px; margin-bottom: 20px; margin-left: auto; margin-right: auto; margin-top: 20px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;" title="google-calendar-selection" width="375" /&gt;&lt;/a&gt;Once you’ve made your selections, click the Save button. That should do it, so don’t forget to&amp;nbsp;&lt;em style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;undo&lt;/em&gt;&amp;nbsp;the User Agent change and re-enable JavaScript in Safari. On the iPad, here’s what the result looks like less than a minute after I ran through these steps:&lt;/li&gt;
&lt;/ul&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 18px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;a href="http://jkontherun.files.wordpress.com/2010/04/gcal.png" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #64a0c8; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;img alt="" class="aligncenter size-large wp-image-61426" height="453" src="http://jkontherun.files.wordpress.com/2010/04/gcal.png?w=604&amp;amp;h=453" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(175, 175, 175); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-color: rgb(175, 175, 175); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(175, 175, 175); border-right-style: solid; border-right-width: 1px; border-style: initial; border-style: initial; border-top-color: rgb(175, 175, 175); border-top-style: solid; border-top-width: 1px; display: block; font-size: 15px; margin-bottom: 20px; margin-left: auto; margin-right: auto; margin-top: 20px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;" title="gcal" width="604" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 18px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;I’m sure Google will address the one calendar limitation with Google Sync, but until they do, you can easily work around the issue in just a few minutes. Hopefully that helps — and now I’m off for some more iPad playtime so I can share all my thoughts soon.&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AmingBlog/~4/dip1i8CVIcc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://aming-blog.blogspot.com/feeds/1567029244585391582/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://aming-blog.blogspot.com/2010/09/how-to-sync-multiple-calendars-to-ipad.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/1567029244585391582?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2861184151462384984/posts/default/1567029244585391582?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmingBlog/~3/dip1i8CVIcc/how-to-sync-multiple-calendars-to-ipad.html" title="How to Sync Multiple Calendars to the iPad With Google Sync" /><author><name>Tommy Lau</name><uri>https://plus.google.com/110294519584928440222</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-PAVpVG1HSKk/AAAAAAAAAAI/AAAAAAAAIqo/rl0j6QXGFuA/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://aming-blog.blogspot.com/2010/09/how-to-sync-multiple-calendars-to-ipad.html</feedburner:origLink></entry></feed>
