Posted on February 27, 2011, 6:09 pm, by Van Nhu.
I use to play my faceboook app Chinese poker on my Iphone on my way home from work. My connection is not fast enough and it made the game less interest. . I felt also a litle bit frustrated. I need to do something about it and out comes JQuery Datatable. JQuery Datatable generates a [...]
Posted on February 11, 2011, 2:59 pm, by Van Nhu.
Was curious on how window.history.pushState works and since I have been used jQuery history plugin on my Facebook application for years (Thanks to Taku Sano, Takayuki Miwa, Lincoln Cooper!) and still ran on an old version I decided to add support for new feature in HTML5 and rewrite it a litle bit. How does pushState [...]
Posted on August 9, 2010, 11:09 pm, by Van Nhu.
This is a collection of things I found usefull regarding emacs. It will grow … .emacs Add those bellow in the file ~/.emacs ;; do not make backup files (setq make-backup-files nil) ;; php syntax color (load “php-mode”) (add-to-list ‘auto-mode-alist ‘(“\\.php[34]?\\’\\|\\.phtml\\’” . php-mode)) X forwarding with ssh ssh -X your.ssh.domain.com ~$emacs somefile will start an [...]
Posted on February 21, 2010, 3:20 pm, by Van Nhu.
Last week, I was trying to create a shuffle function on my array class which extends the native Array class. I got the ReferenceError when running the code bellow. The reason is that Array is a dynamic class and my is not. Since Array is dynamic, it will try to create new property when you [...]
Posted on February 6, 2010, 10:35 am, by Van Nhu.
Here is some links on how you can reject requests using firewall ufw. http://manpages.ubuntu.com/manpages/jaunty/en/man8/ufw.8.html http://www.ubuntu-unleashed.com/2008/05/howto-take-use-setup-and-advantage-of.html
Posted on December 26, 2009, 11:50 pm, by Van Nhu.
I you have an apache server which you only use GET and POST methods I think it is better that you limit the access. Since there are many methods it is more convinient to use the opposite functions, limitExcept. Bellow is an example how it would look like. The limitExcept directive allows only GET and [...]
Posted on December 26, 2009, 10:32 pm, by Van Nhu.
Bad thing has hapened to me this holliday. The server has been attacked from serveral ips or more precis they used my server as proxy for attacking other targets. Lucky for me that my server is not configured for this kind of attacks. However, they kept request my server and I wanted that apache would [...]
Posted on November 22, 2009, 5:19 pm, by Van Nhu.
For example if process name is php, you can get a list of jobs by using the command bellow ps aux | grep php Result root 7749 0.0 0.1 3236 796 pts/2 S+ 16:09 0:00 grep php root 19292 1.8 5.6 90624 28528 ? S 01:36 16:09 php test.php To kill a process you can [...]
Posted on November 15, 2009, 4:51 pm, by Van Nhu.
Enable ssl In my case it was simple. I just ran this line a2enmod ssl Generate self-signed ssl certificate Solution: http://www.akadia.com/services/ssh_test_certificate.html Just follow instruction carefully. Make sure that i step 2 you need to enter a correct “Common Name”, ie your domain. Step 5 and 6 also different for different distributions and installation … Summary [...]
Posted on November 15, 2009, 12:31 pm, by Van Nhu.
This is a boot setup for Microsoft Windows XP Professional and Ubuntu (wubi) where we have Windows XP as default and will be preselected on start of computer. This content can be found in c:\boot.ini (be aware this is a hidden system file). [boot loader] timeout=15 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect [...]