Pages
Profile
|
|
Hi, I'm Veerapat Sriarunrungrueang, an expert in technology field, especially full stack web development and performance testing.This is my coding diary. I usually develop and keep code snippets or some tricks, and update to this diary when I have time.
Nowadays, I've been giving counsel to many well-known firms in Thailand.
view more... |
Tuesday, December 20, 2011
Difference between Pig and Hive? Why have both?
There are some arguments in stackoverflow.
Labels:
Map-Reduce
Thursday, December 1, 2011
Benchmark of Python WSGI Web Servers
Take a look this site, http://nichol.as/benchmark-of-python-web-servers. He tried his best to benchmark the different WSGI servers. He presented in graphs to make easy understanding.
Labels:
Internet Technology,
Network,
Python
Monday, November 28, 2011
Run internet required commands behind a proxy server in Linux
Most of the time I need to run a terminal behind a proxy server at my office to run a batch job, and I failed to run it because I don't know how to add proxy server in the terminal. But, now, I just found the command to add a proxy server in Linux. It's very simple just only one line :)
Open terminl and type this command
To remove the proxy server from your network run the following command:
The example above is how bind a proxy server in HTTP protocol.
For the other protocols, e.g. FTP, ... so on. Try to find its variable for binding with a proxy server.
Another protocol that I know is FTP.
FTP => ftp_proxy
If you want to remove it, do the same as the example above.
Good luck ^^.
Open terminl and type this command
# Changing username, password, proxyname, and port to be yours. export http_proxy="http://username:password@proxyname:port" # After that you can test to run behind your proxy server # , simply as following. wget http://www.google.com # If the connection is successful, then you will get the # file from this Google page.
To remove the proxy server from your network run the following command:
# Just delete a proxy sever variable using unsetunset http_proxy # Or set http_proxy to blank export http_proxy=""
The example above is how bind a proxy server in HTTP protocol.
For the other protocols, e.g. FTP, ... so on. Try to find its variable for binding with a proxy server.
Another protocol that I know is FTP.
FTP => ftp_proxy
If you want to remove it, do the same as the example above.
Good luck ^^.
Labels:
Internet Technology,
Linux,
Mac,
Network,
Ubuntu
How to restart Linux network service
Sometime you may need to update your network immediately, e.g. DHCP and IP under a virtualization software, ... so on. The fastest way is to restart the network service.
You need to login as root user before using the following commands!!!
RedHat Linux command to reload or restart network:
Credit: http://theos.in/desktop-linux/tip-that-matters/how-do-i-restart-linux-network-service/
You need to login as root user before using the following commands!!!
RedHat Linux command to reload or restart network:
# To restart Linux network service: $ service network restart or $ /etc/init.d/network restart # To start Linux network service: $ service network start # To stop Linux network service: $ service network stopDebian Linux command to reload or restart network:
# To restart Linux network service: $ /etc/init.d/networking restart # To start Linux network service: $ /etc/init.d/networking start # To stop Linux network service: $ /etc/init.d/networking stopUbuntu Linux user use sudo command with above Debian Linux command:
# To restart Linux network service: $ sudo /etc/init.d/networking restart # To start Linux network service: $ sudo /etc/init.d/networking start # To stop Linux network service: $ sudo /etc/init.d/networking stop
Credit: http://theos.in/desktop-linux/tip-that-matters/how-do-i-restart-linux-network-service/
Tuesday, November 22, 2011
Adding Facebook Like Button to your Blogger posts
According to Blogger default don't provide essential social plugins like "Like-Button" in a post. We, however, can includes it into each of your post easily as the following steps:
- You needs to create an App in Facebook at: https://developers.facebook.com.
- So, you will get the App API key.
- Go to https://developers.facebook.com/docs/reference/plugins/like/ page to customize your Like-Button as your preferred style. After finish, click at get code, then copy that code (HTML5) to somewhere. You will get 2 portions of code, first and second.
- Go to your Blogger template, select edit HTML manually then click at expand the widget because post customization is in the widget portion.
- Go deep to the above widget code zone (almost at the end), or if you can't find you can put it on the top, but this code will be loaded first before loading Blogger data.
- Paste your first half of Facebook code above widget code.
- Next, you need to find the template for each post, then append the second half to that template. For me, I want to append Like-Button followed the default share buttons. So, I will search for "shareButtons". It may have many shareButtons words in your template, but to know the one you want is that it has a code to describe its components e.g. Twitter, Gmail, Facebook, Google+ buttons.
- Finally, append the second half of Facebook code here, but it need to change a "data-href" attribute to be "expr:href" as a Blogger data, and put its value equals to "data:post.url".
For example:
<div class="fb-like" data-send="true" data-show-faces="true" data-width="450" expr:href="data:post.url">
</div>
- Done, save the your code and view your post!!!
Like This Post!!!
Labels:
Facebook,
Internet Technology,
JavaScript,
Programming
Monday, November 21, 2011
Guide to look features for your ADSL Router/Modem
Take a look at http://www.pcworld.idg.com.au/article/199507/adsl_modem_router_/?, it's the very helpful link for computer man :).
Labels:
Network
Friday, November 18, 2011
Stanford Online Courses in Q1 2012
The following Stanford Online Classes will be opened in Q1 next year!!!
1. CS 101 by Nick Parlante
2. Natural Language Processing by Dan Jurafsky and Chris Manning
3. Software Engineering for SAAS by Armando Fox and David Patterson
4. Human-Computer Interfaces by Scott Klemmer
5. Game Theory by Matthew Jackson and Yoav Shoham
6. Probabilistic Graphical Models by Daphne Koller
7. Machine Learning by Andrew Ng (Same class as current ml-class.org)
Moreoever, Stanford Entrepreneurship Online Classes will be opened in Q1 next year too.
1. The Lean Launchpad - http://www.launchpad-class.org/
2. Technology Entrepreneurship - http://www.entrepreneur-class.org/
Don't wait until the last moment :)
1. CS 101 by Nick Parlante
2. Natural Language Processing by Dan Jurafsky and Chris Manning
3. Software Engineering for SAAS by Armando Fox and David Patterson
4. Human-Computer Interfaces by Scott Klemmer
5. Game Theory by Matthew Jackson and Yoav Shoham
6. Probabilistic Graphical Models by Daphne Koller
7. Machine Learning by Andrew Ng (Same class as current ml-class.org)
Moreoever, Stanford Entrepreneurship Online Classes will be opened in Q1 next year too.
1. The Lean Launchpad - http://www.launchpad-class.org/
2. Technology Entrepreneurship - http://www.entrepreneur-class.org/
Don't wait until the last moment :)
Labels:
Event
Tuesday, November 1, 2011
The Lemur Project - SEO Tools
Lemur is an opensource toolkit for Information Retrieval and language modeling, It also provides API in C++, JAVA, C#, etc. I used it to check ranking among my website pages and competitor pages.
To use this tool, you have to download it first from http://www.lemurproject.org/.
Then, to allow Lemur indexing your pages you need to put Lemur' headers for all of your indexed pages as the following code:
Next, let's see urllist.txt, you need to put all of full path of your indexed files one line per one file path.
After that, edit queries.txt, insert keywords with one keyword per line.
Assume that my Lemur' folder is named seo. Do as follows:
1. Open a command window.
2. Go to seo directory by type in the following commnad.
cd C:\seo
3. To index the web pages (both competitors and cfs), type this
C:\seo\lemur\bin\BuildIndex.exe buildparam.txt
4. To run a query, type this
C:\seo\lemur\bin\RunQueriesHTML.exe queryparam.txt
5. Open the result file located in C:\seo\results.html with you web browser
Finally, you will see the result similar to the following picture:
Enjoy using it xD.
To use this tool, you have to download it first from http://www.lemurproject.org/.
Then, to allow Lemur indexing your pages you need to put Lemur' headers for all of your indexed pages as the following code:
<doc> <docno>FULL PATH TO THIS FILE<⁄docno> <dochdr><⁄dochdr> . . . YOUR HTML CONTENT . . . <⁄doc>
Next, let's see urllist.txt, you need to put all of full path of your indexed files one line per one file path.
C:\seo\competitors\aol\1.html C:\seo\competitors\bbc\1.html C:\seo\competitors\bbc\2.html . . .
After that, edit queries.txt, insert keywords with one keyword per line.
carbon dioxide cfc fuel . . .
Assume that my Lemur' folder is named seo. Do as follows:
1. Open a command window.
2. Go to seo directory by type in the following commnad.
cd C:\seo
3. To index the web pages (both competitors and cfs), type this
C:\seo\lemur\bin\BuildIndex.exe buildparam.txt
4. To run a query, type this
C:\seo\lemur\bin\RunQueriesHTML.exe queryparam.txt
5. Open the result file located in C:\seo\results.html with you web browser
Finally, you will see the result similar to the following picture:
Enjoy using it xD.
Labels:
Programming,
Python,
SEO
Thursday, October 27, 2011
Fate Unlimited Codes (PS2)
![]() |
| Game Cover |
Recently, I have watched Fate Stay Night and Fate Unlimited Blade Works for the fifth times. I also just found the game named Fate Unlimited Codes in PS2 (it is quite old game), and wanted to try it very much. It is a fighting game. In the game, you can select characters among masters and servants to play. There are some special secrets in this game such as Saber Lily costume, Zero Lancer, and Leysritt (Ilya's housekeeper).
![]() |
| Saber Lily |
For how to play and secrets, take a look at here.
Mission mode information, go to this site.
Note that Ex attacks/specials can be used if the following conditions are passed:
Note that Ex attacks/specials can be used if the following conditions are passed:
1 - The Holy Grail Meter (the "chalice" under the timer) must be FULL
2 - Make sure you have 3 bars of Mana
3 - Deal damage to your opponent while the Holy Grail is full to get your life bar flashing
4 - Go into EX Mode/Overdrive/whatever you want to call it by pressing the three attack buttons together (and while you still have 3 bars full of Mana)
5 - Input the commands for the EX Attack.
6 - Make sure your attack actually HITS.
7 - Enjoy the EX Attack animation.
2 - Make sure you have 3 bars of Mana
3 - Deal damage to your opponent while the Holy Grail is full to get your life bar flashing
4 - Go into EX Mode/Overdrive/whatever you want to call it by pressing the three attack buttons together (and while you still have 3 bars full of Mana)
5 - Input the commands for the EX Attack.
6 - Make sure your attack actually HITS.
7 - Enjoy the EX Attack animation.
p.s. Go to practice mode to make you getting more ideas.
![]() |
| Special Box |
![]() |
Labels:
Game
Thursday, October 20, 2011
Subscribe to:
Posts (Atom)




