Phnom Penh: A Cultural History

Few months after moving to Phnom Penh, I started to read Milton Osborne's Phnom Penh: A Cultural History. The book really helped me appreciate the city as I walk through its numerous streets and alleyways.

Milton Osborne writes beautiful prose that takes one back to beginning of Cambodia's capital city and its troubled history. I would highly recommend this book to travelers visiting Phnom Penh, Cambodia.

Phnom Penh: A Cultural History (Cityscapes) by Milton Osborne

As a one-time resident of Phnom Penh and an authority on Southeast Asia, Milton Osborne provides a colorful account of the troubled history and appealing culture of Cambodia's capital city. Osborne sheds light on Phnom Penh's early history, when first Iberian missionaries and freebooters and then French colonists held Cambodia's fate in their hands. The book examines one of the most intriguing rulers of the twentieth century, King Norodom Sihanouk, who ruled over a city of palaces, Buddhist temples, and transplanted French architecture, an exotic blend that remains to this day. Osborne also describes the terrible civil war, the Khmer Rouge's capture of the city, the defeat of Pol Pot in 1979, and Phnom Penh's slow reemergence as one of the most attractive cities in Southeast Asia.

About the Author

Milton Osborne is an Adjunct Professor in the Faculty of Asian Studies at the Australian National University, Canberra. He is the author of nine books on the history and politics of Southeast Asia.

Server Monitoring with Monit Tutorial

As you sit down for a lovely Christmas dinner with family and friends, your phone rings. The frantic client is on the line shouting that the server just went down. Don't you wish you had a helpful program that automatically monitors and restarts the servers automatically.

Monit is an open source process supervision program that monitoring your server processes and restarts failed services. It is easy to setup and relatively painless to use.

Here is a quick tutorial to configure Monit to monitor Apache and MySQL servers.

$ sudo apt-get install monit 

# Monit Configuration settings
$ sudo nano /etc/monit/monitrc 
  set daemon 60 
  set logfile /var/log/monit.log
  set idfile /var/lib/monit/id
  set statefile /var/lib/monit/state
  set eventqueue
  set httpd port 2812 and
   use address localhost
   allow localhost
   include /etc/monit/conf.d/*

# Create Apache2 monitoring file 
$ sudo nano /etc/monit/conf.d/apache2 
check process apache with pidfile /run/
    start program = "/etc/init.d/apache2 start" 
    stop program  = "/etc/init.d/apache2 stop"

# Create  MySQL monitoring file
$ sudo nano /etc/monit/conf.d/mysql 
check process mysqld with pidfile /var/run/mysqld/
    start program = "/etc/init.d/mysql start"
    stop program = "/etc/init.d/mysql stop"

# Check monit configuration for syntax errors 
$ sudo monit -t 

# Start Monit daemon
sudo service monit start 

# Check Monit status 
$ sudo monit status
The Monit daemon 5.3.2 uptime: 4m 

Process 'mysqld'
  status                            Running
  monitoring status                 Monitored
  pid                               2676
  parent pid                        1
  uptime                            4d 8h 1m 
  children                          0
  memory kilobytes                  256380
  memory kilobytes total            256380
  memory percent                    12.5%
  memory percent total              12.5%
  cpu percent                       0.0%
  cpu percent total                 0.0%
  data collected                    Wed, 10 Dec 2014 08:43:13

Process 'apache'
  status                            Running
  monitoring status                 Monitored
  pid                               4230
  parent pid                        1
  uptime                            4d 8h 1m 
  children                          27
  memory kilobytes                  11556
  memory kilobytes total            391484
  memory percent                    0.5%
  memory percent total              19.1%
  cpu percent                       0.0%
  cpu percent total                 0.0%
  data collected                    Wed, 10 Dec 2014 08:43:13

System ''
  status                            Running
  monitoring status                 Monitored
  load average                      [0.00] [0.01] [0.05]
  cpu                               0.0%us 0.0%sy 0.0%wa
  memory usage                      666736 kB [32.6%]
  swap usage                        140 kB [0.0%]
  data collected                    Wed, 10 Dec 2014 08:43:1

That's all folks! Now you have a wonderful Christmas!

Announcing the next Phnom Penh Tweetup

Announcing the next Phnom Penh Tweetup during the next Connect@coLAB event. If you have a Twitter account, you can contact us with hashtag #PhnomPenhtweetup in your message. You can also follow us using this twitter search page (#PPtweetup).

Don't worry if you don't tweet. Come and meet some great people at Phnom Penh Tweetup. :)

What is a Tweetup?

A tweetup is an organized, in-person gathering of people on Twitter. Normally we connect with our friends online after we have met them. At a tweetup you meet the people you might only otherwise know virtually. Like finally putting a name to a face, a tweetup is a great opportunity to really connect with the people who you follow on twitter.

When is it?

Thursday December 18, 2014
6pm till 9pm

Where is it?

#263 Street 163 Toul Tom Pong Phnom Penh
+855 (0) 16 777 631 – Samda

coLAB is located on street 163 near the corner of street 454. We are on the 1st floor above 7 Mart Convenience Store.

Phnom Penh Tweet Up and Pop Up bar poster

Gnome 3 Massive Title Bar Solution

Upgraded to Ubuntu 14.10 (Utopic Unicorn) this weekend. The upgrade process went without a hitch and latest Gnome 3.12 desktop experience is good except for this massive title bar issue. Reblogging Mikey's solution for this minor Gnome 3 annoyance. Thanks Mikey!.

$ sudo sed -i "/title_vertical_pad/s/value=\"[0-9]\{1,2\}\"/value=\"0\"/g" /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml

Gnome 3 Desktop screenshot image with large title bar


Gnome 3 Desktop screenshot image with normal title bar


Reported the bug, Please feel free to track the bug #1385597 and provide your feedback.

Scaffold an AngularJS App with Yeoman

Notes from this morning's scaffolding an AngularJS with Yeoman demo at AngularJS training session at Development Innovations in Phnom Penh. It follows the fantastic Let's Scaffold a Web App with Yeoman code lab tutorial.

Yeoman makes web developers productive by generating basic application directories and writing various configuration files. Grunt and Bower are used for build and package management.

Yeoman is installed using Node package manager (npm). In this post I install Node.js using Node version manager (NVM) tool . You can also install npm via package manager of your operating system.

# Run the Node.js version manager(NVM) Installation script 
$ curl | bash

# Active the Node.js version manager (NVM) 
$ source ~/.nvm/

# Install the stable version of Node.js 
$ nvm install v0.10.32

# Install Yeoman 
$ npm install -g yo 

# Install the AngularJS generator.
$ npm install install -g generator-angular

# Let's create a directory for our TODO AngularJS app and change directory into it.
$ mkdir todo 
$ cd todo 

# Scafold AngularJS  App
$ yo angular 

# The AngularJS generator following directory structure 

$ tree -L 1 -a 
├── app
├── bower_components/
├── bower.json
├── .bowerrc
├── .editorconfig
├── .gitattributes
├── .gitignore
├── Gruntfile.js
├── .jshintrc
├── node_modules/
├── package.json
├── test
└── .travis.yml

# Start the development server. 
$ grunt serve  

# Additional packages can be fetched and installed using bower.
$ bower install --save jquery-ui

# Let's build your code 
$ grunt 

# One final check before deployment. Serve the production server. 
$ grunt serve:dist