RSS Feed

Facebook chat list

I am not a Facebook fervent user. I use it because of some of my friends are using it.

So, if you want to enable your “available to chat” status to your group of close friends or special group of friends,

  1. Go to Friends an create a list that you want to chat with.
  2. After creating the list, add your close friends.
  3. Now, turn on the Chat.
  4. Go to Chat Options > Advanced Settings
  5. Choose “Turn off chat for all friends except…”, and add in your target chat.
Custom chat list in Facebook

Custom chat list in Facebook

Then, if you are using Pidgin, you can use chat with your Facebook friends by following this instruction.

LibreOffice Writer table tips


LibreOffice Writer is better than Microsoft Word. If you are a web developer, you should understand that there are class and style. Using LibreOffice is tended to using class-like style, instead of direct formatting, which causes a lot of inconsistent, troublesome, and time consuming modification throughout the word processing. And this is happened when the newbies are using Microsoft Word to create templates for the advanced user like me, and causes me full of trouble as being tortured.

The worst thing in Microsoft Word is the Numbering format. Microsoft Word sets the numbering format as properties of a paragraph. But LO Writer differentiates the paragraph style, character style, frame style, page style, and the list style. Thus, it is much more easier to use the list style in LO Writer.

I admit that LibreOffice Writer still has some limitations comparing to some features of Microsoft Word, but for the styles and formatting, it is much more easier than using Microsoft Word.

Now, let me go into the tips of the table in LO Writer. The LO version I am using is 5.0.

Table at the same line of paragraph

In Writer, unlike image, table by default cannot anchor as character. Therefore, it cannot have some text at the left or right of a table. This can be solved by using frame.

Table in the paragraph line

Table in the paragraph line

So, create a frame and set the properties,

  1. Type > Anchor as character
  2. Type > Vertical Top to Row (depend on your preference)
  3. Wrap > Spacing four sides to zero
  4. Borders > Set no border
  5. Insert table inside the frame.

Remove/add the empty line after table

As the image above, you can see within the frame, there is an empty line after the table. This line, you cannot delete or “backspace”. So, in order to solve this, at the last cell of the table, press Ctrl+Shift+Del will delete the empty line. In order to add the empty line, Alt+Enter.

Vertical text in the table

To create a vertical text, it has to create a new style (it can be based on the Table Contents). Then at the new style properties,

  • Position > Rotation / Scaling > 90 degrees or 270 degrees (based on your preference)

After creating this style, just select the content of the cell you want to have a vertical align, apply the created style, than it will work.

Vertical text in the table

Vertical text in the table

There are several things have to take note when using the style to rotate the text. The image above shows two different ways to rotate the text. The left bottom cell is using the method mentioned above, the right bottom cell is using the following method,

  1. Select the text in the cell, and go to Table Properties,
  2. Text Flow > Text orientation >Vertical

By using the Text Flow method, we cannot change the rotation direction as shown in the left bottom cell. But using this way, we can change the alignment and indent easily. When we choose align to the centre, the text will be centre as usual.

However, using the Style method, it is quite confusing. When using Style, if we align the text to centre, it is based on the view of the table, instead of make the text centre itself.

Centre text problem

Centre text problem

As the image above, the first cell has the following properties

  • Table Properties > Text Flow > Alignment > Top
  • Paragraph Properties > Alignment > Options > Centre

The second cell has the same properties as above.

In order to make our text at the left cell start from the left bottom corner, then we have to set

  • Table Properties > Text Flow > Alignment > Bottom
  • Paragraph Properties > Alignment > Options > Left
Align the table

Align the table (they left and bottom).

Padding in a specific cell or customise a cell

As the image above, we want to adjust the left cell of the text, so that the text and the bottom border has some spacing, this have to customise the cell specifically. However, LO Writer does not show any clue for you to edit the properties of a cell, and it only shows you “Table Properties”.

It is actually possible to customise a certain cell.

  1. Select a cell by highlight the content inside,librlibr then hold and move the cursor to next cell. We will discover that the cells are highlighted, instead of the text within.
  2. Since there are two cells being selected, we move our mouse back to the original cell. And we will get something like this,
Select a cell

Select a cell

Now, the cell can be edited with Table Properties (which is actually selected cell properties).


So, these are a few tips which are useful to manage the table in the Writer.

Review of movie Project Almanac (2015)

I like science fiction movie, especially related to time travelling. Watched Project Almanac (2015), and there are quite a lot of interesting points.


Firstly, unlike Back to the Future (1985), time travellers going back will not meet the time travellers selves, this can be seen when the protagonist and the friends solve Quinn’s chemistry problem. Secondly, unlike Time Traveler’s Wife (2009), travelling to the past can change the future; yet in Time Traveler’s Wife the timeline is fixed, there is only one, single, timeline.

So, Project Almanac has a different time travelling concept. Let me list down the features:

  1. When the time travellers going to the past, they will change the future/present. And they can meet past self, which was not happened in the past of the time travellers. (like Back to the Future)
  2. When the time travellers going to the past again, they will not meet the time travellers selves. (unlike Back to the Future)
  3. But, if a time traveller goes to the past “again”, he will see other time travellers, but not meeting the time traveller self. (As in the case of David tries to change the conversation with Jessie.)
  4. After the time travellers make the changes at the past, when they are going back to the present, they have no memory for what is happened for the time from the back to present, yet there is “another self” doing something in between the past and present. And when they are coming back to the present, they are replacing this “another self”. (This can be seen after David makes the changes for the conversation with Jessie, and going back to his present.)

Interestingly, at the end of the movie, there are two identical cameras. This makes me immediately asked the first question, why? Because I never thought that David and the friends are using his father’s camera to record all the events. Therefore, the movie using the footage method is different from Cloverfield (2008), which is only one camera view. But, the footage at the end which shows that David and Christina found the two cameras must not be the same footage for all the time travelling events.

Okay. Now let me explain the movie in my own way so that it makes more sense, because there are somethings which do not really make sense. Firstly, let me name the David in the movie at the beginning until disappearing as David2. David2 discovered that himself appears in his 7-year-old birthday party. Let me name this “himself” as the David1. It is impossible that David1 and David2 are identical, just like the case past Quinn seeing present Quinn. David1 brings the key chain and wears the same cloth as David2 at going to the past at the end. And let me name David2’s past David at the end as David3. Hence, there are three Davids.

So, David1 go to David2’s time, to “fix something”. But it is impossible that David1 did the same thing as David2, else David2 will find the two cameras as David3. That means, David1 “fix[ed] something”, but different from David2, that is why no camera left. Consequently, David2 can find the time machine. Then, because of the time machine, David2 supposes have gone through everything similar to David1, that is why they dressed same and brought the key chain. But at the end, David2 destroyed the time machine, and left the camera to David3.

David3 at the end has a conversation with Jessie and he knows what Jessie wants to say. The only reason is that David3 already watched the video in the camera passed by David2.

So, this is an open ending. Whether David3 is going to do the same time travelling as David2 and left the camera to David4? I believe David3 will have a very different experience from David2 and David1, because he has the video that shows failure from David2. David2 failed because David1 doesn’t really “fix something”, unless David1 is purposely fixing the problem in order to produce David2. Then this will be more interesting.

Hence, the possible sequence is {1, 2, 3, …} or {1, 2, 1, 2, …}. Just enjoy the movie with your own imagination.

Arch Linux in MacBook Air

Posted on

This is not a new stuff. You can get some tutorials from Internet. And it is very interesting when I did this, because I learnt new things. The following procedures are based on what I remembered. So, it may not be 100% accurate, since I am a forgetful person. 😅

What I did was reading the Arch Linux Wiki page. Then, followed the instructions as much as possible, and do some trials and errors. Remember to backup everything necessary. And try this at your own risk.

MacBook Air preparation

Before installing, firstly do the partition using Mac OS X itself. The tool can be found in /Applications/Utilities/Disk Then select the drive, not partition, at the left-hand panel. Next, click the “Partition” tab at the right. Make sure that you have enough disk space for the Arch Linux installation including the disk space for /home. In my case, I created three partitions at the end of the drive. One for root, one for swap, and one for /home. These three partitions are formatted in FAT32.

Since MacBook Air uses EFI to boot, and I am new to UEFI boot, so I installed rEFIt (Mac disk image). After installing rEFIt, reboot the MacBook then will show the options like this. That means, you have successfully installed rEFIt.

Arch Linux installation

Firstly, make sure you know how to install Arch Linux. Then, prepare a live USB for Arch Linux installation. Insert the USB to MacBook, then reboot, and hold the Alt/Option key. Then you will be shown a screen to choose booting into rEFIt or Arch Linux UEFI.

Choose Arch Linux UEFI and boot into Arch Linux for installation. Firstly, format the 3 partitions created in Mac OS X to what you want. In my case, I formatted /dev/sda3 and /dev/sda5 to ext4, and /dev/sda4 to swap. Next, we need to edit the partition type of the formatted partitions. This is done by using cgdisk instead of cfdisk, because MacBook is using GPT partition table. At the same time, you can see which partition is the EFI system partition. In my case, it is /dev/sda1, and it is FAT32 format. Hence, I mounted /dev/sda3 to /mnt, /dev/sda5 to /mnt/home, and /dev/sda1 to /mnt/boot.

Get the internet connection using netctl. Then proceed pacstrap as usual, arch-chroot and do some configurations.

Then, the GRUB installation took me some time. I used GRUB instead of gummiboot, because I know nothing about gummiboot yet. Follow the Wiki instruction, and please note that $esp refers to the mount point of the EFI system partition. In my case, it is /boot (after arch-chroot). After installation of GRUB, then generate the GRUB configuration file.

After installation, I found that there are /boot/EFI/Apple/, /boot/EFI/grub/ and some other files in /boot mount point.


If success, no need to hold the Alt/Option key, rEFIt will prompt you to choose to boot into Mac OS X or GRUB. Boot into Arch Linux through GRUB to check whether you succeed or not.


After installing Arch Linux, do the configurations, add users, install packages, install desktop environments, X11, setup the audio, install NetworkManager, etc.

There are three more things I concerned: i) graphics card, ii) touchpad, and iii) keyboard.

I installed Nouveau driver for the graphics card instead of NVIDIA. As the graphics card is GeForce 320M, it is under the N50 family (refers here). Therefore, I tried to install nvidia-340xx and nvidia-340xx-libgl. But the X11 does not work. At the end, I use Nouveau driver.

Next, the Synaptics input driver works fine in MacBook Air. But there is a little unexpected behaviour. Clicking (not tapping) the bottom-right cordern of the touchpad does not produce a right-click, but still a left-click. But in Mac OS X, clicking at bottom-left and bottom-right are different. Furthermore, some configurations have been done, such as two fingers tap and three fingers tap.

Finally, the keyboard is also configured based on the Wiki. I configured the Fn key and also swapped the Alt/Option key with the Command key. So that it works more like usual keyboard layout.

So, the demo video above first shows the rEFIt, then boot into Arch Linux using GRUB. As I have installed many desktop environments, I chose GNOME and launched the session.

Way of web development

Posted on

Personal Web Server(?) age

When I was doing web development, that time was mostly static pages, with no CSS, a little JavaScript. The only interaction was CGI form. Then I learnt VBScript for ASP and Microsoft Access and used Personal Web Server.

Designing page layout was like hell, everything was using table. The font style was hard coded. So, the HTML source is too messy.

LAMP age

Then, from Personal Web Server, the web server was upgraded to IIS. Next was XAMPP on Windows, using all open source solutions: Apache, MySQL, and PHP. That was a great solution. Unlike ASP, PHP has more functions, more libraries, supports object oriented, syntax similar to C and C++.

JavaScript was not frequently used (in my case), until the usage of XMLHttpRequest (XHR) and AJAX, dynamic content became more attractive. The usage of CSS makes the HTML source much cleaner. JavaScript frameworks became popular for web application development. Some of the frameworks provide better user interface and animation effects. I used MooTools, jQuery and jQuery UI. In my opinion, jQuery is the best because of the element selection syntax is based on CSS selection. It is a great solution to enhance the built-in JavaScript.

To build the web applications, there are web application frameworks too: Ruby on Rails, django (Python), CakePHP (inspired by Ruby on Rails), etc. I personally prefer CodeIgniter. These frameworks are using MVC architecture, including ASP.NET MVC. Instead of static pages, URI routing is used. The developers need not to repeat the source code for similar pages, but using template engine and URI routing, developers only need to focus on the MVC design. Moreover, the web frameworks have their own APIs, the developers should learn how to use these APIs. So does the database, by using the framework APIs, it is possible to change the database from MySQL to PostgreSQL with a little modification.

With the CSS3 and HTML5, web application development becomes much easier. They become more interactive with JavaScript, more elegant with CSS effects.

Other than the frameworks, content management systems such as Joomla!, Drupal, and WordPress were very popular. They allow users to manage their own websites by focusing on the contents only. The developers are usually working on modules to provide more functions to the system, and the web designers will design the themes.

MEAN age

And now, the new trend is the MEAN stack instead of LAMP: MongoDB, Express.js, AngularJS, and Node.js. This solution is seriously different from LAMP. Node.js is not only a web server, but also a server-side JavaScript runtime environment. Unlike client-side JavaScript, JavaScript language is used at the server-side, and it can use the modules which can be installed by using npm (JavaScript package manager). As a result, both client and server sides are using JavaScript.

On the other hand, Express.js is the MVC web application framework. The URI routing and displaying the contents to the users is handled by Express.js. It can use different kinds of template engine where Jade is the default template engine.

AngularJS is a web application framework, which is different from jQuery or JavaScript modules from npm. AngularJS provides MVC architecture to the client-side, so that the view (HTML and CSS) are separated from the controller and model. The greatest feature is the data binding which will make real-time changes to the view. Using jQuery, we need to use EventListener such as onChange(), onKeyDown(), etc. But AngularJS magically omits this phase (demo).

NoSQL is the new trend because of big data. MongoDB is the document-oriented database, which is classified as NoSQL. Relational database management system (RDBMS) such as MySQL organises the data in the table form. As a result, sometimes the design of the database structure is very rigid and causes further changes of the web application becomes difficult. MongoDB does not require table structure, each collection (just like a table in MySQL) has various objects (just like rows of a table in MySQL). Each object is a JSON-like object, specifically BSON (Binary JSON).


Web development is like an ocean. There are various opportunities using web technology, such as WebGL for 3D computer graphics on the web. There are also alternative web servers: Nginx and Apache Tomcat (for JSP); alternative server scripting languages: Perl, Python, Ruby; stylesheet languages: Sass and LESS. It is also possible to develop new wonderful plugins for the web browsers to perform unusual tasks.

Some command-line applications uses web user interface (Web UI) instead of GUI, eg uTorrent Server (for Linux), httrack, Syncthing, etc. This is because HTML is more common than GUI widget toolkits. GUI widget toolkis such as Windows Forms, Qt, GTK+, etc requires runtime libraries. Web UI requires only a modern web browser.

WebKit is a very interesting thing. It is ported to Qt and GTK+, so that Qt and GTK+ can embed the web view in the native applications. Furthermore, Android has WebView class that uses WebKit too, to embed the web view in the native Android applications.

As the trend of big data and IoT, server-client is everything. Linux can be lightweight and focusing on running servers only, including all the logic, running on a single-board computer like Raspberry Pi or C.H.I.P, without any graphical user interface; Web UI allows administrators to manage the Linux server; the devices can connect to the Linux server and perform their tasks systematically.

My memory editor: Med

Posted on


There was a wonderful memory editor in Windows, that was Game Master. But it was not a freeware. And there is a freeware memory editor, it is ArtMoney. But it is also for Windows only. In Linux, there is only one memory editor, scanmem with GameConqueror as the GUI. However, there are some limitations from scanmem and GameConqueror. Thus, that is why I decided to create another one which can fit my needs. Therefore, I recently spent some time to develop this memory editor, namely Med.

This project was actually started because of Android hacking. I wanted to hack the Android game memory. I firstly wrote a program called “hed” (hex editor), which is purely in C language, to edit any binary file from ADB shell. The command-line works well. Then, I was thinking about to create “med” (memory editor) using C++, to edit any process from ADB shell. But it fails to work. However, during the development, it works well on the desktop computer, that is, x86 and x86-64 Linux.

Previously I was using GameConqueror. But I recently found that there are some limitations such as save/open file failed to work with the recent compiled version from the Git repository. Besides that, the memory editing does not work either. And, I also forked the project in the GitHub in order to add in a function, that is to “shift” all memory addresses. But at the end, it is not very useful either.


Med is a result from my years of programming experience. It involves

  • C language as it deals with memory directly
  • C++ as I am using the C++ STL container, strings, and exceptional handling
    • I use strings heavily based on what I learnt from UNIX philosophy (as text is important), Tcl philosophy (“Everything is a string”), and OpenGL (as a state machine)
  • GTK+ (version 3) for the GUI
  • Multi-threading using GLib
  • Linux, as this memory editor only works on Linux and relies on procfs
  • JSON, save and open file as JSON file format. JSONPP library is used to work with C++

Though GTK+ is written in C, it is object-oriented. I do not choose Qt because of my fervent towards C language. And I admit that writing a program using C++ is faster and easier than C. The GUI design is actually using Glade.


Med is still under development. If you want to use, just download and compile it. It is available here.

Memory editor editing memory in PCSX2

Memory editor editing memory in PCSX2

Gaming on Linux

Posted on

Recently, I admit that Chromium is faster and smoother than Firefox. And now, for me, Firefox is my primary bookmark manager, reference manger with Zotero, and best ever download manager; yet Chromium is my primary web browser.

This is just like Windows is no more an Operating System for me, but a game console. I have no choice to admit this because playing games on Linux, is still far behind from Windows. The main reason is the developers usually target on Windows instead of Linux. However, it is truly worth for me to optimise the functionality of a computer by running Linux and sacrificing the gaming potentiality of Windows.

Native, Emulators, and Steam

There are several methods to play games on Linux. Steam is one of the methods, but it is not my favourite. Other than that, there are native games in Linux, one of my favourite is Cave Story. Another solution is using emulators, such as DOXBox, VBA-M, MAME, etc. However, not all emulators work perfectly, especially PS2 emulators.


WINE (WINE Is Not Emulator) is my another favourite. It allows to run Windows applications including some games. Yet, it does not work perfectly, not all games work. I have successfully used it to play KOEI Sangokushi (Romance of the Three Kingdoms) 12 and The Sims 4. WINE works fine with these games. However, some 3D games such as Assassin’s Creed II and Dead or Alive 5 Last Round do not work for me. Moreover, latest version of WINE does not guarantee better compatibility of all games. Some games work better with a certain version of WINE; some games requires certain patched version of WINE.


So, the native Windows is still an attractive solution for playing games. Therefore, virtualisation is the possible solution. (LXC and Docker do not work, because they are containers.)


VirtualBox is my favourite hypervisor because it is very easy to use. VirtualBox allows Direct3D yet it is under experimental. It has to be installed through the Guest Addition ISO image. However, I found that the Direct3D driver installed is wined3d.dll. As a result, the 3D rendering produces the same problem as in using WINE for certain games. As a conclusion, using VirtualBox to play 3D games does not work as expected.


Since VirtualBox does not work with 3D games, I recently tried QEMU with KVM. Because I read some articles (this and this) regarding QEMU/KVM, it can virtualise the 3D graphics card. However, this requires 2 graphics cards: one for the host machine, another for guest machine. And this method uses VFIO, which is very troublesome.

Furthermore, there is a Virgil 3D project which targets to produce virtual 3D GPU. I studied a little, yet I didn’t try to compile it, because it seems like very troublesome. As a conclusion, QEMU/KVM does not work either.

VMware Player

So, the final solution I tried recently was VMware Player, which is free for non-commercial use. Installation of the VMware Player version 7 requires GCC 5.1.0 in Arch Linux. In this case, I have to install GCC 5.1.0 and compile the modules, then downgrade to GCC 4.9.2 again.

VMware Player is very similar to VirtualBox, but the VM management less useful than VirtualBox. Besides that, some VM configurations have to be done manually using text editor.

After some configurations and testing, I found that it works as the best among the virtualisation software. It is better than VirtualBox.

VMware Player 3D configuration

To enable VMware 3D graphics for Direct3D, firstly we have to make sure our host machine (Linux) allows “direct rendering” by entering the following command,

glxinfo | grep direct

Then, to make sure it works,


Next, install WMware Player, then download and install VMware Tools for the guest OS. This can be done when running the Windows in the VM, by clicking “Virtual Machine” > “Install VMware Tools…”. Alternatively, we can download all VMware Tools for all the supported OSes from Player Preferences menu item. After finish downloading, we can run the setup in the Windows just like VirtualBox. The installation of VMware Tools allows seamless integration of the host and the guest like VirtualBox: such as resizing the window will resize the Windows resolution directly, and also the seamless mouse integration.

After installation, make sure 3D acceleration is enabled. This can be done from VMX file or from the Virtual Machine Settings,

mks.enable3d = "TRUE"
svga.graphicsMemoryKB = "1000000"

If 3D acceleration still does not work, then in the ~/.vmware/preferences, add = "TRUE"

Next, in the ~/.vmware/preferences, add followings

pref.motionUngrab = "FALSE"
pref.motionGrab = "FALSE"

This disable auto grabbing or ungrabbing our mouse pointer when it moves into the VM window.

However, in my case, my 3D game is very sensitive to the mouse movement. Thus, I have to disable the drivers installed by the VMware Tools. This can be done through Device Manager in Windows. After disabling the drivers, my mouse cannot click anything in VM. I have to use keyboard to restart the Windows.


Finally, I think I can enjoy more games in Linux now, though playing the games virtually in Windows.


Get every new post delivered to your Inbox.

Join 159 other followers