Changing URL for WordPress

Recently, I have to change a URL for one of my WordPress websites. After a new domain name was pointed to the location of WP directory on my server, my website didn’t correctly show due to some elements still linked to the old URL. To fix this, I have to tell WordPress a new URL by putting these two lines in wp-config.php

define('WP_HOME','http://newURL'); define('WP_SITEURL','http://newURL');

ATOM as my favourite editor for Thai LaTeX document

From Github, Atom is an open source text editor that I’m interested for quite sometimes. In fact, I’ve been using SublimeText for a very long time because I love its speed and functions. The big problem of SublimeText for me is it can’t render Thai character correctly. This is a big deal for me since I once in a while need to write in Thai.

When I first tried out Atom, I really impressed that it can properly show Thai character. After a while, I come to love its community of developers behind it. I have to work with tons of LaTeX documents and I think now Atom is the answer for me.

Here is how I set up the packages to work with LaTex (especially for Thai). Big Thanks to MATTEO MEROLA blog for this guidance of setting LaTex for Atom.

2. Go to Atom > Preferences and install these packages.
• language-latex
• linter-chktex
• spell-check
• latexer
• latex-plus
• dictionary
• zen
• wordcount
• git-plus
• project-manager
• minimap

3. You’ll need to put the TeX path in the latex-plus setting.
4. Done! now you can write and compile your LaTeX document.
5. In order to use Thai, you’ll need to use XeLaTeX.
6. Set up a new project and create a simple LaTeX document as follow:
7.  \documentclass[a4paper]{book} \usepackage{xltxtra} \usepackage{polyglossia} \usepackage[top=25mm, bottom=20mm, left=25mm, right=25mm]{geometry} \usepackage[titletoc,toc,title]{appendix} \setmainfont{TH SarabunPSK} \defaultfontfeatures{Scale=1.23} \renewcommand{\baselinestretch}{1.2} \setdefaultlanguage{thai} \newfontfamily{\thaifont}[Script=thai]{TH SarabunPSK} \begin{document} ทดสอบภาษาไทย \end{document} 

8. Now go to Atom menu > Packages > LaTex-Plus > Edit
9. In the program, change to “xelatex”
10. Viola! now you can enjoy, writing LaTeX document in Thai ^_^

DIY bedside table

I got the inspiration from SANDHOG of Ikea bedside table for this DIY table.

What I want?

A bed side table for my iPhone and Apple Watch with the charging cable hide inside this table.

What you need:

1. Paper Bucket: I got this bucket for $3 USD 2. Paper Clip 3. Extension Power Board 4. Plastic Mat So, the total budget is around$10 USD.

1. Cut two holes with scissors on the near top and bottom of paper bucket for the power cable.

2. Use the paper clip to hang the extension power board inside the bucket.

3. Done! I put a round plastic mat on the top of the table to prevent a scratch for my devices. Enjoy ^_^

My Korean Series List

Updated 17-04-2016: from now on, I’ll update my list at http://www.imdb.com/rg/s/1/list/ls038586423/

I’d like to keep a list of K-series that I’ve watched. This list is ranked by my favourite of romantic comedy.

using Thai with LaTeX on Mac OS X

Here the thing, while I was writhing my thesis using LaTeX with the template that Dr. Gordon created, I have to write a long research report for my work.
So I have a though of using LaTeX to create that report since I already fond of the way LaTeX writing can help me organize and create beautiful PDF report.

However, it’s not easy as I thought since I have to write that report in Thai and Thai language is designed to be difficult to use in the digital world. I have to dig around for a couple days in order to use Thai with LaTeX especially on OS X.
Here is how I did it:

1. First we’ll need to install TeX Live, for Mac we need to install MacTex
2. Once you install the MacTex then you’re ready to use international language with LaTeX using XeTeX typesetting engine.
3. Then you’ll need a tool with XeTeX engine to write LaTeX. I recommend Texmaker because it’s free and super powerful.

4. After installing you will have to set up the typesetting by go to Texmaker > Preferences > Quick Build > XeLaTex + View PDF
5. Finally test your environment by creating new document with this code


You should see Thai language is working correctly, if not check if you system has Thai Sarabun font installed? You can download this official Thai font from SIPA

The main point is you’ll need to tell LaTeX to use Thai font
\usepackage{font spec} % To enable non-standard font selections \setmainfont{TH SarabunPSK} % A font with Thai glyphs \XeTeXlinebreaklocale ’th_TH’ % Thai-style word-breakings and line-wrappings 
Enjoy Thai LaTeXing ^_^

DIY: Jot Pro Stylus clip

Jot Pro in my thought is by far the best stylus for capacitive screen like iPad. I am using it all the time and even bought the iPad case that can carry this Jot Pro. However, the only draw back is the lack of pen clip. It’s difficult to put in your pocket without worrying about losing it. Here is what I did to make DIY clip for Jot Pro.

1. Buy a pen with a big clip (my pen is 25c)

2. Take the clip out and make a cut on the outer ring

3. Done ^__^

How to view .XPS on Mac OS X

XPS format is a Microsoft standard format to use in MS Office. From MS Office you can print any document into XPS format (*.xps). However, I got a difficulty to read this format in Mac. The best way I found out is open with Google Doc. Here is how I did it:

1. Mail the XPS file with Gmail

3. The file will open with Google Doc and then later you can convert to PDF ^__^

How to install Graphviz on Mountain Lion

Graphviz is open source graph visualization software. Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. It has important applications in networking, bioinformatics, software engineering, database and web design, machine learning, and in visual interfaces for other technical domains.

However there are some issues between Mountain Lion and X11, Graphviz 2.28 can’t run properly on Mountain Lion. Here is how I make it work.

* Install Homebrew by using this command in Terminal

$brew install wget * Then brew Libtool by typing this code in Terminal $ brew install libtool

* Finally, install Graphviz at http://www.graphviz.org/Download_macos.php (I am using version 2.29 dev snapshot)

* Done now you should be able to run Graphviz on Mountain Lion

Put Linkedin profile on WordPress 3

I have been using a static resume (About me page) on this blog for quite sometime. I also have my CV in Linkedin, which is my main professional resume. Consequently, it’s inconvenient if I need to update my profile, I have to go editing everywhere. Today I’ve found the best solution: “Link my linked in profile into WordPress page”.

This “Linkedin Resume” wordpress plugin is awesome. Once I installed it, I just go to Setting > Linkedin Resume and input my Linkedin public profile.

Then I just have to put

“[ linkedinresume ] ” (no space between brackret)

on the page that need my profile to appear [see http://kerdsri.com/about/].

From now on, I need to only maintain my profile in Linkedin ^__^