<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8300987467364558761</id><updated>2011-12-24T15:46:22.642+07:00</updated><category term='Glipper'/><category term='Windows XP'/><category term='back'/><category term='Sopcast'/><category term='encoding'/><category term='PPTP'/><category term='hidden files'/><category term='ADSL'/><category term='wired connection'/><category term='CodeIgniter'/><category term='temperature'/><category term='LBP2900'/><category term='Windows7'/><category term='Mercurial'/><category term='Skype'/><category term='NERDTree'/><category term='VPN'/><category term='Flash'/><category term='Git'/><category term='printer'/><category term='RAR'/><category term='Mac'/><category term='video'/><category term='Hudson'/><category term='FuzzyFinder'/><category term='recordMyDesktop'/><category term='redirect'/><category term='cpu'/><category term='AVI'/><category term='MySQL'/><category term='UTF-8'/><category term='Thai'/><category term='Rails'/><category term='webcam'/><category term='FreeBSD'/><category term='Intrepid Ibex'/><category term='compile'/><category term='Gnome'/><category term='USB'/><category term='Jar'/><category term='PEAR'/><category term='shared folders'/><category term='Firefox'/><category term='PostgreSQL'/><category term='Hardy Heron'/><category term='Eclipse'/><category term='OGV'/><category term='swf'/><category term='video call'/><category term='mp3'/><category term='JavaScript'/><category term='RVM'/><category term='error'/><category term='DHCP'/><category term='screencast'/><category term='autoconf'/><category term='NTFS'/><category term='Cheese'/><category term='drive'/><category term='ActiveRecord'/><category term='ISO'/><category term='Finder'/><category term='OS X'/><category term='Cucumber'/><category term='Canon'/><category term='tuning'/><category term='TinyOS'/><category term='JSON'/><category term='Rake'/><category term='Heroku'/><category term='shell script'/><category term='Apache Http Server'/><category term='Debian'/><category term='programming'/><category term='tutorial'/><category term='mount'/><category term='Karmic Koala'/><category term='migration'/><category term='Jaunty Jackalope'/><category term='RubyMine'/><category term='ssh'/><category term='route'/><category term='Java'/><category term='autoscan'/><category term='file system'/><category term='Google'/><category term='VLC'/><category term='nesC'/><category term='keybinding'/><category term='Object-Oriented'/><category term='PHP'/><category term='Ruby'/><category term='Linux'/><category term='PHPUnit'/><category term='swap'/><category term='search'/><category term='TinyOS1.X'/><category term='Virtualbox'/><category term='Ubuntu'/><category term='VIM'/><category term='model'/><category term='video screen capture'/><category term='Html'/><category term='memcoder'/><category term='Ant'/><title type='text'>tAp's blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>76</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-7570702296551291913</id><published>2011-12-24T15:46:00.001+07:00</published><updated>2011-12-24T15:46:22.662+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mac'/><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><title type='text'>[PostgreSQL][Mac] Modify root password (Forgot password)</title><content type='html'>&lt;br /&gt;&lt;ul&gt;&lt;li&gt;sudo su postgres&lt;/li&gt;&lt;li&gt;supply your Mac password&lt;/li&gt;&lt;li&gt;modify /Library/PostgreSQL/9.x/data/pg_hba.conf&lt;/li&gt;&lt;ul&gt;&lt;li&gt;from local all all &amp;nbsp; &lt;b&gt;md5&lt;/b&gt;&lt;/li&gt;&lt;li&gt;to local all all &amp;nbsp; &lt;b&gt;trust&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;execute /Library/PostgreSQL/9.x/bin/pg_ctl restart -D&amp;nbsp;&lt;/span&gt;&lt;/b&gt;/Library/PostgreSQL/9.x/data/&lt;/li&gt;&lt;li&gt;run psql&lt;/li&gt;&lt;li&gt;change postgres password&lt;/li&gt;&lt;ul&gt;&lt;li&gt;ALTER USER postgres WITH ENCRYPTED PASSWORD '&lt;b&gt;password&lt;/b&gt;';&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;modify pg_hba.conf back&lt;/li&gt;&lt;li&gt;restart again&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Tested with PostgreSQL version 9.1 OSX Lion&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-7570702296551291913?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/7570702296551291913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=7570702296551291913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7570702296551291913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7570702296551291913'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/12/postgresqlmac-modify-root-password.html' title='[PostgreSQL][Mac] Modify root password (Forgot password)'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-7658466185777133745</id><published>2011-12-04T10:58:00.001+07:00</published><updated>2011-12-04T15:09:10.779+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><category scheme='http://www.blogger.com/atom/ns#' term='Rake'/><title type='text'>Learn some Ruby syntaxes from company source code</title><content type='html'>I think the fastest way to catch up Ruby and Rails idiomatic of my new company is to learn from it directly instead of learning from other available tutorials or books. Below is my note on this learning.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rake&lt;/b&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1426918.js?file=gistfile1.rb"&gt;&lt;/script&gt;&lt;br /&gt;&lt;b&gt;Exec shell command&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;use back-quote such as `ls`&lt;/li&gt;&lt;li&gt;return string from stdout&lt;/li&gt;&lt;li&gt;access Process object with $? such as $?.success&lt;/li&gt;&lt;li&gt;(not related to Ruby) `command 2&amp;gt;/dev/null` get rid of stderr&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;- string.&lt;b&gt;chomp&lt;/b&gt; to remove new line in end of string&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;RSpec &lt;/b&gt;a lot of things on&amp;nbsp;&lt;a href="https://www.relishapp.com/rspec"&gt;https://www.relishapp.com/rspec&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-7658466185777133745?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/7658466185777133745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=7658466185777133745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7658466185777133745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7658466185777133745'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/12/learn-ruby-and-rails-syntax-from.html' title='Learn some Ruby syntaxes from company source code'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-5281473616901058026</id><published>2011-12-01T21:43:00.001+07:00</published><updated>2011-12-01T21:44:30.437+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OS X'/><title type='text'>[MacOSX] How to modify enviroment.plist without any additional tools</title><content type='html'>&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Convert enviroment.plist to XML format with&amp;nbsp;&lt;b&gt;plutil -convert xml1 environment.plist&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Edit it.&lt;/li&gt;&lt;li&gt;Convert it back to binary format with&amp;nbsp;&lt;b&gt;plutil -convert binary1 environment.plist&lt;/b&gt;&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-5281473616901058026?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/5281473616901058026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=5281473616901058026' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5281473616901058026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5281473616901058026'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/12/macosx-how-to-modify-enviromentplist.html' title='[MacOSX] How to modify enviroment.plist without any additional tools'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-1361178075467715785</id><published>2011-12-01T21:38:00.001+07:00</published><updated>2011-12-01T21:45:39.837+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RubyMine'/><category scheme='http://www.blogger.com/atom/ns#' term='OS X'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>[RubyMine] invalid byte sequence in US-ASCII</title><content type='html'>I had this problem when I tried to &lt;b&gt;bundle install&lt;/b&gt;. This causes from System Environment Variables which RubyMine is using is different from you shell and LANG is default to US-ASCII.&lt;br /&gt;&lt;br /&gt;You can fix this (For 10.6+) by add LANG=en_US.UTF-8 to ~/.MacOSX/enviroment.plist&lt;br /&gt;&lt;br /&gt;Please checkout &lt;a href="http://visibletrap.blogspot.com/2011/12/macosx-how-to-modify-enviromentplist.html"&gt;How to modify enviroment.plist without any additional tools&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-1361178075467715785?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/1361178075467715785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=1361178075467715785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1361178075467715785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1361178075467715785'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/12/rubymine-invalid-byte-sequence-in-us.html' title='[RubyMine] invalid byte sequence in US-ASCII'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8878818224946219868</id><published>2011-11-06T20:54:00.003+07:00</published><updated>2011-12-01T21:47:40.618+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FuzzyFinder'/><category scheme='http://www.blogger.com/atom/ns#' term='VIM'/><title type='text'>[VIM] Make newly created file(s) available for search with FuzzyFinder</title><content type='html'>Once your FuzzyFinder has loaded current files, if you create a new file, you have to tell it to reload it by execute:-&lt;br /&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;:FufRenewCache&lt;/blockquote&gt;&lt;br /&gt;Source:&amp;nbsp;&lt;a href="http://www.vim.org/scripts/script.php?script_id=1984"&gt;FuzzyFinder : buffer/file/command/tag/etc explorer with fuzzy matching&lt;/a&gt;&lt;br /&gt;Thanks: &lt;a href="http://twitter.com/virasak"&gt;@virasak&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8878818224946219868?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8878818224946219868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8878818224946219868' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8878818224946219868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8878818224946219868'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/11/once-your-fuzzyfinder-has-loaded.html' title='[VIM] Make newly created file(s) available for search with FuzzyFinder'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-7641587235107338755</id><published>2011-11-06T20:42:00.001+07:00</published><updated>2011-11-06T20:42:46.978+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cucumber'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><title type='text'>How to add helper method to Cucumber's World</title><content type='html'>Add this line to any files under&amp;nbsp;&lt;b&gt;features/supports/&lt;/b&gt;&amp;nbsp;directory&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;World({any_module_names})&lt;/blockquote&gt;Module's name here can be a predefined Rails's helper or your application helper or a new helper which is just created here.&lt;br /&gt;&lt;br /&gt;Then you can access method inside the module in all of your Cucumber's step definitions.&lt;br /&gt;&lt;br /&gt;Credit: &lt;a href="http://www.arailsdemo.com/posts/51"&gt;#51 Integration Tests With Cucumber&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-7641587235107338755?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/7641587235107338755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=7641587235107338755' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7641587235107338755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7641587235107338755'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/11/how-to-add-helper-method-to-cucumbers.html' title='How to add helper method to Cucumber&apos;s World'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-7718854169139182616</id><published>2011-10-30T22:52:00.000+07:00</published><updated>2011-10-30T22:52:07.116+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RVM'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>Upgrade Ruby version which is installed with RVM</title><content type='html'>&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Get latest Ruby version for RVM&lt;/li&gt;&lt;ul&gt;&lt;li&gt;rvm get latest&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Find out current Ruby version&lt;/li&gt;&lt;ul&gt;&lt;li&gt;rvm current (the string between first '-' and '@')&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Find out new Ruby version&lt;/li&gt;&lt;ul&gt;&lt;li&gt;rvm list known&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Upgrade&lt;/li&gt;&lt;ul&gt;&lt;li&gt;rvm upgrade [current version] [new version]&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-7718854169139182616?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/7718854169139182616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=7718854169139182616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7718854169139182616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7718854169139182616'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/10/upgrade-ruby-version-which-is-installed.html' title='Upgrade Ruby version which is installed with RVM'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8873951538046268506</id><published>2011-10-29T10:33:00.001+07:00</published><updated>2011-10-29T10:33:19.439+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='back'/><category scheme='http://www.blogger.com/atom/ns#' term='redirect'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><title type='text'>[Rails] Redirect to previous page</title><content type='html'>In controller, you can specify redirection to go back to previous page that call to this controller by using code below:&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;redirecto_to :back&amp;nbsp;&amp;nbsp;&lt;/blockquote&gt;Note: Rails 3.1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8873951538046268506?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8873951538046268506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8873951538046268506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8873951538046268506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8873951538046268506'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/10/rails-redirect-to-previous-page.html' title='[Rails] Redirect to previous page'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-4479633579362632529</id><published>2011-10-29T10:24:00.000+07:00</published><updated>2011-10-29T10:27:55.876+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='route'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><title type='text'>[Rails] Route alias</title><content type='html'>You can execute&amp;nbsp;&lt;b&gt;"rake routes" &lt;/b&gt;to view display routes in your app.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The &lt;b&gt;first column&lt;/b&gt; of output are &lt;b&gt;route aliases&lt;/b&gt;&amp;nbsp;which you can refer to in your &lt;b&gt;app&lt;/b&gt; or &lt;b&gt;test&lt;/b&gt; by append&amp;nbsp;&lt;b&gt;"_path" &lt;/b&gt;to that alias.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you use &lt;b&gt;resource&lt;/b&gt;&amp;nbsp;in&lt;b&gt; routes.rb&lt;/b&gt;, it will automatically generate CRUD routes and their alias for you.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But if you want to alias your other routes, you can do by append below after your routes&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;, :as =&amp;gt; :{alias you want}&lt;/blockquote&gt;Note: Rails 3.1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-4479633579362632529?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/4479633579362632529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=4479633579362632529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4479633579362632529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4479633579362632529'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/10/rails-route-alias.html' title='[Rails] Route alias'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-1802569286371340816</id><published>2011-10-28T15:14:00.001+07:00</published><updated>2011-10-28T15:16:40.170+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='migration'/><category scheme='http://www.blogger.com/atom/ns#' term='ActiveRecord'/><category scheme='http://www.blogger.com/atom/ns#' term='Heroku'/><category scheme='http://www.blogger.com/atom/ns#' term='model'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><title type='text'>[Heroku] Access Rails's model in migration, heroku rake db:migrate, uninitialized constant</title><content type='html'>I wanted to use Rails's migration to add new column to a table and fill this column with default value.&lt;br /&gt;&lt;div&gt;&lt;blockquote class="tr_bq"&gt;add_column :students, :student_id, :integer&amp;nbsp;&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;Student.all.each { |s| s.update_attributes!(:student_id =&amp;gt; s.id+10000) }&lt;/blockquote&gt;I run this locally.&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;rake db:migrate&lt;/blockquote&gt;It worked without any problem.&lt;br /&gt;&lt;br /&gt;Then I deployed to Heroku and run;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;heroku rake db:migrate&lt;/blockquote&gt;I found this error.&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&amp;nbsp;uninitialized constant AddStudentIdToStudents::Student&lt;/blockquote&gt;After googling for a while, I found this blog post &lt;a href="http://blazingcloud.net/2010/12/02/heroku-migration-fails-to-update-attributes-reset_column_information/"&gt;Heroku Migration Fails to Update Attributes: reset_column_information&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The way to solve this issue(don't know why) is to open up the class inside migration file like this;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&lt;blockquote class="tr_bq"&gt;class AddStudentIdToStudents &amp;lt; ActiveRecord::Migration&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&amp;nbsp; class Student &amp;lt; ActiveRecord::Base; end&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&amp;nbsp; def change&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&amp;nbsp; &amp;nbsp; add_column :students, :student_id, :integer&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&amp;nbsp; &amp;nbsp; Student.all.each { |s| s.update_attributes!(:student_id =&amp;gt; s.id+10000) }&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&amp;nbsp; end&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;end&lt;/blockquote&gt;&lt;/blockquote&gt;This works for me.&lt;br /&gt;&lt;br /&gt;Note: Rails 3.1.0&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-1802569286371340816?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/1802569286371340816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=1802569286371340816' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1802569286371340816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1802569286371340816'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/10/heroku-access-railss-model-in-migration.html' title='[Heroku] Access Rails&apos;s model in migration, heroku rake db:migrate, uninitialized constant'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8162246663066433900</id><published>2011-10-21T13:42:00.003+07:00</published><updated>2011-10-21T13:42:54.722+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><title type='text'>Update Rails 3.x</title><content type='html'>&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Update gems&lt;/li&gt;&lt;ul&gt;&lt;li&gt;bundle update&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Update Rails&lt;/li&gt;&lt;ul&gt;&lt;li&gt;rake rails:update&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;Credit:&amp;nbsp;&lt;a href="http://stackoverflow.com/questions/4495768/how-to-update-a-rails-3-project-to-latest-gems"&gt; How to update a Rails 3 project to latest gems? &lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8162246663066433900?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8162246663066433900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8162246663066433900' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8162246663066433900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8162246663066433900'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/10/update-rails-3x.html' title='Update Rails 3.x'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8798707362349502658</id><published>2011-10-16T12:15:00.000+07:00</published><updated>2011-10-29T10:12:24.977+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='screencast'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><title type='text'>My Note from "The Intro to Rails Screencast I Wish I Had"</title><content type='html'>I found that &lt;a href="http://net.tutsplus.com/tutorials/ruby/the-intro-to-rails-screencast-i-wish-i-had/"&gt;The Intro to Rails Screencast I Wish I Had&lt;/a&gt; is very good in demostrating some tricks that make Rails different to other web development frameworks.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;Below are notes from my 2nd time watching this screencast. What I note are things that I've never known before or I can't really remember the way to use it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Add &lt;b&gt;-T&lt;/b&gt; in &lt;b&gt;rails new&lt;/b&gt;&amp;nbsp;to prevent rails from generating Test::Unit&lt;/li&gt;&lt;li&gt;Gems&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;turn&lt;/b&gt; (Pretty printing for test results)&lt;/li&gt;&lt;li&gt;&lt;b&gt;guard-rspec&lt;/b&gt; (Autotest)&lt;/li&gt;&lt;li&gt;&lt;b&gt;growl_notify&lt;/b&gt;&lt;/li&gt;&lt;li&gt;rb-fsevent&lt;/li&gt;&lt;li&gt;launchy&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;save_and_open_page&lt;/b&gt;&amp;nbsp;(use along with Capybara statements)&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;Guard&lt;/li&gt;&lt;ul&gt;&lt;li&gt;guard init rspec&lt;/li&gt;&lt;li&gt;guard (start guard)&lt;/li&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;RSpec integration test&lt;/li&gt;&lt;ul&gt;&lt;li&gt;rails g integration_test {name}&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Routes&lt;/li&gt;&lt;ul&gt;&lt;li&gt;rake routes&lt;/li&gt;&lt;li&gt;&lt;b&gt;resources &lt;/b&gt;(auto routes)&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Capybara (route_name comes from first column of &lt;b&gt;rake route)&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;visit {route_name}_path&lt;/li&gt;&lt;li&gt;page.should have_content {string}&lt;/li&gt;&lt;li&gt;fill_in {id/name/label}, :with =&amp;gt; {string}&lt;/li&gt;&lt;li&gt;click_button {id/name/label}&lt;/li&gt;&lt;li&gt;current_path.should == {route_name}_path&lt;/li&gt;&lt;li&gt;find_field('').value&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;ActiveModel&lt;/li&gt;&lt;ul&gt;&lt;li&gt;{Model}.create {value}&lt;/li&gt;&lt;li&gt;{model_instance}.update_attributes {fields hash}&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;ERB&lt;/li&gt;&lt;ul&gt;&lt;li&gt;form_for {object} do | f |&lt;/li&gt;&lt;li&gt;f.label :{name}&lt;/li&gt;&lt;li&gt;f.text_field :{name}&lt;/li&gt;&lt;li&gt;f.submit&lt;/li&gt;&lt;li&gt;render '{partial view(No _)}' &amp;nbsp;&amp;lt;- partial view file name must prefix with _&amp;nbsp;&lt;/li&gt;&lt;li&gt;flash.each do | name, message | (come from params passed with redirect_to)&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Controller&lt;/li&gt;&lt;ul&gt;&lt;li&gt;render :text =&amp;gt; params.inspect&lt;/li&gt;&lt;li&gt;redirect_to :back (previous page)&lt;/li&gt;&lt;li&gt;(redirect_to) {:notice | :alert} =&amp;gt; {string} (will be available in flash)&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8798707362349502658?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8798707362349502658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8798707362349502658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8798707362349502658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8798707362349502658'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/10/my-note-from-intro-to-rails-screencast.html' title='My Note from &quot;The Intro to Rails Screencast I Wish I Had&quot;'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-1347710229828814119</id><published>2011-10-08T15:16:00.001+07:00</published><updated>2011-11-06T19:48:55.148+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UTF-8'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><title type='text'>Make Rails accept Non-English Characters</title><content type='html'>Put following line to the &lt;b&gt;first line&lt;/b&gt; of the page that contain Non-English characters&lt;br /&gt;&lt;blockquote&gt;# encoding: utf-8&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-1347710229828814119?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/1347710229828814119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=1347710229828814119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1347710229828814119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1347710229828814119'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/10/make-rails-accept-non-english.html' title='Make Rails accept Non-English Characters'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-5515237980423939550</id><published>2011-09-17T23:44:00.002+07:00</published><updated>2011-09-17T23:45:50.633+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mac'/><category scheme='http://www.blogger.com/atom/ns#' term='VIM'/><title type='text'>[VIM, Mac OSX] How to enable build-in Mac OSX matchit plugin</title><content type='html'>Put these 2 lines to your .vimrc file&lt;br /&gt;&lt;blockquote&gt;filetype plugin on&lt;/blockquote&gt;&lt;blockquote&gt;runtime macros/matchit.vim&amp;nbsp;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-5515237980423939550?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/5515237980423939550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=5515237980423939550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5515237980423939550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5515237980423939550'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/09/vim-mac-os-how-to-enable-build-in-mac.html' title='[VIM, Mac OSX] How to enable build-in Mac OSX matchit plugin'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-4286632314383088362</id><published>2011-09-12T21:39:00.000+07:00</published><updated>2011-09-12T21:40:12.192+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeIgniter'/><title type='text'>Clean up CodeIgniter's database (ActiveRecord) memory usage</title><content type='html'>As what I have found when I was researching there are 2 ways:&lt;br /&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Prevent ActiveRecord from saving query&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;by&lt;/div&gt;&lt;/div&gt;&lt;blockquote&gt;$this-&amp;gt;db-&amp;gt;save_queries = false;&lt;/blockquote&gt;credit: &lt;a href="http://codeigniter.com/forums/viewthread/140012/#689396"&gt;how can I free the memory used by $this-&amp;gt;db-&amp;gt;insert()&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Free result memory - CodeIgniter will only reclaim memory when http query processing was returned. If you request is long, you have to free by yourself&lt;/li&gt;&lt;/ul&gt;by&lt;br /&gt;&lt;blockquote&gt;$query = $this-&amp;gt;db-&amp;gt;query('SELECT title FROM my_table');&lt;br /&gt;$query-&amp;gt;free_result();&lt;/blockquote&gt;credit: last section of &lt;a href="http://codeigniter.com/user_guide/database/results.html"&gt;Generating Query Results&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-4286632314383088362?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/4286632314383088362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=4286632314383088362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4286632314383088362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4286632314383088362'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/09/clean-up-codeigniters-activerecord.html' title='Clean up CodeIgniter&apos;s database (ActiveRecord) memory usage'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8185325774560303701</id><published>2011-09-09T08:57:00.001+07:00</published><updated>2011-09-09T08:57:09.481+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VIM'/><title type='text'>Useful VIM command that I still can't remember</title><content type='html'>&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;“0p&lt;/b&gt; -&amp;nbsp;pastes the last explicitly copied text&lt;/li&gt;&lt;li&gt;&lt;b&gt;:reg&lt;/b&gt; -&amp;nbsp;Show a list of registers&lt;/li&gt;&lt;li&gt;&lt;b&gt;J &lt;/b&gt;-&amp;nbsp;Merge current line With Next Line&lt;/li&gt;&lt;li&gt;&lt;b&gt;=, ==&lt;/b&gt; - Fix indention&lt;/li&gt;&lt;li&gt;&lt;b&gt;u,U(&lt;/b&gt;in visual mode) - lower, uppercase&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8185325774560303701?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8185325774560303701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8185325774560303701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8185325774560303701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8185325774560303701'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/09/useful-vim-command-that-i-still-cant.html' title='Useful VIM command that I still can&apos;t remember'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-5756390836789141858</id><published>2011-08-18T09:46:00.003+07:00</published><updated>2011-08-18T09:54:36.372+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><title type='text'>Git - Global gitignore</title><content type='html'>Some types of temporary files are spanding across project, such as .swp (VIM temporary file type).&lt;br /&gt;&lt;br /&gt;To put *.swp to every project's repositories makes duplicate job.&lt;br /&gt;&lt;br /&gt;One way to solve this issue is to put it to &lt;span style="font-weight:bold;"&gt;Global gitignore.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;From this blog Git &lt;a href="http://programblings.com/2008/10/22/git-global-ignores/"&gt;global ignores&lt;/a&gt;, i will copy to here, also.&lt;br /&gt;&lt;br /&gt;- Create .gitignore file at somewhere, mostly at ~/&lt;br /&gt;&lt;blockquote&gt;git config --global core.excludesfile ~/.gitignore&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;- An pattern of file, you want to do global ignore in to that file.&lt;br /&gt;&lt;br /&gt;That's it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-5756390836789141858?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/5756390836789141858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=5756390836789141858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5756390836789141858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5756390836789141858'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/08/git-global-gitignore.html' title='Git - Global gitignore'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-9027637099938998986</id><published>2011-08-16T14:36:00.005+07:00</published><updated>2011-08-16T21:17:04.954+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NERDTree'/><category scheme='http://www.blogger.com/atom/ns#' term='FuzzyFinder'/><category scheme='http://www.blogger.com/atom/ns#' term='VIM'/><title type='text'>[VIM] Mostly use FuzzyFinder and NERDTree shortkeys</title><content type='html'>Basic VIM&lt;br /&gt;- Open new horizontal split :sp file&lt;br /&gt;- Open new vertical split :vs file&lt;br /&gt;- Switch between split pane: Ctrl-w + { h|j|k|l }&lt;br /&gt;- Rotate pane down/right: Ctrl-w + r&lt;br /&gt;- For more, see &lt;a href="http://vimdoc.sourceforge.net/htmldoc/windows.html"&gt;Vim documentation: windows&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;FuzzyFinder&lt;br /&gt;- Open in vertical split: Ctrl-k&lt;br /&gt;- Open in horizontal split: Ctrl-j&lt;br /&gt;&lt;br /&gt;NERDTree&lt;br /&gt;- Open in vertical split: s&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-9027637099938998986?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/9027637099938998986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=9027637099938998986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/9027637099938998986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/9027637099938998986'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/08/vim-mostly-use-fuzzyfinder-and-nerdtree.html' title='[VIM] Mostly use FuzzyFinder and NERDTree shortkeys'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-9044150545162772403</id><published>2011-08-12T15:18:00.002+07:00</published><updated>2011-08-12T15:23:18.956+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='autoconf'/><category scheme='http://www.blogger.com/atom/ns#' term='compile'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='autoscan'/><title type='text'>[Solved] autoscan: not found</title><content type='html'>If you are in process of compiling something on Ubuntu and you get error similar to these&lt;br /&gt;&lt;blockquote&gt;./bootstrap.sh: 24: autoscan: not found&lt;/blockquote&gt;&lt;br /&gt;You have to install autoscan program but you can not find autoscan with&lt;br /&gt;&lt;blockquote&gt;sudo aptitude search autoscan&lt;/blockquote&gt;&lt;br /&gt;The package name you have to install is autoconf. I don't know why because I'm not an expert on C/Linux but after below command, the compilation works.&lt;br /&gt;&lt;blockquote&gt;sudo apt-get install autoconf&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-9044150545162772403?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/9044150545162772403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=9044150545162772403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/9044150545162772403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/9044150545162772403'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/08/solved-autoscan-not-found.html' title='[Solved] autoscan: not found'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-3917624908879923902</id><published>2011-08-01T09:03:00.006+07:00</published><updated>2011-08-01T09:14:07.981+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Create simple Ubuntu(Debian?) start up script</title><content type='html'>- Create a file at /etc/init.d/&amp;lt;filename&amp;gt;&lt;br /&gt;&lt;blockquote&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;case "${1:-''}" in&lt;br /&gt;  'start')&lt;br /&gt;        # put the command to start&lt;br /&gt;        ;;&lt;br /&gt;  'stop')&lt;br /&gt;        # stop command here&lt;br /&gt;        ;;&lt;br /&gt;  'restart')&lt;br /&gt;        # restart command here&lt;br /&gt;        ;;&lt;br /&gt;  *)&lt;br /&gt;        echo "Usage: $SELF start|stop|restart"&lt;br /&gt;        exit 1&lt;br /&gt;        ;;&lt;br /&gt;esac&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;sudo update-rc.d &amp;lt;filename&amp;gt; defaults&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;sudo /etc/init.d/&amp;lt;filename&amp;gt; &amp;lt;start|stop|restart&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;- To remove&lt;br /&gt;&lt;blockquote&gt;sudo rm /etc/rc*/*&amp;lt;filename&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Credit: &lt;a href="http://serverfault.com/questions/8619/how-do-i-make-sphinx-restart-when-i-reboot-my-ubuntu-server/8721#8721"&gt;Ivan in How do I make sphinx restart when I reboot my Ubuntu server?&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-3917624908879923902?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/3917624908879923902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=3917624908879923902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3917624908879923902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3917624908879923902'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/08/create-simple-ubuntudebian-start-up.html' title='Create simple Ubuntu(Debian?) start up script'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8967155859518795858</id><published>2011-07-28T10:46:00.003+07:00</published><updated>2011-08-12T15:24:52.457+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><title type='text'>Enable remote access to MySQL</title><content type='html'>In MySQL config file, such as my.cnf&lt;br /&gt;- comment out &lt;span style="font-weight:bold;"&gt;skip-networking&lt;/span&gt;&lt;br /&gt;- add &lt;span style="font-weight:bold;"&gt;bind-address    = YOUR_HOST_IP&lt;/span&gt;&lt;br /&gt;- restart mysqld&lt;br /&gt;- log in to mysql from server machine&lt;br /&gt;- do &lt;span style="font-weight:bold;"&gt;GRANT ALL ON DATABASE.TABLE TO USERNAME@'HOST_IP/NAME' IDENTIFIED BY 'PASSWORD';&lt;/span&gt; (Quote is required.)&lt;br /&gt;- on client machine log in with &gt; mysql -u USERNAME -r PASSWORD -h YOUR_HOST_IP&lt;br /&gt;&lt;br /&gt;P.S. If there is no config file you can copy/rename from my-*.cnf in mysql directory&lt;br /&gt;&lt;br /&gt;Credit: &lt;a href="http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html"&gt;How Do I Enable Remote Access To MySQL Database Server?&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8967155859518795858?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8967155859518795858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8967155859518795858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8967155859518795858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8967155859518795858'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/07/enable-remote-access-to-mysql.html' title='Enable remote access to MySQL'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-7907407649942168653</id><published>2011-07-25T11:29:00.004+07:00</published><updated>2011-07-26T10:06:33.288+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VIM'/><title type='text'>More advance commands for moving cursor and screen in VI</title><content type='html'>These are VI commands I have just learned today&lt;br /&gt;&lt;br /&gt;F = reverse of f&lt;br /&gt;t = f and step back 1 char&lt;br /&gt;T = reverse of t&lt;br /&gt;; = repeat f, F, t and T&lt;br /&gt;&lt;br /&gt;H = Move cursor to first line of the screen&lt;br /&gt;M = Move cursor to middle of the screen&lt;br /&gt;B = Move cursor to last line of the screen&lt;br /&gt;&lt;br /&gt;z. = Move screen to make cursor to middle of the screen&lt;br /&gt;zt = Move screen to make cursor to top of the screen&lt;br /&gt;zb = Move screen to make cursor to bottom of the screen&lt;br /&gt;&lt;br /&gt;Ctrl+f = Scroll down 1 screen (Ctrl+d only half screen)&lt;br /&gt;Ctrl+b = reverse of Ctrl+f&lt;br /&gt;&lt;br /&gt;Ctrl+e = Move screen down 1 line with the cursor try to stay at the sameline&lt;br /&gt;Ctrl+y = reverse of Ctrl+y&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-7907407649942168653?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/7907407649942168653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=7907407649942168653' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7907407649942168653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7907407649942168653'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/07/vi-commands-i-have-just-learned-today.html' title='More advance commands for moving cursor and screen in VI'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-1191346357827444939</id><published>2011-07-14T11:22:00.003+07:00</published><updated>2011-07-14T11:31:09.127+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='OS X'/><category scheme='http://www.blogger.com/atom/ns#' term='PEAR'/><category scheme='http://www.blogger.com/atom/ns#' term='Mac'/><category scheme='http://www.blogger.com/atom/ns#' term='PHPUnit'/><title type='text'>How to install PHPUnit to Mac OSX</title><content type='html'>- Install PEAR&lt;br /&gt;&lt;blockquote&gt;curl -O http://pear.php.net/go-pear.phar&lt;br /&gt;php -d detect_unicode=0 go-pear.phar&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;- Install PHPUnit&lt;br /&gt;&lt;blockquote&gt;sudo pear channel-discover pear.phpunit.de&lt;br /&gt;sudo pear channel-discover pear.symfony-project.com&lt;br /&gt;sudo pear channel-discover components.ez.no&lt;br /&gt;sudo pear install --force --alldeps phpunit/PHPUnit&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;- Set phpunit bin path to System Environment Variables&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Credit&lt;/span&gt;&lt;br /&gt;&lt;a href="http://pear.php.net/manual/en/installation.getting.php"&gt;Getting and installing the PEAR package manager&lt;/a&gt;&lt;br /&gt;&lt;a href="http://frodosghost.com/2011/04/18/phpunit-installed-on-mac-osx/"&gt;PHPUnit Installed on Mac OSX&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-1191346357827444939?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/1191346357827444939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=1191346357827444939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1191346357827444939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1191346357827444939'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/07/how-to-install-phpunit-to-mac-osx.html' title='How to install PHPUnit to Mac OSX'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-5163129840650413145</id><published>2011-07-11T21:03:00.004+07:00</published><updated>2011-07-11T21:20:34.513+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='webcam'/><category scheme='http://www.blogger.com/atom/ns#' term='video call'/><category scheme='http://www.blogger.com/atom/ns#' term='Skype'/><category scheme='http://www.blogger.com/atom/ns#' term='Cheese'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>[Solved] Ubuntu can not use webcam for video call, while Cheese is working properly</title><content type='html'>This post is not for people who is facing Linux webcam driver issue, it is for people who can get webcam working (with some application, such as Cheese) but webcam is not working for video calling like Skype or Google video call.&lt;br /&gt;&lt;br /&gt;I also don't know the cause but for solution is to set this to environment variable before running video call application&lt;br /&gt;&lt;blockquote&gt;LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;For convenient, you can rename the original application bin file to other name and making below script naming as bin file.&lt;br /&gt;&lt;br /&gt;For example, I did rename my /usr/bin/google-chrome to /usr/bin/google-chrome.real and create a script at /usr/bin/google-chrome with below content&lt;br /&gt;&lt;blockquote&gt;#!/bin/sh&lt;br /&gt;LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/google-chrome.real&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Now Gmail video call on my Google Chrome should work. (Skype also can do the same way)&lt;br /&gt;&lt;br /&gt;Tested with Ubuntu 10.04 on 32-bits machine.&lt;br /&gt;Credited to some forums in internet. Sorry for forgotten.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-5163129840650413145?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/5163129840650413145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=5163129840650413145' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5163129840650413145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5163129840650413145'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/07/solved-ubuntu-can-not-use-webcam-for.html' title='[Solved] Ubuntu can not use webcam for video call, while Cheese is working properly'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-2940185754571947112</id><published>2011-06-21T14:56:00.002+07:00</published><updated>2011-06-21T14:58:40.891+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VIM'/><title type='text'>[VIM] config per file type</title><content type='html'>add to your .vimrc&lt;br /&gt;&lt;blockquote&gt;autocmd FileType [type] setlocal [configs...] &lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-2940185754571947112?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/2940185754571947112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=2940185754571947112' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2940185754571947112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2940185754571947112'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/06/vim-config-per-file-type.html' title='[VIM] config per file type'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-3588104557498368968</id><published>2011-02-24T12:23:00.003+07:00</published><updated>2011-02-24T12:45:52.544+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><title type='text'>[Git] Rebase</title><content type='html'>So far I have used &lt;span style="font-weight: bold;"&gt;git rebase&lt;/span&gt; for 3 scenarios.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Want to add more change in the commit that is not the last commit of any branch. &lt;a href="http://visibletrap.blogspot.com/2011/02/git-partially-add-some-changes-in-file.html"&gt;Use git rebase -i&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Want to move whole different branch to base on another branch.&lt;br /&gt;&lt;blockquote&gt;          &lt;pre&gt;&lt;tt&gt;&lt;tt&gt;      A---B---C topic&lt;br /&gt;     /&lt;br /&gt;D---E---F---G master&lt;/tt&gt;&lt;/tt&gt;&lt;/pre&gt;to&lt;br /&gt;&lt;pre&gt;&lt;tt&gt;&lt;tt&gt;              A'--B'--C' topic&lt;br /&gt;             /&lt;br /&gt;D---E---F---G master&lt;/tt&gt;&lt;/tt&gt;&lt;/pre&gt;git checkout &amp;lt;branch-to-move&amp;gt;&lt;br /&gt;git rebase &amp;lt;base-branch&amp;gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Want to move part of different branch to base on another branch.&lt;blockquote&gt;&lt;pre&gt;&lt;tt&gt;&lt;tt&gt;    o---o---o---o---o  master&lt;br /&gt;        \&lt;br /&gt;         o---o---o---o---o  next&lt;br /&gt;                          \&lt;br /&gt;                           o---o---o  topic&lt;/tt&gt;&lt;/tt&gt;&lt;/pre&gt;to&lt;br /&gt;&lt;pre&gt;&lt;tt&gt;&lt;tt&gt;o---o---o---o---o  master&lt;br /&gt;    |            \&lt;br /&gt;    |             o'--o'--o'  topic&lt;br /&gt;    \&lt;br /&gt;     o---o---o---o---o  next&lt;/tt&gt;&lt;/tt&gt;&lt;/pre&gt;git rebase --onto &amp;lt;new-base-branch&amp;gt; &amp;lt;old-base-branch&amp;gt; &amp;lt;move-branch&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-3588104557498368968?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/3588104557498368968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=3588104557498368968' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3588104557498368968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3588104557498368968'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/02/git-rebase.html' title='[Git] Rebase'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-1907450673831910193</id><published>2011-02-23T12:04:00.003+07:00</published><updated>2011-11-04T20:54:52.623+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><title type='text'>[Git] delete/remove remote tag</title><content type='html'>To delete/remove remote branch in Git, you use&lt;br /&gt;&lt;blockquote&gt;git push &amp;lt;remote*&amp;gt; :&amp;lt;branch-to-remove&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;Also to delete/remove tag in remote server, you can use&lt;br /&gt;&lt;blockquote&gt;git push &amp;lt;remote&amp;gt; :refs/tags/&amp;lt;tag-to-remote&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;These commands might seem weird and hard to remember. To be able to remember them easier, I suggest you to see this full &lt;b&gt;git push &lt;/b&gt;command&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;git push&amp;nbsp;&amp;lt;remote&amp;gt; &amp;lt;local-branch-name&amp;gt;:&amp;lt;remote-branch-name&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;Then to &lt;b&gt;delete&lt;/b&gt; is to &lt;b&gt;push empty branch&amp;nbsp;to expected branch on remote&lt;/b&gt;. That's all why.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;*&lt;b&gt;remote&lt;/b&gt; is an alias of other repository see &lt;a href="http://gitref.org/remotes/#remote"&gt;git remote&lt;/a&gt;&lt;br /&gt;&lt;u&gt;Credit&lt;/u&gt;: &lt;a href="http://nathanhoad.net/how-to-delete-a-remote-git-tag"&gt;How to: Delete a remote Git tag&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-1907450673831910193?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/1907450673831910193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=1907450673831910193' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1907450673831910193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1907450673831910193'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/02/git-deleteremove-remote-tag.html' title='[Git] delete/remove remote tag'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-5050503729941753833</id><published>2011-02-16T12:57:00.002+07:00</published><updated>2011-02-16T13:05:39.110+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><title type='text'>[Git] Ignore change of a file that is in an index</title><content type='html'>There is a command &lt;span style="font-weight: bold;"&gt;git update-index --assume-unchanged &amp;lt;file&amp;gt; &lt;/span&gt; for ignore.&lt;br /&gt;And there is a command &lt;span style="font-weight:bold;"&gt;git update-index --no-assume-unchanged &amp;lt;file&amp;gt;&lt;/span&gt; for unignore.&lt;br /&gt;&lt;br /&gt;For listing assume-unchanged files use &lt;span style="font-weight:bold;"&gt;git ls-files -v&lt;/span&gt; and see &lt;span style="font-weight:bold;"&gt;lower h&lt;/span&gt; in front of file name. &lt;br /&gt;You can combine this with &lt;span style="font-weight:bold;"&gt;grep "h "&lt;/span&gt;. And you can also use &lt;span style="font-weight:bold;"&gt;git ls-files -v &lt;filename&gt;&lt;/span&gt; if you are interesting only a file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-5050503729941753833?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/5050503729941753833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=5050503729941753833' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5050503729941753833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5050503729941753833'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/02/git-ignore-change-of-file-that-is-in.html' title='[Git] Ignore change of a file that is in an index'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-423919190103772714</id><published>2011-02-16T12:45:00.006+07:00</published><updated>2011-02-16T12:56:28.394+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><title type='text'>[Git] partially add some changes in a file to index</title><content type='html'>- Use &lt;span style="font-weight:bold;"&gt;git add -i (&amp;lt;filename&amp;gt;)&lt;/span&gt;&lt;br /&gt;- Select &lt;span style="font-weight: bold;"&gt;5&lt;/span&gt; (or &lt;span style="font-weight: bold;"&gt;p&lt;/span&gt;) then enter to see changes for selection.&lt;br /&gt;- Choose files by type &lt;span style="font-weight: bold;"&gt;number in front of each file&lt;/span&gt; name and enter.&lt;br /&gt;- Enter again to start.&lt;br /&gt;- Type &lt;span style="font-weight: bold;"&gt;y&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;n&lt;/span&gt; to choose or not choose changes.&lt;br /&gt;&amp;nbsp;&amp;nbsp;Type &lt;span style="font-weight: bold;"&gt;s&lt;/span&gt; to divide changes to smaller sectioin.&lt;br /&gt;&amp;nbsp;&amp;nbsp;Type &lt;span style="font-weight: bold;"&gt;e&lt;/span&gt; to manually choose change.&lt;br /&gt;- After back to main prompt choose &lt;span style="font-weight: bold;"&gt;7&lt;/span&gt; (or &lt;span style="font-weight: bold;"&gt;q&lt;/span&gt;) and enter to leave.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-423919190103772714?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/423919190103772714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=423919190103772714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/423919190103772714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/423919190103772714'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/02/git-partially-add-some-changes-in-file.html' title='[Git] partially add some changes in a file to index'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-3902151622200710455</id><published>2011-02-08T11:36:00.004+07:00</published><updated>2011-02-08T13:43:27.099+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ant'/><title type='text'>Ant OS specific value</title><content type='html'>&lt;blockquote&gt;  &amp;lt;condition property="os.dep.value" value="value for MacOSX"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;os family="mac" /&amp;gt;&lt;br /&gt;&amp;lt;/condition&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;condition property="os.dep.value" value="value for Windows"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;os family="windows" /&amp;gt;&lt;br /&gt;&amp;lt;/condition&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;condition property="os.dep.value" value="value for Unix" &amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;os family="unix" /&amp;gt;&lt;br /&gt;&amp;lt;/condition&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;Use as "${os.dep.value}"&lt;br /&gt;&lt;br /&gt;Creadit: &lt;a href="http://stackoverflow.com/questions/86526/can-i-make-the-ant-copy-task-os-specific"&gt;Can I make the Ant copy task OS-specific? - Stack Overflow&lt;/a&gt;, &lt;a href="http://www.devdaily.com/blog/post/java/how-conditional-operation-ant-script-operating-system"&gt;How to make a conditional decision in an Ant build script based on operating system | java ant | devdaily.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-3902151622200710455?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/3902151622200710455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=3902151622200710455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3902151622200710455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3902151622200710455'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/02/ant-os-specific-value.html' title='Ant OS specific value'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-1395666573995939051</id><published>2011-02-02T10:42:00.003+07:00</published><updated>2011-02-02T11:01:25.354+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ant'/><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><category scheme='http://www.blogger.com/atom/ns#' term='Hudson'/><title type='text'>Generate current Git version in Ant for Hudson</title><content type='html'>At the time I wrote this blog there is no Git Ant task. Workaround for getting current commit version is to use &lt;span style="font-weight: bold;"&gt;exec&lt;/span&gt; directly invoke &lt;span style="font-weight: bold;"&gt;git describe&lt;/span&gt; as below.&lt;br /&gt;&lt;blockquote&gt;&amp;lt;exec executable="git" outputproperty="build.commit"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;arg value="describe"/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;arg value="--tags"/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;arg value="--abbrev=20"/&amp;gt;&lt;br /&gt;&amp;lt;/exec&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;Now you can get result value of git describe from ${build.commit}.&lt;br /&gt;Credit: &lt;a href="http://stackoverflow.com/questions/2974106/how-to-lookup-the-latest-git-commit-hash-from-an-ant-build-script"&gt;How to lookup the latest git commit hash from an ant build script - Stack Overflow&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But there is also some problems with Hudson's git plug-in which it always tags build revision that causes our git describe return the wrong result. &lt;a href="http://issues.hudson-ci.org/browse/HUDSON-5676"&gt;There was someone send patch to fix this&lt;/a&gt; but this is not build to the plug-in yet. Currently workaround is provided in that patch page, add paramter to git describe, "--match=[^(hudson)]*", to ignore tag from Hudson. So we have to add more arg line to Ant's exec task:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;arg value="--match=[^(hudson)]*"&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;That's all.&lt;/arg&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-1395666573995939051?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/1395666573995939051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=1395666573995939051' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1395666573995939051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1395666573995939051'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/02/generate-current-git-version-in-ant-for.html' title='Generate current Git version in Ant for Hudson'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-5672535611683675621</id><published>2011-02-02T10:07:00.003+07:00</published><updated>2011-02-02T10:16:24.259+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><title type='text'>Disable SSH host key checking</title><content type='html'>I summarized this from &lt;a href="http://linuxcommando.blogspot.com/2008/10/how-to-disable-ssh-host-key-checking.html"&gt;Linux Commando: How to disable SSH host key checking&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;He suggested 3 approaches&lt;br /&gt;&lt;ol&gt;&lt;li&gt;$ sed -i 3d ~/.ssh/known_hosts&lt;/li&gt;&lt;li&gt;Use parameters&lt;br /&gt;* StrictHostKeyCheckin&lt;br /&gt;* UserKnownHostsFile&lt;br /&gt;&lt;blockquote&gt;ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no username@hostname&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Config file ~/.ssh/config (or /etc/ssh/ssh_config for global) &amp;amp; restart ssh&lt;br /&gt;&lt;blockquote&gt;Host 192.168.0.*&lt;br /&gt; StrictHostKeyChecking no&lt;br /&gt; UserKnownHostsFile=/dev/null&lt;/blockquote&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-5672535611683675621?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/5672535611683675621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=5672535611683675621' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5672535611683675621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5672535611683675621'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2011/02/disable-ssh-host-key-checking.html' title='Disable SSH host key checking'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8466124347080075184</id><published>2010-11-22T15:01:00.004+07:00</published><updated>2010-11-22T15:07:16.204+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>[Java] What will be printed to a console?</title><content type='html'>&lt;blockquote&gt;ArrayList&amp;lt;Integer&amp;gt; list = new ArrayList&amp;lt;Integer&amp;gt;();&lt;br /&gt;list.add(1);&lt;br /&gt;list.add(2);&lt;br /&gt;list.add(3);&lt;br /&gt;list.remove(1);&lt;br /&gt;System.out.println(list);&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8466124347080075184?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8466124347080075184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8466124347080075184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8466124347080075184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8466124347080075184'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2010/11/java-what-will-be-printed-at-console.html' title='[Java] What will be printed to a console?'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-6336577288596700524</id><published>2010-11-18T10:49:00.002+07:00</published><updated>2010-11-18T10:56:50.398+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title type='text'>Note for starting new Eclipse workspace</title><content type='html'>&lt;ul&gt;&lt;li&gt;Import Formatter.&lt;/li&gt;&lt;li&gt;Customize Save Actions.&lt;/li&gt;&lt;li&gt;Set text editor "spaces for tabs" and "displayed tab width".&lt;/li&gt;&lt;li&gt;For MacOSX, change "Content Assist" short-key.&lt;/li&gt;&lt;li&gt;Set content assist to help import favorite static members.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-6336577288596700524?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/6336577288596700524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=6336577288596700524' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/6336577288596700524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/6336577288596700524'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2010/11/note-for-starting-new-eclipse-workspace.html' title='Note for starting new Eclipse workspace'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-6480375967732187559</id><published>2010-11-01T11:23:00.002+07:00</published><updated>2010-11-01T11:36:21.664+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ant'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Jar'/><title type='text'>[Java] Jars inside Jar</title><content type='html'>Jar that contains multiple jars inside is not support directly by Java. There are some workarounds on this.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Put jars in to jar as ordinary files then load them with your own customized classloader. There is a tool such as &lt;a href="http://one-jar.sourceforge.net/"&gt;One-JAR™&lt;/a&gt; but some people told that it causes performance problem (I have not try this).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Extract jars to .class and pack them together to a single jar. You can archive this easily with &lt;a href="http://ant.apache.org/manual/Tasks/zip.html"&gt;Ant's Zip Task&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;For me, I choose the second approach. There are more workarounds in reference links below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/81260/java-easiest-way-to-merge-a-release-into-one-jar-file"&gt;Java: Easiest way to merge a release into one jar-file&lt;/a&gt;&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/1059851/is-it-possible-to-package-all-the-jar-dependencies-in-one-big-jar"&gt;Is it possible to package all the jar dependencies in one big jar ?&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-6480375967732187559?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/6480375967732187559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=6480375967732187559' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/6480375967732187559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/6480375967732187559'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2010/11/java-jars-inside-jar.html' title='[Java] Jars inside Jar'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-4460397942456372115</id><published>2010-10-31T10:01:00.003+07:00</published><updated>2010-10-31T10:05:59.498+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RAR'/><category scheme='http://www.blogger.com/atom/ns#' term='encoding'/><category scheme='http://www.blogger.com/atom/ns#' term='Thai'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Ubuntu RAR package file name character encoding problem</title><content type='html'>In my Ubuntu (currently version 10.10), package named "rar" has encoding problem with file that has file name in Thai. But for package named "unrar" there is no problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-4460397942456372115?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/4460397942456372115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=4460397942456372115' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4460397942456372115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4460397942456372115'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2010/10/ubuntu-rar-package-file-name-character.html' title='Ubuntu RAR package file name character encoding problem'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-4764623347373273904</id><published>2010-09-18T09:51:00.002+07:00</published><updated>2010-09-18T09:56:45.665+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OS X'/><title type='text'>Graceful OSX Shutdown from command line</title><content type='html'>If you use &lt;span style="font-style: italic;"&gt;shutdown -h now&lt;/span&gt; running GUI programs will be forced to close. To tell them to close use &lt;blockquote&gt;osascript -e 'tell application "System Events"' -e 'shut down' -e 'end tell'&lt;/blockquote&gt;Credit :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://discussions.apple.com/message.jspa?messageID=12195345"&gt;Trying to use the SHUTDOWN command from Terminal.What is the SU password?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://hintsforums.macworld.com/showthread.php?t=51718"&gt;Shutdown/Boot from Terminal  &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-4764623347373273904?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/4764623347373273904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=4764623347373273904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4764623347373273904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4764623347373273904'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2010/09/graceful-osx-shutdown-from-command-line.html' title='Graceful OSX Shutdown from command line'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-4887484117995854435</id><published>2010-06-17T22:00:00.002+07:00</published><updated>2010-06-18T08:52:50.921+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mercurial'/><title type='text'>Hg - How to combine many dirty commits to one</title><content type='html'>You can also make dirty research branch and remove it when done in Hg. Credit to &lt;a href="http://mercurial.selenic.com/wiki/ConcatenatingChangesets"&gt;Concatenating multiple changesets into one&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The concepts are&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Jump to a changeset that is your last stable(good) changeset with command 'update'.&lt;/li&gt;&lt;li&gt;Use command 'revert' to the last changeset of dirty branch*.&lt;/li&gt;&lt;li&gt;Commit reverting, this will produce new head.&lt;/li&gt;&lt;li&gt;Remove old head with command 'strip'** or pull from other repository the new head with command 'pull -r' and delete this repository.&lt;/li&gt;&lt;/ol&gt;* The Branch in this context means any branches in Hg graph does not mean to only Hg named branch.&lt;br /&gt;** Strip is an Hg extension.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-4887484117995854435?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/4887484117995854435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=4887484117995854435' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4887484117995854435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4887484117995854435'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2010/06/hg-how-to-combine-many-dirty-commits-to.html' title='Hg - How to combine many dirty commits to one'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-2966227668288143957</id><published>2010-05-10T11:52:00.005+07:00</published><updated>2010-05-10T12:11:53.812+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSON'/><category scheme='http://www.blogger.com/atom/ns#' term='VIM'/><title type='text'>VIM - How to format and syntax highlight JSON file</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Formatting&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;pre class="bash bash"  style="font-family:monospace;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Run this command in shell &lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;sudo&lt;/span&gt; cpan JSON::XS&lt;/blockquote&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;pre class="bash bash" style="font-family: monospace;"&gt;Put this line to ~/.vimrc &lt;blockquote&gt;map &amp;lt;leader&amp;gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;&lt;/span&gt;jt  &amp;lt;Esc&amp;gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;&lt;/span&gt;:&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;%!&lt;/span&gt;json_xs &lt;span style="color: rgb(102, 0, 51);"&gt;-f&lt;/span&gt; json &lt;span style="color: rgb(102, 0, 51);"&gt;-t&lt;/span&gt; json-pretty&amp;lt;CR&amp;gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;When want to format JSON file press &lt;blockquote&gt;\jt&lt;/blockquote&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;credit : &lt;a href="http://lumberjaph.net/blog/index.php/2009/02/17/tidify-a-json-in-vim/"&gt;“tidify” a json in vim&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Syntax highlighting&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Download json.vim form &lt;a href="http://www.vim.org/scripts/script.php?script_id=1945"&gt;http://www.vim.org/scripts/script.php?script_id=1945&lt;/a&gt; &lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;to ~/.vim/syntax/&lt;/li&gt;&lt;li&gt;Put this line to ~/.vimrc &lt;blockquote&gt;au BufRead,BufNewFile *.json set filetype=json&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;credit : &lt;a href="http://bradmontgomery.blogspot.com/2010/01/add-json-syntax-highlighting-in-vim-on.html"&gt;Add JSON syntax highlighting in Vim on OS X&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-2966227668288143957?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/2966227668288143957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=2966227668288143957' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2966227668288143957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2966227668288143957'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2010/05/vim-how-to-format-and-syntax-highlight.html' title='VIM - How to format and syntax highlight JSON file'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8815010323001420175</id><published>2010-04-23T16:14:00.003+07:00</published><updated>2010-04-23T16:19:31.887+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Html'/><category scheme='http://www.blogger.com/atom/ns#' term='VIM'/><title type='text'>VIM - How to format Html source code</title><content type='html'>&lt;ol&gt;&lt;li&gt;:filetype indent on&lt;/li&gt;&lt;li&gt;:set filetype=html&lt;/li&gt;&lt;li&gt;:set shiftwidth=n    (n = indent size)&lt;/li&gt;&lt;li&gt;:set smartindent&lt;/li&gt;&lt;li&gt;gg=G    (gg = top of file, = is a shortcut of re-tindent, G = botton of file)&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;For 1,3,4 ,  you can predefine at .vimrc. While editing Html file, just do 2 and 5&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8815010323001420175?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8815010323001420175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8815010323001420175' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8815010323001420175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8815010323001420175'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2010/04/vim-how-to-format-html-source-code.html' title='VIM - How to format Html source code'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8305352501770460920</id><published>2010-04-23T15:48:00.006+07:00</published><updated>2010-04-23T16:26:03.157+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='VIM'/><title type='text'>VIM - How to format JavaScript source code</title><content type='html'>&lt;ol&gt;&lt;li&gt;Download this plugin &lt;a href="http://www.vim.org/scripts/script.php?script_id=2727"&gt;jsbeautify&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Copy it to $HOME/.vim/plugin/&lt;/li&gt;&lt;li&gt;In Vim, while you want to format JavaScript code, press \ff*&lt;/li&gt;&lt;/ol&gt;* From jsbeautify's document tells to press &amp;lt;leader&amp;gt;ff which in Vim &amp;lt;leader&amp;gt; by  default is set to "\"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8305352501770460920?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8305352501770460920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8305352501770460920' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8305352501770460920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8305352501770460920'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2010/04/how-to-format-javascript-source-code.html' title='VIM - How to format JavaScript source code'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8749368364666386901</id><published>2010-03-25T15:29:00.002+07:00</published><updated>2010-03-25T15:57:10.267+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Singleton vs Class method</title><content type='html'>I want to tell you before go on through the detail that following article is based on Java. Different implemented language might not have the similar behavior.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Singleton_pattern"&gt;Singleton&lt;/a&gt; or &lt;a href="http://en.wikipedia.org/wiki/Class_method#Static_methods"&gt;Class method&lt;/a&gt; ?&lt;br /&gt;&lt;br /&gt;This topic might too old for some of you but I always was reminded to this issue when I was going to write some method just do some algorithms - take inputs, processing, return output.&lt;br /&gt;&lt;br /&gt;We will find many discussions on this issue if we do googling. Below this are what I conclude those discussions for myself.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Singleton provides &lt;span style="font-weight: bold;"&gt;typing&lt;/span&gt;. You can subclassing or passing it around whatever you can do to an object-oriented instance you can do to Singleton object.&lt;/li&gt;&lt;li&gt;Singleton provides &lt;span style="font-weight: bold;"&gt;state&lt;/span&gt; which a lot of you may think it is disgusting.&lt;/li&gt;&lt;li&gt;Singleton provides &lt;span style="font-weight: bold;"&gt;lazy-initialization&lt;/span&gt;. You have not to have it on your memory until you are really want it.&lt;/li&gt;&lt;li&gt;You can have &lt;span style="font-weight: bold;"&gt;many instances&lt;/span&gt; of Singleton-type. Also can limit number of them. While you can not do this with Class method.&lt;/li&gt;&lt;/ol&gt;I'm going to update this if I find more distinction points&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8749368364666386901?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8749368364666386901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8749368364666386901' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8749368364666386901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8749368364666386901'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2010/03/singleton-vs-class-method.html' title='Singleton vs Class method'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-6133085513404606128</id><published>2010-01-11T11:53:00.003+07:00</published><updated>2010-01-11T11:58:36.845+07:00</updated><title type='text'>Shutdown Mac OS X with command line</title><content type='html'>I have founded that ordinary&lt;br /&gt;&lt;br /&gt;$shutdown -p now&lt;br /&gt;&lt;br /&gt;command line not enough to close Mac box. It doesn't turn the machine off.&lt;br /&gt;&lt;br /&gt;After some googlings, I founded this &lt;a href="http://www.sveinbjorn.org/cljg2macosx"&gt;The Command Line Junkie's Guide To Mac OS X&lt;/a&gt;,&lt;br /&gt;&lt;br /&gt;which tell me that I can shut it down with command :&lt;br /&gt;&lt;br /&gt;&lt;code&gt;osascript -e 'tell application "Finder" to shut down'&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-6133085513404606128?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/6133085513404606128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=6133085513404606128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/6133085513404606128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/6133085513404606128'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2010/01/shutdown-mac-os-x-with-command-line.html' title='Shutdown Mac OS X with command line'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-5032844712790274224</id><published>2010-01-07T14:14:00.003+07:00</published><updated>2010-01-07T14:53:31.241+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java thread stack size</title><content type='html'>Today, I have just known that there's an another interesting parameter to set to JVM. It is java thread stack size.&lt;br /&gt;&lt;br /&gt;With too high thread stack size, it will effect to low number of thread JVM can create - &lt;a href="http://www.odi.ch/weblog/posting.php?posting=411"&gt;see this experiment&lt;/a&gt;. Not enough memory for java thread (cause from too big stack size) will produce &lt;span style="font-weight: bold;"&gt;"java.lang.OutOfMemoryError: unable to create new native thread"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can set java stack thread size by adding &lt;span style="font-weight: bold;"&gt;-XssnK&lt;/span&gt; to JVM argument where n stands for a wanted size.&lt;br /&gt;&lt;br /&gt;Now, I am not sure what is the default java thread stack size. Someone tells it is 512Kb. Another one tells it is up to the platform. One thing is that it's vary between each java versions. However, there is a way to get it from your running JVM. I got this trick from &lt;span class="jive-subject"&gt;&lt;a href="http://forums.java.net/jive/thread.jspa?threadID=43343&amp;amp;tstart=0"&gt;Get thread stack size at runtime&lt;/a&gt;                     &lt;/span&gt;       thanks to claudio. Note that this trick may work only with *nix family. &lt;br /&gt;&lt;br /&gt;First, you have to know your target JVM's pid (process id). If your system has only one JVM running, it is easy to use 'ps' or top to find it. But if it has many, my often used approach is to use&lt;br /&gt;&lt;br /&gt;jps -lv&lt;br /&gt;&lt;br /&gt;and justify it from the informations provided. If the informations are equally the same, help yourself :P.&lt;br /&gt;&lt;br /&gt;Now you have target JVM's pid.&lt;br /&gt;&lt;br /&gt;Then run following command&lt;br /&gt;&lt;br /&gt;jinfo -flag ThreadStackSize {PID}&lt;br /&gt;&lt;br /&gt;The jvm's set thread stack size will show to you in Kb.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-5032844712790274224?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/5032844712790274224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=5032844712790274224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5032844712790274224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5032844712790274224'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2010/01/java-thread-stack-size.html' title='Java thread stack size'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-2895321252283795937</id><published>2009-11-28T15:57:00.004+07:00</published><updated>2009-11-29T08:59:30.666+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VPN'/><category scheme='http://www.blogger.com/atom/ns#' term='PPTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Karmic Koala'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>How to connect VPN via PPTP with Ubuntu</title><content type='html'>I had tried to connect to my office local network with my Karmic machine via PPTP protocol. I saw a VPN stuff when clicked 'Edit Connections' of NetworkManager Applet (normally on top left of you screen) but couldn't do anything to it. So I started googling and found below.&lt;br /&gt;&lt;br /&gt;First, I had to install PPTP for NetworkManager&lt;br /&gt;&lt;pre&gt;sudo apt-get install network-manager-pptp&lt;br /&gt;&lt;/pre&gt;Now, we can do setting PPTP VPN.&lt;br /&gt;&lt;br /&gt;Just enter gateway, username and password your PPTP VPN will be now ready to work.&lt;br /&gt;&lt;br /&gt;But for me, I want to go out to normal internet with my internet router not to go through my office network. I have to do something a bit.&lt;br /&gt;&lt;br /&gt;In editing vpn, click on tab IPv4 setting -&gt; Routes.&lt;br /&gt;&lt;br /&gt;Enter ip(s) that want to use vpn and netmark.&lt;br /&gt;&lt;br /&gt;You can leave another 2 columns, gateway and metric blank.&lt;br /&gt;&lt;br /&gt;Thick in box "Use this connection only for resources on its network"&lt;br /&gt;&lt;br /&gt;done.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Credit : &lt;a href="https://wiki.ubuntu.com/VPN"&gt;VPN - Ubuntu Wiki&lt;/a&gt;, &lt;a href="http://www.ubuntugeek.com/howto-configure-pptp-vpn-in-ubuntu-intrepid-and-jaunty.html"&gt;Howto configure PPTP VPN in Ubuntu Intrepid and Jaunty&lt;/a&gt;&lt;br /&gt;Testing OS : Ubuntu 9.10 (Karmic Koala)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-2895321252283795937?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/2895321252283795937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=2895321252283795937' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2895321252283795937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2895321252283795937'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/11/how-to-connect-vpn-via-pptp-with-ubuntu.html' title='How to connect VPN via PPTP with Ubuntu'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-3593901656018986875</id><published>2009-06-05T13:38:00.003+07:00</published><updated>2009-06-05T13:53:28.456+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='error'/><title type='text'>[FIXED] This project needs to migrate WTP metadata</title><content type='html'>After I checkout code from SVN repository, some of my Eclipse's projects alert this error&lt;br /&gt;&lt;br /&gt;"This project needs to migrate WTP metadata"&lt;br /&gt;&lt;br /&gt;and it's no provide clue for solve them.&lt;br /&gt;&lt;br /&gt;I found this thread &lt;a href="http://stackoverflow.com/questions/503157/eclipse-error-this-project-needs-to-migrate-wtp-metadata" class="question-hyperlink" rel="canonical"&gt;Eclipse error: This project needs to migrate WTP metadata&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There's a way to solve this error almost bottom of the page.&lt;br /&gt;&lt;br /&gt;Just right-click at alerting project and click "Validate"&lt;br /&gt;&lt;br /&gt;Then the problem must be solved&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-3593901656018986875?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/3593901656018986875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=3593901656018986875' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3593901656018986875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3593901656018986875'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/06/fixed-this-project-needs-to-migrate-wtp.html' title='[FIXED] This project needs to migrate WTP metadata'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-4434172907714328572</id><published>2009-05-31T11:51:00.005+07:00</published><updated>2009-05-31T12:22:58.472+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gnome'/><category scheme='http://www.blogger.com/atom/ns#' term='keybinding'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Advance Ubuntu keybindings setting</title><content type='html'>You can go to System -&gt; Preferences -&gt; Keyboard Shortcuts for normal shortkey setting but it isn't enough for me because it isn't work with "Windows" key.&lt;br /&gt;&lt;br /&gt;I want Windows+d to bind to "show desktop" as used in Windows but Keyboard Shortcuts doesn't work in this case.&lt;br /&gt;&lt;br /&gt;And I found from here &lt;a href="http://ubuntuforums.org/showthread.php?t=891023"&gt;How come pressing Super+D doesn't show my desktop?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There's deeper setting.&lt;br /&gt;&lt;br /&gt;Run gconf-editor (at command line)&lt;br /&gt;&lt;br /&gt;and went to apps -&gt; metacity -&gt; global_keybindings and change "show_desktop" from "&lt;control&gt;&lt;alt&gt;d" to "&lt;mod4&gt;d" (Mod4 is represent Windows key)&lt;br /&gt;&lt;br /&gt;And I have also binded "run_command_terminal" to "&lt;mod4&gt;t"&lt;br /&gt;&lt;br /&gt;&lt;/mod4&gt;&lt;/mod4&gt;&lt;/alt&gt;&lt;/control&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-4434172907714328572?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/4434172907714328572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=4434172907714328572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4434172907714328572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4434172907714328572'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/05/advance-ubuntu-keybindings-setting.html' title='Advance Ubuntu keybindings setting'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-3716503764796404488</id><published>2009-05-31T11:18:00.007+07:00</published><updated>2009-06-06T02:35:47.791+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jaunty Jackalope'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Configurations after installation my Jaunty Jackalope</title><content type='html'>After clean installation new Ubuntu - Ubuntu 9.04 or Jaunty Jackalope, I have made many configurations and installing softwares.&lt;br /&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class="" style="display: block;" id="formatbar_FontSize" title="Font size" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);toggleFontSizeMenu();ButtonMouseDown(this);"&gt;&lt;img src="http://www.blogger.com/img/blank.gif" alt="Font size" class="gl_size" border="0" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;For softwares installations, I chose from Add/Remove so nothing to remember just tick and click but I might forget what and how to make some configurations next installtion time so below is my jot down about these.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Enable gsynaptics by &lt;a href="https://help.ubuntu.com/community/SynapticsTouchpad#shmconfig"&gt;Enabling SHMConfig&lt;/a&gt; and &lt;a href="https://help.ubuntu.com/community/SynapticsTouchpad#Disabling%20the%20Touchpad%20Temporarily%20While%20Typing"&gt;Disabling the Touchpad Temporarily While Typing&lt;/a&gt;. Adding disabling to Application Startup with 0.3s disable &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://visibletrap.blogspot.com/2008/12/vim-tab-size-tab-to-space-setting.html"&gt;VIM - tab size &amp;amp; tab to space setting&lt;/a&gt; with 2 space tab size&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://visibletrap.blogspot.com/2009/05/ubuntu-automount-ntfs-drive.html"&gt;Ubuntu : Automount NTFS Drive&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://visibletrap.blogspot.com/2009/05/advance-ubuntu-keybindings-setting.html"&gt;Advance Ubuntu keybindings setting&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Firefox : add-ons - Delicious, NoScript, Google Reader Watcher, Gmail Notifier, DownThemAll : Adobe Flash player plug-in : config every font types from default and Serif to San serif and don't allow web to choose&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;That's all for now. I will add it if more configurations are added&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-3716503764796404488?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/3716503764796404488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=3716503764796404488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3716503764796404488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3716503764796404488'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/05/configuration-in-jaunty-jackalope.html' title='Configurations after installation my Jaunty Jackalope'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-331048398750934189</id><published>2009-05-31T10:24:00.002+07:00</published><updated>2009-05-31T10:46:06.997+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jaunty Jackalope'/><category scheme='http://www.blogger.com/atom/ns#' term='NTFS'/><category scheme='http://www.blogger.com/atom/ns#' term='drive'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Ubuntu : Automount NTFS Drive</title><content type='html'>For my Ubuntu (9.04), automount ntfs drive don't come out-of-box. It might have been happening for many versions but I didn't notice.&lt;br /&gt;&lt;br /&gt;This automount have made some problem to me. For instance, my Rhythmbox Library. Because my musics file was keeping in ntfs drive, so everytime the system was boot the library was error because the drive hadn't mounted. So I want automount very much.&lt;br /&gt;&lt;br /&gt;I think I might have fixed it for my 8.04. For 8.10, I used synaptic upgrade from 8.04 so it might still have the configuration from 8.04.&lt;br /&gt;&lt;br /&gt;The issue was happended again when I have a clean installation with Jaunty Jackalope.&lt;br /&gt;&lt;br /&gt;After some googling, there are many ways to fix this issue but it's too many things to do than I think it should be. Such as fix fstab blah blah. With a great community, there must be easy way to do this.&lt;br /&gt;&lt;br /&gt;And now I have found it. Easy one&lt;br /&gt;&lt;br /&gt;credit from &lt;a class="bigusername" href="http://ubuntuforums.org/member.php?u=373057"&gt;&lt;span style="font-weight: bold; color: rgb(34, 85, 12);"&gt;Joeb454&lt;/span&gt;&lt;/a&gt; : &lt;a href="http://ubuntuforums.org/showthread.php?t=785263"&gt;&lt;strong&gt;HowTo: Automount NTFS Drives&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can follow this link to tg/showthread.php?t=785263he solution or see the summarization for myself below.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Install ntfs-config (via apt-get)&lt;/li&gt;&lt;li&gt;Unmount wanted drive (if it had mounted)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Open it (somewhere in menus or run with command line)&lt;/li&gt;&lt;li&gt;Choose drive(s)&lt;/li&gt;&lt;li&gt;Enable Write Support for Internal Drives&lt;/li&gt;&lt;/ul&gt;That's all! After you boot up your system again, you drive will be automounted.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-331048398750934189?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/331048398750934189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=331048398750934189' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/331048398750934189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/331048398750934189'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/05/ubuntu-automount-ntfs-drive.html' title='Ubuntu : Automount NTFS Drive'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-3850771510850561292</id><published>2009-04-07T15:32:00.003+07:00</published><updated>2009-04-07T15:40:21.429+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hidden files'/><category scheme='http://www.blogger.com/atom/ns#' term='OS X'/><category scheme='http://www.blogger.com/atom/ns#' term='Finder'/><category scheme='http://www.blogger.com/atom/ns#' term='Mac'/><title type='text'>How to show hidden and protected files in OS X Finder</title><content type='html'>I have followed the method from the following blog &lt;a href="http://devnulled.com/content/2007/08/how-to-show-hidden-and-protected-files-in-os-x-finder/"&gt;How To Show Hidden and Protected Files in OS X Finder&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;but for my convenient I will make a summarize here.&lt;br /&gt;&lt;br /&gt;There is just only 2 steps&lt;br /&gt;&lt;pre&gt;defaults write com.apple.finder AppleShowAllFiles TRUE&lt;br /&gt;killall Finder&lt;br /&gt;&lt;br /&gt;boom!!! Your hidden files is shown.&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-3850771510850561292?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/3850771510850561292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=3850771510850561292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3850771510850561292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3850771510850561292'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/04/how-to-show-hidden-and-protected-files.html' title='How to show hidden and protected files in OS X Finder'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-3672310910686246778</id><published>2009-03-19T13:30:00.004+07:00</published><updated>2009-03-19T13:47:05.436+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache Http Server'/><title type='text'>Add more Listenning port to Apache Http Server for Ubuntu</title><content type='html'>I have to tell you that this is my method. I'm not sure is there any better workaround to handle this. I'm on Ubuntu Intrepid Ibex.&lt;br /&gt;&lt;br /&gt;First, I add this 2 lines to /etc/apache2/ports.conf (I'm gonna add listenning port at port 8000)&lt;br /&gt;&lt;br /&gt;NameVirtualHost *:8000&lt;br /&gt;Listen 8000&lt;br /&gt;&lt;br /&gt;Second, Edit file named /etc/apache2/site-enabled/000-default by following step&lt;br /&gt;&lt;br /&gt;copy content of all in &lt;virtualhost&gt;&lt;/virtualhost&gt; and paste text next to the old one and change *:80 of the new one to *:8000&lt;br /&gt;&lt;br /&gt;So you have something similar to this &lt;virtualhost&gt;...&lt;/virtualhost&gt;&lt;virtualhost&gt;...&lt;/virtualhost&gt;&lt;br /&gt;&lt;br /&gt;Last, restart your apache with this command "/etc/init.d/apache2 restart"&lt;br /&gt;&lt;br /&gt;Booom! Your Apache Http Server will now can listen to 8000 port.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Failed memo&lt;/span&gt; :&lt;br /&gt;1. can't restart apache with this command apache2 -k restart&lt;br /&gt;2. If adding just Listen 8000 in  /etc/apache2/ports.conf, the 8000 port query is listenned but no thing is displayed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-3672310910686246778?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/3672310910686246778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=3672310910686246778' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3672310910686246778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3672310910686246778'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/03/add-more-listenning-port-to-apache-http.html' title='Add more Listenning port to Apache Http Server for Ubuntu'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-2017524895185462441</id><published>2009-03-19T13:24:00.002+07:00</published><updated>2009-03-19T13:30:26.335+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shared folders'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows XP'/><title type='text'>Shared folders for Windows XP guest on Virtualbox</title><content type='html'>After set shared folders at Virtualbox, Windows XP finds that folder by itself.&lt;br /&gt;&lt;br /&gt;It's at&lt;br /&gt;&lt;br /&gt;My Network Places -&gt; Entire Network -&gt; VirtualBox Shared Folders&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;notice &lt;/span&gt;: one thing I'm not sure is that I have already install Virtualbox guest addtions before set this shared folders&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-2017524895185462441?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/2017524895185462441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=2017524895185462441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2017524895185462441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2017524895185462441'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/03/shared-folders-for-windows-xp-guest-on.html' title='Shared folders for Windows XP guest on Virtualbox'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-2311709189394975645</id><published>2009-03-18T15:27:00.003+07:00</published><updated>2009-03-18T15:34:47.815+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='video screen capture'/><category scheme='http://www.blogger.com/atom/ns#' term='recordMyDesktop'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Ubuntu video screen capture</title><content type='html'>This blog is my memo.&lt;br /&gt;&lt;br /&gt;I have use &lt;a href="http://recordmydesktop.sourceforge.net/about.php"&gt;recordMyDesktop&lt;/a&gt; for do a video screen capture. Its functions is ok for me. I was install it via Synaptic Package Manager.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-2311709189394975645?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/2311709189394975645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=2311709189394975645' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2311709189394975645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2311709189394975645'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/03/ubuntu-video-screen-capture.html' title='Ubuntu video screen capture'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-7311832970113578014</id><published>2009-03-18T15:09:00.003+07:00</published><updated>2009-03-18T15:14:06.069+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shared folders'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='Intrepid Ibex'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows7'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Shared folders for Windows 7 Beta guest in Virtualbox 2.1.4</title><content type='html'>I found the trick &lt;a href="http://www.worthinstalling.com/2009/02/update-sun-vxm-virtualbox-214.html"&gt;here&lt;/a&gt;. I have tried it and it's work for me. My machine is Ubuntu Intrepid Ibex which running Virtualbox 2.1.4&lt;br /&gt;&lt;br /&gt;- open Regedit (as administrator)&lt;br /&gt;- navigate to this key and change the value to 0 (zero): HKLM\SYSTEM\CurrentControlSet001\Services\VBoxGuest\Start&lt;br /&gt;- reboot the Windows 7 guest&lt;br /&gt;- create a shared folder&lt;br /&gt;- Navigate to (or map to a letter) \\vboxsvr\SHARENAME&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-7311832970113578014?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/7311832970113578014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=7311832970113578014' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7311832970113578014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7311832970113578014'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/03/shared-folders-for-windows-7-beta-guest.html' title='Shared folders for Windows 7 Beta guest in Virtualbox 2.1.4'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-6290692994624934620</id><published>2009-03-16T16:08:00.007+07:00</published><updated>2009-03-16T16:22:47.900+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Intrepid Ibex'/><category scheme='http://www.blogger.com/atom/ns#' term='DHCP'/><category scheme='http://www.blogger.com/atom/ns#' term='ADSL'/><category scheme='http://www.blogger.com/atom/ns#' term='wired connection'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>[Solved] Can't connect with wired DHCP enabled ADSL router in Ubuntu Intrepid (8.10)</title><content type='html'>I got a problem that my Intrepid can't connect with wired DHCP enabled ADSL router, which it works fine with other machines running Windows XP&lt;br /&gt;&lt;br /&gt;After googling awhile, I found this thread &lt;a href="http://ubuntuforums.org/showthread.php?t=1045255"&gt;Can't connect to internet via ADSL with 8.10&lt;/a&gt;. And my problem was solved with the method in it.&lt;br /&gt;&lt;br /&gt;I will summarize it here once :&lt;br /&gt;&lt;br /&gt;1. Remove the words "interface-mtu" out of /etc/dhcp3/dhclient.conf&lt;br /&gt;&lt;br /&gt;2. Edit /etc/NetworkManager/nm-system-settings.conf and changed managed=false to managed=true.&lt;br /&gt;&lt;br /&gt;3. Reboot&lt;br /&gt;&lt;br /&gt;done.&lt;br /&gt;&lt;br /&gt;hope it's also work with your machine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-6290692994624934620?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/6290692994624934620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=6290692994624934620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/6290692994624934620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/6290692994624934620'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/03/solved-cant-connect-with-wired-dhcp.html' title='[Solved] Can&apos;t connect with wired DHCP enabled ADSL router in Ubuntu Intrepid (8.10)'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8970006509880781939</id><published>2009-02-14T16:19:00.003+07:00</published><updated>2009-02-14T16:23:29.192+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OGV'/><category scheme='http://www.blogger.com/atom/ns#' term='memcoder'/><category scheme='http://www.blogger.com/atom/ns#' term='AVI'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>OGV to AVI with mencoder</title><content type='html'>I have a problem with importing video file that extension is ogv to Openoffice Impress so I decided to convert it to avi. After googling a while I got following commands (I just copy &amp;amp; paste it, will examine it later)&lt;br /&gt;&lt;br /&gt;mencoder input.ogm -ovc xvid -oac mp3lame -xvidencopts pass=1 -o output.avi&lt;br /&gt;&lt;br /&gt;and&lt;br /&gt;&lt;br /&gt;mencoder -idx input.ogv -ovc lavc -oac mp3lame -o out.avi&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8970006509880781939?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8970006509880781939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8970006509880781939' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8970006509880781939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8970006509880781939'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/02/ogv-to-avi-with-mencoder.html' title='OGV to AVI with mencoder'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-1244630190426092520</id><published>2009-02-08T01:23:00.003+07:00</published><updated>2009-02-08T01:28:51.270+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='swf'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>How to save flash file (swf) using firefox</title><content type='html'>call following command in address bar&lt;br /&gt;&lt;br /&gt;&lt;b&gt;about:cache?device=disk&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;ctrl-F to find swf you want by search the URL name of web page where wanted flash reside&lt;br /&gt;&lt;br /&gt;then you can download as usual file&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Testing platform : Ubuntu8.10 with Firefox 3.0.5&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;credit : &lt;a href="http://www.technobuzz.net/download-save-flash-animation-files-in-firefox-or-ie/"&gt;Download &amp;amp; Save Flash Animation Files in Firefox or IE&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-1244630190426092520?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/1244630190426092520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=1244630190426092520' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1244630190426092520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1244630190426092520'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/02/how-to-save-flash-file-swf-using.html' title='How to save flash file (swf) using firefox'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-390280517419746873</id><published>2009-01-23T20:55:00.007+07:00</published><updated>2009-03-10T22:11:27.013+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mp3'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>How to convert unreadable mp3 tag in Ubuntu?</title><content type='html'>In Asian language (for me, Thai) always suffer unreadable mp3 tag. Here is a workaround to solve it.&lt;br /&gt;&lt;br /&gt;install python-mutagen with this command&lt;br /&gt;&lt;br /&gt;sudo apt-get install python-mutagen&lt;br /&gt;&lt;br /&gt;cd to directory that your files at&lt;br /&gt;&lt;br /&gt;and use it with this command&lt;br /&gt;&lt;br /&gt;find . -iname "*.mp3" -execdir mid3iconv -e &lt;span style="font-weight: bold;"&gt;[encode]&lt;/span&gt; {} \;&lt;br /&gt;&lt;br /&gt;done.&lt;br /&gt;&lt;br /&gt;you can choose &lt;span style="font-weight: bold;"&gt;encode&lt;/span&gt; that suit to your language &lt;a href="http://www.gnu.org/software/libiconv/"&gt;here&lt;/a&gt;. For Thai user use ISO-8859-11&lt;br /&gt;&lt;br /&gt;credit : &lt;a href="https://help.ubuntu.com/community/ConvertingMP3Tags"&gt;ConvertingMP3Tags&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-390280517419746873?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/390280517419746873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=390280517419746873' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/390280517419746873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/390280517419746873'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/01/how-to-convert-unreadable-mp3-tag-in.html' title='How to convert unreadable mp3 tag in Ubuntu?'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-3621414319357052127</id><published>2009-01-19T01:33:00.003+07:00</published><updated>2009-01-19T01:41:53.746+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='Glipper'/><title type='text'>Copy non-formatted(plain) text in Ubuntu</title><content type='html'>Sometime, when we are browsing in the rich text place such as web page and we want to copy some text to our writing field (also rich text field too) without text format but normally it can not do.&lt;br /&gt;&lt;br /&gt;In Ubuntu, there is a tool to help you called "Glipper"&lt;br /&gt;&lt;br /&gt;you can install it with this command&lt;br /&gt;&lt;br /&gt;sudo apt-get install glipper&lt;br /&gt;&lt;br /&gt;and then you can add it to your panel. Its name is "Clipboard manager" in Add to Panel menu.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-3621414319357052127?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/3621414319357052127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=3621414319357052127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3621414319357052127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3621414319357052127'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/01/copy-non-formattedplain-text-in-ubuntu.html' title='Copy non-formatted(plain) text in Ubuntu'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-1634441785848238138</id><published>2009-01-19T01:27:00.003+07:00</published><updated>2009-01-19T01:32:56.489+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cpu'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='temperature'/><title type='text'>Ubuntu CPU temperature monitor</title><content type='html'>To monitor temperature of CPU, I'm using panel's item called "Computer Temperature Monitor"&lt;br /&gt;&lt;br /&gt;To get it use this command&lt;br /&gt;&lt;br /&gt;sudo apt-get install computertemp&lt;br /&gt;&lt;br /&gt;then you have to add  it to you panel by right-click at a panel, select Add to Panel. Then search with word "temp". There, that's your item to add&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-1634441785848238138?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/1634441785848238138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=1634441785848238138' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1634441785848238138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1634441785848238138'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2009/01/ubuntu-cpu-temperature-monitor.html' title='Ubuntu CPU temperature monitor'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-4792461894744083852</id><published>2008-12-22T09:25:00.003+07:00</published><updated>2008-12-22T09:44:36.894+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VLC'/><category scheme='http://www.blogger.com/atom/ns#' term='Sopcast'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>My first shell script</title><content type='html'>I'm the one of English Premiere league fans but my dorminitory doesn't provide TV channel for it. So I have to find out my own. Fortunately, there are several pirate channel available on the internet in the shape of p2p client. One of that is &lt;a href="http://www.sopcast.org/"&gt;Sopcast&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Sopcast provides very easy using application for Windows OS user but it's not me. For Linux user there are a program that can invoke by command line and you have to use your own media player to play it yourself (In fact, there are someone writing linux's front-end Sopcast but it's not work in the way I want)&lt;br /&gt;&lt;br /&gt;My problem is that I can't remember the command to run it. Every weekend, I have to open README file of Sopcast for the program running instruction. So I decided to write a script to handle it automatically. And it's also my first shell script ever. Here it is.&lt;br /&gt;&lt;blockquote&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;echo Start Sopcast at $1&lt;br /&gt;/usr/local/bin/sp-sc $1 3908 8908 &gt; /dev/null &amp;amp;&lt;br /&gt;echo Waiting for Sopcast starting&lt;br /&gt;sleep 10&lt;br /&gt;vlc http://localhost:8908/tv.asf&lt;/blockquote&gt;From now on, any other weekend, no README file. This makes me love not-Windows OS more and more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-4792461894744083852?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/4792461894744083852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=4792461894744083852' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4792461894744083852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4792461894744083852'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/12/my-first-shell-script.html' title='My first shell script'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-3438889875116549949</id><published>2008-12-20T12:56:00.005+07:00</published><updated>2010-04-23T16:14:20.306+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='VIM'/><title type='text'>VIM - tab size &amp; tab to space setting</title><content type='html'>to change tab size use this command&lt;br /&gt;:set ts=n&lt;br /&gt;(n=expected size ,ts=tabstop)&lt;br /&gt;&lt;br /&gt;to change tab to space use this command&lt;br /&gt;:set et&lt;br /&gt;(et = expandtab)&lt;br /&gt;&lt;br /&gt;also invoke it together like this&lt;br /&gt;:set ts=4 et&lt;br /&gt;&lt;br /&gt;if you want permanent changing, add command above to file named .vimrc (normally is at your home folder)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-3438889875116549949?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/3438889875116549949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=3438889875116549949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3438889875116549949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/3438889875116549949'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/12/vim-tab-size-tab-to-space-setting.html' title='VIM - tab size &amp; tab to space setting'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-2543030617742408825</id><published>2008-12-15T00:04:00.003+07:00</published><updated>2008-12-15T00:09:45.692+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tuning'/><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><title type='text'>FreeBSD Assignment#1 Answer</title><content type='html'>หลังจากหมดเขตส่งแล้ว(00.00 12/15/2008) ก็เอางานมาโพสหน่อยละกัน อาจจะไม่มีประโยชน์สำหรับคนอื่นเท่าไหร่ แต่ก็เผื่อมาอ่านผ่านๆ ตา แล้วค่อยไปค้นเนื้อหาเต็มต่อละกัน&lt;br /&gt;&lt;br /&gt;เป็นงานย่อความของลิงค์ต่อไปนี้&lt;br /&gt;- http://www.freebsd.org/cgi/man.cgi?query=tuning&lt;br /&gt;- http://www.freebsd.org/doc/en/books/handbook/configtuning-kernel-limits.html&lt;br /&gt;- http://silverwraith.com/papers/freebsd-tuning.php&lt;br /&gt;- http://www.freebsd.org/doc/en/books/handbook/configtuning-disk.html&lt;br /&gt;- http://www.freebsdonline.com/content/view/521/515/&lt;br /&gt;&lt;br /&gt;ให้ cover หัวข้อต่อไปนี้&lt;br /&gt;- What is the target subsystem being tuned?&lt;br /&gt;- Why tune the target subsystem?&lt;br /&gt;- How?  That is, briefly, what is the approach used to tune the subsystem?&lt;br /&gt;&lt;br /&gt;เข้าไปดูได้เลยที่ link นี้ &lt;a id="publishedDocumentUrl" class="tabcontent" target="_blank" href="http://docs.google.com/Doc?id=dcmk32tk_17ggmd5xf4"&gt;http://docs.google.com/Doc?id=dcmk32tk_17ggmd5xf4&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-2543030617742408825?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/2543030617742408825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=2543030617742408825' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2543030617742408825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2543030617742408825'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/12/freebsd-assignment1-answer.html' title='FreeBSD Assignment#1 Answer'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8248738004785799793</id><published>2008-12-12T09:11:00.005+07:00</published><updated>2008-12-20T09:30:50.419+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Canon'/><category scheme='http://www.blogger.com/atom/ns#' term='printer'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='LBP2900'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>How to make canon LBP2900 work on Ubuntu</title><content type='html'>Follow some steps from this &lt;a href="https://help.ubuntu.com/community/HardwareSupportComponentsPrinters/CanonPrinters/Canon_LBP_2900"&gt;HardwareSupportComponentsPrinters CanonPrinters Canon_LBP_2900&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'm using Intrepid. It's work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8248738004785799793?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8248738004785799793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8248738004785799793' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8248738004785799793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8248738004785799793'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/12/how-to-make-canon-lbp2900-work-on.html' title='How to make canon LBP2900 work on Ubuntu'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-4252817229043985</id><published>2008-12-09T17:58:00.008+07:00</published><updated>2008-12-12T09:18:57.030+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='file system'/><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><title type='text'>Fragment Size</title><content type='html'>From my assignment of FreeBSD class, I wanna know the meaning of &lt;span style="font-weight: bold;"&gt;"fragment size"&lt;/span&gt;. Because of there no an explanation in the first Google result page so I write this blog for you. ^^&lt;br /&gt;&lt;br /&gt;Fragment size is a threshold whether this file will hold full block size allocation or not. If the allocating file size more than fragment size, it will get full block size. If not, it will store in the minimum necessary number of contiguous fragments.&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;credit : &lt;a href="http://www.chm.tu-dresden.de/edv/manuals/aix/aixbman/prftungd/fragsize.htm"&gt;File-System Fragment Size&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-4252817229043985?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/4252817229043985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=4252817229043985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4252817229043985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4252817229043985'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/12/fragment-size.html' title='Fragment Size'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-7343519087354015499</id><published>2008-12-07T16:05:00.004+07:00</published><updated>2008-12-20T09:28:20.100+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TinyOS'/><category scheme='http://www.blogger.com/atom/ns#' term='TinyOS1.X'/><category scheme='http://www.blogger.com/atom/ns#' term='nesC'/><title type='text'>[TinyOS 1.x] Lesson4</title><content type='html'>&lt;ul&gt;&lt;li&gt;From "IntOutput = IntToRfmM;" The equal sign (&lt;span style="font-weight: bold;"&gt;=&lt;/span&gt;) means interface IntOutput provided by current file is &lt;span style="font-weight: bold;"&gt;equivalent to&lt;/span&gt; the implementation in IntToRfmM (mostly use in interface provided configuration file)&lt;/li&gt;&lt;li&gt;Can look how to send and receive via radio at IntToRfm and RfmToInt respectively. (Too much detail to make a summary. Just look at the code can get the idea)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;This blog is summarized from &lt;a href="http://www.tinyos.net/tinyos-1.x/doc/tutorial/lesson4.html"&gt;Lesson 4: Component Composition and Radio Communication&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-7343519087354015499?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/7343519087354015499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=7343519087354015499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7343519087354015499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/7343519087354015499'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/12/tinyos-1x-lesson4.html' title='[TinyOS 1.x] Lesson4'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-2079081430053992383</id><published>2008-12-07T13:53:00.007+07:00</published><updated>2008-12-20T09:22:46.641+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TinyOS'/><category scheme='http://www.blogger.com/atom/ns#' term='TinyOS1.X'/><category scheme='http://www.blogger.com/atom/ns#' term='nesC'/><title type='text'>[TinyOS 1.x] Lesson3</title><content type='html'>&lt;ul&gt;&lt;li&gt;Task declared syntax is&lt;/li&gt;&lt;/ul&gt;task void taskname(){}&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Task dispatched syntax is&lt;/li&gt;&lt;/ul&gt;post taskname();&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Task can post from command event or another task. It's better to use series of small tasks&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;This blog is summarized from &lt;a href="http://www.tinyos.net/tinyos-1.x/doc/tutorial/lesson3.html"&gt;Lesson 3: Introducing Tasks for Application Data Processing&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-2079081430053992383?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/2079081430053992383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=2079081430053992383' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2079081430053992383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2079081430053992383'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/12/tinyos-1x-lesson3.html' title='[TinyOS 1.x] Lesson3'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-2668511672497584831</id><published>2008-12-02T19:18:00.008+07:00</published><updated>2008-12-20T09:23:41.060+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TinyOS'/><category scheme='http://www.blogger.com/atom/ns#' term='TinyOS1.X'/><category scheme='http://www.blogger.com/atom/ns#' term='nesC'/><title type='text'>[TinyOS 1.x] Lesson2</title><content type='html'>&lt;ul&gt;&lt;li&gt;In &lt;span style="font-weight: bold;"&gt;uses&lt;/span&gt; brackets can declare interface ?? as ???; to perform as another instance of an ?? interface.&lt;/li&gt;&lt;li&gt;ADC is also in tos/interfaces&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Components declaration can also us &lt;span style="font-weight: bold;"&gt;as&lt;/span&gt;&lt;/li&gt;&lt;li&gt;"Ased interface" in module can wire in configuration.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;parameterized interface&lt;/span&gt; is a multiple instance of an interface that parameterized at runtime. It can express like this. SenseM.Timer -&gt; TimerC.Timer&lt;span style="font-weight: bold;"&gt;[unique("Timer")]&lt;/span&gt;;&lt;/li&gt;&lt;li&gt;Because of this line "provides interface Timer[uint8_t id];" means Timer provide 256 different instances one for each uint8_t value&lt;/li&gt;&lt;li&gt;unique() function uses to generate unique 8-bit number. The group of unique can specify by use the same String as the parameter of the function&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;This blog is summarized from &lt;a href="http://www.tinyos.net/tinyos-1.x/doc/tutorial/lesson2.html"&gt;Lesson 2: Event-Driven Sensor Acquisition&lt;/a&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="font-family:tahoma,arial,helvetica;"&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;a href="http://www.tinyos.net/tinyos-1.x/doc/tutorial/lesson2.html"&gt;&lt;b&gt;&lt;span style="font-family:tahoma,arial,helvetica;"&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-2668511672497584831?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/2668511672497584831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=2668511672497584831' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2668511672497584831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2668511672497584831'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/12/tinyos-1x-lesson2.html' title='[TinyOS 1.x] Lesson2'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-8751634174263513143</id><published>2008-12-01T18:33:00.007+07:00</published><updated>2008-12-20T09:23:10.154+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TinyOS'/><category scheme='http://www.blogger.com/atom/ns#' term='TinyOS1.X'/><category scheme='http://www.blogger.com/atom/ns#' term='nesC'/><title type='text'>[TinyOS 1.x] Lesson1</title><content type='html'>This blog series "TinyOS 1.x" is for helping me to remember the knowledge that I have learned and forget it later since it's not an everyday used language (And also because I still didn't get all its concepts) You know today is the third time that I will start read its tutorial again. What I wanna tell you is that this blog series may be useless for you guy because it's just for my memo. Let's start then...&lt;br /&gt;&lt;ul&gt;&lt;li&gt;There is an interface. That the &lt;span style="font-weight: bold;"&gt;users&lt;/span&gt; must implement &lt;span style="font-weight: bold;"&gt;events&lt;/span&gt; and the &lt;span style="font-weight: bold;"&gt;provider&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;must implement &lt;span style="font-weight: bold;"&gt;commands&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;An application consists of components. Each component has &lt;span style="font-weight: bold;"&gt;configuration&lt;/span&gt;(wiring) and &lt;span style="font-weight: bold;"&gt;module&lt;/span&gt;(implementing)&lt;/li&gt;&lt;li&gt;There're 2 threads of execution - tasks(not preempt another), Hardware event handlers(preempt another) declared with &lt;span style="font-weight: bold;"&gt;async&lt;/span&gt; keyword.&lt;/li&gt;&lt;li&gt;In &lt;span style="font-weight: bold;"&gt;configuration&lt;/span&gt; file&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;        configuration [name]{}&lt;br /&gt;implementation {&lt;br /&gt;        [components declaration]&lt;br /&gt;        [wiring] Main.StdControl -&gt; ??.StdControl; ..&lt;br /&gt;}&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Main.StdControl.init()&lt;/span&gt; is the &lt;span style="font-weight: bold;"&gt;first&lt;/span&gt; executing command of any application.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;StdContro&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;l&lt;/span&gt; interface is at tos/interfaces/StdControl.nc&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Timer&lt;/span&gt; is at tos/interfaces/Timer.nc&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SingleTimer&lt;/span&gt; is at tos/lib/SingleTimer.nc&lt;/li&gt;&lt;li&gt;BlinkM.Leds -&gt; &lt;span style="font-weight: bold;"&gt;LedsC&lt;/span&gt; is really shorthand for  BlinkM.Leds -&gt; &lt;span style="font-weight: bold;"&gt;LedsC.Leds&lt;/span&gt;&lt;/li&gt;&lt;li&gt;In &lt;span style="font-weight: bold;"&gt;module&lt;/span&gt; file&lt;/li&gt;&lt;/ul&gt;        module [name]{&lt;br /&gt;        provides{[interface that is wired in configuration]}&lt;br /&gt;        uses{[interface that wire to in configuration]}&lt;br /&gt;}&lt;br /&gt;implementation{&lt;br /&gt;command..&lt;br /&gt;event..&lt;br /&gt;..&lt;br /&gt;}&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Timer &lt;/span&gt;is an interface for fire event at interval time&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;this blog is summarized form &lt;a href="http://www.tinyos.net/tinyos-1.x/doc/tutorial/lesson1.html"&gt;TinyOS Tutorial Lesson 1: Getting Started with TinyOS and nesC&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-8751634174263513143?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/8751634174263513143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=8751634174263513143' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8751634174263513143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/8751634174263513143'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/12/tinyos-1x-introduction.html' title='[TinyOS 1.x] Lesson1'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-5756840361255246222</id><published>2008-11-11T09:48:00.003+07:00</published><updated>2008-12-20T09:26:08.559+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Share files between Linux host &amp; Linux guest on Virtualbox</title><content type='html'>Make Virtualbox know which folder you want to share&lt;br /&gt; Devices -&gt; Shared Folders -&gt; Add New Shared Folder&lt;br /&gt; Fill shared folder destination and its name for calling in the guest (Also tick read only or permanent as you wish)&lt;br /&gt;&lt;br /&gt;In the guest's terminal&lt;br /&gt;Create folder somewhere you want which the name as what you defined.&lt;br /&gt;Use this command&lt;br /&gt;   sudo mount -t vboxsf [folder's name] [the path where the folder is at]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;credit : &lt;a href="https://help.ubuntu.com/community/VirtualBox#Sharing%20Folders%20Between%20Host%20and%20Guest"&gt;Sharing Folders Between Host and Guest&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-5756840361255246222?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/5756840361255246222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=5756840361255246222' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5756840361255246222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/5756840361255246222'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/11/share-files-between-linux-host-linux.html' title='Share files between Linux host &amp; Linux guest on Virtualbox'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-869368334500963079</id><published>2008-11-09T12:44:00.001+07:00</published><updated>2008-12-20T09:27:39.117+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='Intrepid Ibex'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='USB'/><category scheme='http://www.blogger.com/atom/ns#' term='Hardy Heron'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>How to get USB work in Intrepid</title><content type='html'>The work around to enable USB in Intrepid is different from Hardy.&lt;br /&gt;&lt;br /&gt;The way to do that is to add this below line in the bottom line of /ect/fstab file&lt;br /&gt;&lt;br /&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 340px; height: 50px; text-align: left;"&gt;#usbfs&lt;br /&gt;none /proc/bus/usb usbfs devgid=46,devmode=664 0 0&lt;/pre&gt;&lt;br /&gt;that is it!&lt;br /&gt;&lt;br /&gt;credit : &lt;a href="http://ubuntuforums.org/showthread.php?t=946268"&gt;&lt;strong&gt;Intrepid/Virtualbox/USB&lt;/strong&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-869368334500963079?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/869368334500963079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=869368334500963079' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/869368334500963079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/869368334500963079'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/11/how-to-get-usb-work-in-intrepid.html' title='How to get USB work in Intrepid'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-6838442574894249614</id><published>2008-10-30T12:42:00.001+07:00</published><updated>2008-12-20T09:28:09.373+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='mount'/><category scheme='http://www.blogger.com/atom/ns#' term='ISO'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Mount ISO image on Ubuntu</title><content type='html'>Mount&lt;br /&gt;sudo mount -o loop -t iso9660 [ISO image] [Mount point]&lt;br /&gt;&lt;br /&gt;Unmount&lt;br /&gt;sudo umount [Mount point]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-6838442574894249614?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/6838442574894249614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=6838442574894249614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/6838442574894249614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/6838442574894249614'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/10/mount-iso-image-on-ubuntu.html' title='Mount ISO image on Ubuntu'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-6356787695041411309</id><published>2008-09-05T21:55:00.003+07:00</published><updated>2008-12-20T09:29:57.970+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='swap'/><title type='text'>Swappiness - รับค่าโอกาสในการไปใช้ swap แทน ram</title><content type='html'>เนื่องจากผมรัน vmware player แล้วรู้สึกว่าช้ามากจึงไปเช็คที่ Gnome System Monitor ในตอนแรกมองข้ามไป ว่า vmware ไม่ได้กิน resource อะไรเลย แต่ก็งงว่า ที่ตัว process ของ vmware นั้นบอกว่าใช้ memory กว่า 400 MB แต่ทำไม ram ของเราถูกใช้ไปแค่ 400 MB เช่นกัน หงุดหงิด กับสปีดของ vmware อยู่นาน ก็เพิ่งจะได้สังเกตดว่า จริงๆ แล้ว ram ที่ตัว vmware เราใช้นั้นไปอยู่บน swap ซะหมดเลย (มิน่าหละ ทำไมทำอะไรแต่ละที Hard disk ทำงานหนักเหลือเกิน)&lt;br /&gt;&lt;br /&gt;จึงทำการหาวิธีการจัดการกับ swap จนไปพบว่าเราสามารถปรับแต่โอกาสในที่จะให้เจ้า Ubuntu ของเราไปวาง memory ไว้บน swap ได้ ด้วยค่า swappiness นี่เอง ซึ่งปกติจะตั้งไว้ที่ 60 แต่จริงๆ เค้าแนะนำไว้ที่ 10 (ยกเว้น งาน server ที่เค้าบอกว่าน่าจะ 60)  ตามนี้เลย&lt;br /&gt;&lt;br /&gt;ถ้าต้องการตรวจสอบค่า swappiness&lt;br /&gt;cat /proc/sys/vm/swappiness&lt;br /&gt;&lt;br /&gt;ถ้าต้องการเปลี่ยนค่า swappiness ชั่วคราว&lt;br /&gt;echo 10 &gt; /proc/sys/vm/swappiness&lt;br /&gt;&lt;br /&gt;ถ้าต้องการเปลี่ยนค่า swappiness ถาวรเปลี่ยนค่าที่ไฟล์นี้&lt;br /&gt;gksudo gedit /etc/sysctl.conf&lt;br /&gt;โดยเพิ่มบรรทัดนี้ เข้าไป&lt;br /&gt;vm.swappiness=10&lt;br /&gt;แล้วทำการ reboot&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;จาก &lt;a href="https://help.ubuntu.com/community/SwapFaq#Performance%20tuning%20with%20%27%27swappiness%27%27"&gt;Performance tuning with ''swappiness''&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;ปล. พบว่าถึงแม้ว่าจะตั้งค่าเป็น 0 ในบางโอกาส OS ก็ยังไปใช้ swap อยู่ดี&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-6356787695041411309?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/6356787695041411309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=6356787695041411309' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/6356787695041411309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/6356787695041411309'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/09/swappiness-swap-ram.html' title='Swappiness - รับค่าโอกาสในการไปใช้ swap แทน ram'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-2308660142844142399</id><published>2008-08-29T11:10:00.000+07:00</published><updated>2008-09-06T08:40:15.178+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='search'/><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><title type='text'>Google Keyword Suggestions</title><content type='html'>ประโยชน์ มีดังนี้&lt;br /&gt;&lt;ul&gt;&lt;li&gt;เพิ่มเติมจากคำที่เราพิมพ์ผ่านมาให้เลือก (เพื่อความ specific ของคำค้นหา)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;เดาการพิมพ์ผิด&lt;/li&gt;&lt;li&gt;ลดจำนวนครั้งการพิมพ์&lt;/li&gt;&lt;/ul&gt;จาก &lt;a href="http://googleblog.blogspot.com/2008/08/at-loss-for-words.html"&gt;At a loss for words?&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-2308660142844142399?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/2308660142844142399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=2308660142844142399' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2308660142844142399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/2308660142844142399'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/08/google-keyword-suggestions.html' title='Google Keyword Suggestions'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-4860482577574014396</id><published>2008-07-24T16:28:00.000+07:00</published><updated>2008-09-06T08:40:05.400+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='search'/><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><title type='text'>เทคโนโลยีเบื้องหลัง Google ranking</title><content type='html'>หลักการของระบบ search ของ Google มีดังนี้&lt;br /&gt;&lt;ul&gt;&lt;li&gt;เข้าใจหน้าเว็บ ว่าเป็นนั้นคือเว็บอะไร อยู่ที่ไหน ฯลฯ&lt;/li&gt;&lt;li&gt;เข้าใจคำ search แก้คำสะกดผิด, แปลคำที่มีความหมายใกล้เคียงกัน, การขยายความกันและกันของคำ search&lt;/li&gt;&lt;li&gt;เข้าใจผู้ search ว่าอยู่ที่ใดบนโลก ต้องการผลแบบใด, ความสนใจ-ชอบ ส่วนบุคคล, แก้ความเข้าใจผิด, หาคำเดียวกันบนภาษาอื่น&lt;/li&gt;&lt;/ul&gt;จาก &lt;a href="http://googleblog.blogspot.com/2008/07/technologies-behind-google-ranking.html"&gt;Technologies behind Google ranking&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-4860482577574014396?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/4860482577574014396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=4860482577574014396' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4860482577574014396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/4860482577574014396'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/07/google-ranking.html' title='เทคโนโลยีเบื้องหลัง Google ranking'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8300987467364558761.post-1189067961542181405</id><published>2008-06-05T07:45:00.005+07:00</published><updated>2008-12-20T09:30:57.330+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Hardy Heron'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Fix no sound flash 9 in Firefox 3 Ubuntu 8.04</title><content type='html'>Just this command&lt;br /&gt;&lt;br /&gt;sudo apt-get install libflashsupport&lt;br /&gt;&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;credit : &lt;a href="https://answers.launchpad.net/%7Enailor"&gt;Michael Nagel&lt;/a&gt; from &lt;a href="https://answers.launchpad.net/ubuntu/+question/34364"&gt;Ubuntu 8.04 - No Sound In Firefox Flash, Trying To Upgrade To Flash Player 10&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8300987467364558761-1189067961542181405?l=visibletrap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://visibletrap.blogspot.com/feeds/1189067961542181405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8300987467364558761&amp;postID=1189067961542181405' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1189067961542181405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8300987467364558761/posts/default/1189067961542181405'/><link rel='alternate' type='text/html' href='http://visibletrap.blogspot.com/2008/06/fix-no-sound-flash-9-in-firefox-3.html' title='Fix no sound flash 9 in Firefox 3 Ubuntu 8.04'/><author><name>TAP</name><uri>http://www.blogger.com/profile/11187717769038086610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_sYEnb3MtnJc/TJ19P5umXXI/AAAAAAAAAas/LeViL_Pj78g/S220/tap2.jpg'/></author><thr:total>0</thr:total></entry></feed>
