Profile

Click to view full 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...

Monday, February 28, 2011

Barcamp Bangkok #4 2010 - My experience (Part3)

So far, this is the last part of my Barcamp Bangkok experience ^^.

My second day:
11:00 - 11:30 - Room 905 - Getting things done with "Getting Things Done" Part 2 by @KnightBaron
Nothing much about this room, most of contents he said are in the book of Getting Things Done by David Allen.
It's a framework for life/self management.

11:30 - 12.00 - Room 1005 - The real truth about IT careers in Thailand
Expert know what not to do and failed many times. You have 2 choice 1. Find a company 2. Create your company. Proficiency in one language and do it for a long time. Do interesting or exciting jobs. Love to code and doing it for fun. Participate in project and share experience, open mind, spread to other. GEEK! really want.

Part 1: http://darkkung-blog.blogspot.com/2010/11/barcamp-bangkok-4-2010-my-experience.html
Part 2: http://darkkung-blog.blogspot.com/2010/11/barcamp-bangkok-4-2010-my-experience_13.html

LaTex Editor and Compiler

For Windows, we can use TeXnicCenter from http://www.texniccenter.org/ and use MikTex as a LaTex compiler from http://miktex.org/.

For Mac, you can just install MacTex package from  http://www.tug.org/mactex/ easily.

Friday, February 25, 2011

How to fix Boot Camp time offset

I have a problem with the time in Boot Camp. Everytime I use Windows and then comeback to use OSX, the current time will be changed all the time. It's very annoying. Now, I just found the solution from this blog: http://grupenet.com/2007/12/04/fix-boot-camp-time-offset/. It's very useful.

There are 3 steps:
1. Open your notepad.
2. Copy and paste the following:
@echo off
net time /setsntp:tick.usno.navy.mil
net stop w32time
net start w32time
3. Copy it into "Startup" folder in Startup menu

Now every time you start up Windows, it will fix the time offset automatically.
p.s. If it doesn't work, try to use automate sync time. If you can access internet, the time will be synchronized automatically.

Friday, February 18, 2011

How to save objects in Python

Python provide module for us to save an object by using "pickle" module. You can save an object into a file for loading it in later use.

For example:

file1.py
import pickle

class Test:
    A = ''
    B = ''

f = open('pickle','w+')
ob = Test()
ob.A = 'A'
ob.B = 'B'
pickle.dump(ob, f)

file2.py
import pickle

class Test:
    pass

f = open('pickle','r+')
ob = ''
# If we don't have class template for loading object, 
# the error will occur.
ob = pickle.load(f)

print ob.A     # output: A

It's very simple in python to save state of the object ^^.
More detail at: http://docs.python.org/library/pickle.html

Simple way to export files from iPods

There are many to export files from iPods but I just found this solution is very simple. After you install the program and then open it. It will show the contents from your iPods. Finally, you just drag and drop files into your location. This application is called DeTune.

Wednesday, February 16, 2011

How to copy fonts in Mac

There are 2 ways to do that.
1. Copy directly by copy fonts into /Library/Fonts/
2. Go to application -> open Font Book -> import fonts

p.s. If want to export text to other computer, can use .pdf. It can be read in any machine without fonts installation problem.

Thursday, February 10, 2011

Quick open terminal in Mac by using one click

In the past, I post about quick open terminal in Windows and Ubuntu. Now, it's a time for Mac.
You can do it by download one of them (they're very similar).
1. http://code.google.com/p/cdto/
2. http://homepage.mac.com/thomasw/OpenTerminal/

After download, you have to drag it icon into finder bar.


It's very easy to use by click at an icon or drag folder to an icon. Then, it will open terminal at the current or selected directory.

^^

For Windows: http://darkkung-blog.blogspot.com/2010/10/open-command-window-at-current-path-in.html
For Linux-Ubuntu: http://darkkung-blog.blogspot.com/2010/10/quick-open-teminal-in-ubuntu-by-using.html

p.s. You can create it by yourself by using "Automator" by looking at http://www.macworld.com/article/47793/2005/11/folderinterm.html for more details.

How to add restore session tabs feature to Mac Safari

Last week, I got MacBook Pro. It's the first time I used Apple product. I got new experience and satisfaction for using it. But I have many newcomer common problems. For example, Read and write in NTFS hard disk, Office software, Left menu tab, How to install software, New Keyboard and shortkey, and the most basic thing like web browser.

For me, restore the last open session tabs feature is very important. So, I have to use Safari plugin e.g. SafariStand that can restore tabs.
The installation guide is here:


Now, I can enjoy with Safari ^^.