Posted by: gabrielwu84 | June 11, 2015

MEAN Stack

Trying to install the mean stack now:

Mean stack tutorial


Posted by: gabrielwu84 | June 9, 2015

Samsung 850 Evo 250Gb

Samsung 850 Evo

Got an SSD for $140.00 over Carousell today, as I was reinstalling Ubuntu, and thought I might as well install it on an SSD drive while I am at it. Found 128Gb SSDs going for $100, and 250Gb SSDs going for $140, so got the bigger 250Gb drive.

The difference in system performance is very visible – response to clicking on an icon went from around 1s to prob 0.1s or so. Boot up time went from about a minute to seconds (10-20s). Waking from hibernation and shutting down now takes about 2s from maybe 10s.

SSD Configuration
The following is my hard drive configuration:
# / was on /dev/sdb2 during installation
UUID=6xxxxx1-exx9-4xxd-bxx6-9xxxxxxxxx8 / ext4 errors=remount-ro 0 1
/boot/efi was on /dev/sdb1 during installation
UUID=CxxC-4xxF /boot/efi vfat umask=0077 0 1
/hdd was on /dev/sda2 during installation
UUID=fxxxxxx8-dxx2-4xx8-axx5-5xxxxxxxxxx7 /hdd ext4 defaults 0 2
swap was on /dev/sda1 during installation
UUID=4xxxxxxd-5xx9-4xx2-bxxb-4xxxxxxxxxxd none swap sw 0 0

Basically efi and the Ubuntu installation on SSD, and swap on HDD with the rest mounted onto a folder.

Subsequently, I moved the /home, /tmp, and /var directories to /hdd and symbolically linked them (ln -s /hdd/blah /blah).
1. I had to do this outside of unity as it would screw up the session. Learnt the trick ctrl-alt-F1 to run Ubuntu from the console.
2. Terminal opened up to /hdd/home/gabriel$ which was kind of annoying. Solved by putting the line cd ~ into .bashrc.

Further Plans
I also plan to install an SSD drive into the cd bay of my Chronos7, because the drive is spoilt. Intend to do it after the warranty expires on Sept 11. I just realised that the deal I got was not that good, and the same SSD is going on Amazon for under US$100. Will check back there when the time comes, and I have to look for the specific caddy with the dvd to sata3 adapter too.

Also, forgot to mention 4GB Ram
Purchased it for around $45 after I bought the Nvidia graphics card. This was more than the $42 I paid about two years back. Looks like that is the floor for RAM prices, and I bought it at a time when the USD was particularly high against SGD.

With this SSD, the hardware upgrade of my current build has run its fullest course. I found out that later generations of AMD A10 processors require the FM2+ socket (my mb is only an FM2), so I cannot continue upgrading the processor and cascade the components.

It is quite functional, and time will tell how long it will last – I hope that it will serve another 2-3 years, bringing its total lifespan to 6 years (not bad for a $1000 build).

There is still a lot of room to play on the software side however – SteamOS, Cairo-Dock. Will be exploring them in due course.

Posted by: gabrielwu84 | April 10, 2015

Fix a scanned image, deskew books.

I have been trying to find a solution to background noise from scanned notes as well as straighten out scanned pdf documents that I find online. Here are a few answers:

Remove background noise in photoshop:

Straighten pdf with Acrobat XI:

Trying to configure the PC to run simulations continuously, and being able to control it remotely.

This page on upstart is useful:

Posted by: gabrielwu84 | February 28, 2015

Installing Mumax3 on Ubuntu 14.04

In summary, the steps for installing Mumax3 are as follows:

I. Install CUDA6.5 from the Nvidia website:
1. Download the .deb file
2. Run the following code to install CUDA
sudo dpkg -i cuda-repo-__.deb
sudo apt-get update
sudo apt-get install cuda

3. Permanently export the LD_LIBRARY_PATH
i. run
sudo gedit /etc/
ii. add the following line into the file and save
iii. run
sudo ldconfig

II. Download the Mumax3 program from the website, extract it, and run the correct file (e.g mumax3-cuda6.5).

Bonus: Place executable into a $PATH directory and rename it to mumax3 to use it anywhere on the system.


Read More…

Posted by: gabrielwu84 | February 25, 2015

Nvidia Palit GeForce GTX 760 JetStream 2GB

Nvidia Palit GeForce GTX 760 JetStream BoxNvidia Palit GeForce GTX 760 JetStream Card

It’s been a while since I tinkered with my home PC.

Just got myself the Nvidia graphics card off Carousell for $250.

Because I needed to run simulations on mumax3, and the program requires an Nvidia GPU with compute ability 2.0 and above.

Research during the December holidays paid off, and an abstract I submitted to Intermag 2015 got accepted. Hence I have to generate more quality data to add into the presentation, since I started properly setting up the simulation, each simulation run takes more than the time I spend at work, and I never get to complete it. Had considered options like relying on a computer that the lab was going to buy, but need to take action quick, hence the decisive purchase.

My first impression upon unboxing the GPU was that it was dimensionally huge. Thankfully, I had it still fit into my rather small casing.

After fixing the GPU onto the motherboard, the monitors would not work when connected to the original ports. This means that only the graphics ports from the GPU now worked, and the APU originally on the chip does not seem to have much purpose anymore.

Turning the computer on, there was a noticeable improvement to the speed of opening the menu on ubuntu, responsiveness of the mouse, and changing tabs on chrome. I could also play Don’t starve on steam, though I have not successfully played Dota2, which I could only barely do without the GPU.

1. work out the programs to install for the Nvidia GPU, and why there might be a need to install those programs.
2. install mumax3, and try to run simulations off it.

1. Add RAM. I currently have 4GB on the computer. It might be beneficial to get more. Checked the price out at Jurong Point today, and 8GB was quoted as $163, which was absurd. Will see the necessity of having more RAM, and purchase it in due course.
2. Add SSD. The booting process is still rather slow, and I look forward to turning on and off the computer with close to the convenience of turning on and off my tablet. With current SSD prices, I consider this a luxury I can do without for the moment, but hope to incorporate it sometime in the future. Have been keeping an eye on the SSDOptimization and Bcache programs on Ubuntu, but for the moment it does not seem so user friendly to add an SSD card, install a program, and have the system automatically use the SSD to speed up the computer. Hope that this improvements will come at the same time when I make this upgrade.

Posted by: gabrielwu84 | August 5, 2014

Video Driver on Ubuntu

I learnt that it is best to use the open source video driver for the Radeon 7660D graphics card attached to the Trinity A10 APU.

This can be done like this:

Now trying to get XBMC to work on dual monitor.

Posted by: gabrielwu84 | April 7, 2014

Public Transit App

I am thinking of making an app which automates the querying of bus arrival information, as I find myself doing the same query very frequently everyday. 

Found a google api called GTFS. Will look into how to tap upon that source of information.

Posted by: gabrielwu84 | March 14, 2014

Mail Merge

Had to perform a mail merge to send custom message to many recipients.

This website was helpful:

However, for some reason, I had to click “Allow” on a dialog box for every email sent. Apparently, running microsoft word and outlook as administrator would solve this problem.

Will try this in time.

Posted by: gabrielwu84 | March 1, 2014

Some links


phpMyAdmin on nginx

PHP on nginx

Upstart to run Python code

Using nginx as reverse proxy

Install nginx

Taking photo with getusermedia

Send photo to server

Turn base64 url back to image in python


Choosing between multiple camaras

Nodejs and Forever

Older Posts »



Get every new post delivered to your Inbox.