RSS feed [root] /



title search:


Sun Mar 16 19:10:24 HKT 2014

(google search) (amazon search)
download zip of files only

Fri Oct 02 17:30:01 HKT 2015 From /weblog/unix


Web base vim as tutorials -

History of VIM -[..]f-productivity-vims-20th-anniversary.ars

Guide for editing text object, most already familiar with using 'w' for word editing, this blog discuss more about using 'p' for paragrahy and other related stuff. -[..]7/vim-text-objects-the-definitive-guide/

Seven habits of effective text editing , a lot of nice tip of using vim, like hlsearch , omni-completion

vimdiff tips -[..]cles/2008/04/30/vim-as-a-diff-merge-tool[..]9899-uid-36931-do-showone-type-blog.html

How to regex with line number -

cheat sheet of jumping around source code -[..]inux-HOWTO/C-editing-with-VIM-HOWTO.html

Nice analysis of good programming environment -[..]why-i-switched-from-textmate-to-vim.html

Creating macros in vim - <- introduction to Command-T and FuzzyFinder

Some VIM tips:

Essential Vim editor navigation commands
Vim search and replace – 12 powerful find and replace examples.
How To add bookmarks inside the Vim editor
How To record and play inside the Vim editor
Correct spelling mistakes automatically inside the Vim Editor
Automatic word completion using Ctrl-X
Enable thesaurus option in the Vim editor
Vim autocommand magic. Add custom header to your files automatically.
Convert Vim editor to a beautiful source code browser.
Use the Vim editor as a bash IDE, or C/C++ IDE, or Perl IDE.

ctrl+w, ctrl+w , vimdiff switch folder -

tutorial -[..]editor-in-unix-example-tutorial-and.html[..]s/3mfvdg/how_do_i_go_about_learning_vim/

Compilation plugin -

Highlight multiple searches at the same time, each with a different color. -

C/C++ IDE -[..]10/vim-plugin-for-navigating-c-with.html

Evil, putting vi in emacs -

Fixing syntax at solaris, "export TERM=xtermc", ":syntax enable" -

Graph your Vim undo tree in style. -

Introduction to Selecta and Command-T, tool for fuzzy mapping and open files easier -[..]d-the-vimrc-file-be-located-on-windows-7

Open Visual Studio config as XML -!topic/vim_use/HzVM9tjJP08

Snippert library ( e.g. function template ) -[..]3h7lca/which_snippet_library_do_you_use/[..]t_are_your_musthave_configs_and_plugins/[..]mments/2w22gf/edit_google_docs_with_vim/[..]nts/3ijsi2/original_post_a_vimrc_primer/[..]an_autocomplete_plugin_if_yes_which_one/

gUU to turn whole line upper case, and guu to turn whole line lower case -[..]_guu_makes_an_entire_line_lowercase_and/

can use :TOhtml to turn a text file to HTML -

set encoding=utf-8 -[..]how_to_reliably_switch_to_using_utf8_by/

If you like to test the regex for vi, can refer to this -

(google search) (amazon search)

Fri Oct 02 16:19:13 HKT 2015 From /weblog/design


Nothing specific, mostly code clean up, refactoring and simplification, the performance boost was a surprise. <- This is a good one -[..]12/07/disruptor-v3-faster-hopefully.html

Is there anything we can do about this when designing algorithms and data-structures? Yes there is a lot we can do. If we perform chunks of work on data that is co-located, and we stride around memory in a predictable fashion, then our algorithms can be many times faster. For example rather than using bucket and chain hash tables, like in the JDK, we can employ hash tables using open-addressing with linear-probing. Rather than using linked-lists or trees with single items in each node, we can store an array of many items in each node. -[..]emory-access-patterns-are-important.html

Skip lists are used instead of b-trees because b-trees don’t scale. -[..]ast-mvcc-inmem-lockfree-codegen-and.html

Beware about the performance issue of static initalization -[..]-cause-problems-with-multi-threading-how

Experiment show why arraylist is better in most cases -

How to design low latency application in java -[..]5/chronicle-and-low-latency-in-java.html[..]ciples-of-high-performance-programs.html[..]principles-of-high-performance-programs/

Suggestion about how to determine number of thread pool -[..]rmine-Web-Applications-Thread-Poll-Size/

Beware the performance penalty of logging -

Keep thing dynamic -[..]ciples-of-high-performance-programs.html[..]st-rule-of-performance-optimisation.html[..]u/~rcs/research/interactive_latency.html[..]aling-data-platforms.html?SSLoginOk=true

Discuss about developing low latency financial application -

Discussion of object pooling -[..]-but-forgotten-trick-object-pooling.html[..]m_performance_part_1_object_pooling.html

Efficiency - the amount of work you need to do.
Performance - how fast you can do that work
Efficiency - governed by your algorithm
Performance - governed by your data structures.[..]e-difference-between-efficiency-and.html

Turning off power save mode on the CPU reduced brought the max latency from 11 msec down to 8 msec.
Guaranteeing threads will always have CPU resources using CPU isolation and thread affinity brought the maximum latency down to 14 microseconds.[..]eduler-jitter-using-cpu-isolation-a.html[..]

(google search) (amazon search)

Fri Oct 02 11:15:42 HKT 2015 From /weblog/software_engineering/testing


UnitTest DB, check if proper index applied -[..]og/2012/09/test-driving-database-indexes[..]an-integration-testing-with-junit-rules/

(google search) (amazon search)

Fri Oct 02 10:19:24 HKT 2015 From /weblog/science


蓋亞假說:美麗的神話 -[..]%8E%E9%BA%97%E7%9A%84%E7%A5%9E%E8%A9%B1/

色彩斑斕的動物 -

地球上仍存活的最古老生物 -

deep-sea-mysteries-and-oddities-that-will-leave-you-baffled -[..]nd-oddities-that-will-leave-you-baffled/

rare-flowers-that-are-stunning-to-look-at -

earth-facts-that-might-surprise-you -

north-pole-facts-most-people-are-not-aware-of -[..]s-most-people-are-not-aware-of/?view=all

earth-facts-you-probably-have-not-considered -[..]-facts-you-probably-have-not-considered/

(google search) (amazon search)

Fri Oct 02 10:12:22 HKT 2015 From /weblog/health/food


Some issues -[..]-convince-you-to-eat-healthier/?view=all

3 food that hurt child / babe -[..]F%B6%E5%AF%B6%E7%9A%84%E9%9B%B6%E9%A3%9F[..]izza-youll-want-to-sink-your-teeth-into/

(google search) (amazon search)

Thu Oct 01 11:56:29 HKT 2015 From /weblog/unix


Sum time in script -[..]-summing-the-total-time-from-a-log-file/

Special bash parameters -[..]ial-bash-parameters-in-script-linux.html

ls sort by file size -[..]ns-answers/6518-sorting-ls-filesize.html

How to use "~" -

Few examples of how to use grep -

use rlwrap to enable BASH like editing in SQLplus, and use screen to presist terminal sessions -[..]miracle-utilities-rlwrap-and-screen.html

Ctrl+r searches through history
Use the history command plus !# to run old commands
Shell expansion using {} , e.g. cp{,.old} == cp
zsh have good auto complete

mkdir -p creates nested directories
Use less instead of tail
lsof shows open files
ps will show process trees with the f flag

!! is the previous command in the shell history
Use vim -b to show nonprintable characters
** is a recursive wildcard in zsh
cd – will return to the previous folder
Use ctrl+z and kill %1 to kill a process that will not die
pwdx shows the working directory of a process
Use sh -x to debug shell scripts
sysctl replaces /proc on macs

ps -eo pcpu,pid,args | sort -n => check CPU%
grep -sq "" /etc/lsb-release && lsb_release -rd => run command if file exist

More about ps and free -

HTML tools for commandline -

Bash history -

Tips of using shell, like saving all history -

Standard Shell completion:

Variablename completion
Username completion
Executable completion
Filename and directory completion
Hostname completion

cp long_and_complex_file_name long_and_complex_file_name.backup
with this:
cp long_and_complex_file_name{,.backup}[..]/2013/12/unix-trick-brace-expansion.html

Use the history -

How to use xargs -

Nice presentation of man page -

Parallel shell -

(google search) (amazon search)

Wed Sep 30 15:29:04 HKT 2015 From /weblog/design/pattern


Collection of patterns from objectmentor -[..]07/agile-scm-principles-from-ood-to.html

Robert Martin tutorial -

Links and abstract of few principle -

Tutorial about common anti-pattern -

Development of Further Patterns of Enterprise Application Architecture -

Expanation and C++/Java samples -

Java tutorial -

(google search) (amazon search)

Wed Sep 30 14:51:46 HKT 2015 From /weblog/languages


Performance of tables -[..]-line-csv-file-data-table-vs-data-frame/

(google search) (amazon search)

Wed Sep 30 11:04:07 HKT 2015 From /weblog/history


回首沙龍的一生 -

surgical-tools-you-want-to-stay-away -[..]urgical-tools-you-want-to-stay-away.html

incredible-animals-that-shaped-human-history -[..]mals-that-shaped-human-history/?view=all

amazing-moments-from-history-captured -[..]azing-moments-from-history-captured.html

historically-accurate-modern-day-thanksgiving-facts -[..]-modern-day-thanksgiving-facts/?view=all

bizarre-historical-facts-you-didnt-know -[..]istorical-facts-you-didnt-know/?view=all[..]last-photos-ever-taken-of-25-famous.html

greatest-warriors-of-all-time -

incredible-historical-armors -[..]orical-armors-that-still-exist/?view=all

facts-about-world-war-i-that-shaped-the-world -[..]ld-war-i-that-shaped-the-world/?view=all

一戰戰地的今與昔 -

Last photos of 25 famous people -[..]last-photos-ever-taken-of-25-famous.html[..]-that-might-just-make-you-a-grandmaster/[..]istory-of-bicycles-for-bike-enthusiasts/

Nowadays doctors don't make house calls all to often but back in 1948 this type of practice was very common. As you're about to see, rural doctors had a very busy job. -[..]-it-was-like-to-be-rural-doctor-for.html[..]rprising-hygiene-practices-from-history/

(google search) (amazon search)

Tue Sep 29 22:25:46 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)

Tue Sep 29 22:25:45 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)

Tue Sep 29 22:25:40 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)

Tue Sep 29 22:25:40 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)

Tue Sep 29 22:25:39 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)

Tue Sep 29 22:25:33 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)

Tue Sep 29 22:25:33 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)

Tue Sep 29 22:25:29 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)

Tue Sep 29 22:25:25 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)

Tue Sep 29 22:25:25 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)

Tue Sep 29 22:25:21 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)

Tue Sep 29 22:25:18 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)

Tue Sep 29 22:25:16 HKT 2015 From /gallery/Day+Trip/%E7%BD%AE%E5%AF%8C%E5%B1%B1%E8%B0%B7


(google search) (amazon search)