Wednesday, April 27, 2016

Increase Swap size - digitalocean droplet

Set the swap size to 512M and after a while mysql failed to start. Tail the /var/log/mysql/error.log and found that innodb had memory-related error. For now I solved it by increasing the swapfile size.

1. Cannot swapoff since there was not enough memory
2. So I create new swapfile first and use it and then delete the old one and edit the /etc/fstab file

sudo fallocate -l 4G /swapfilenew
sudo mkswap /swapfilenew
sudo swapon /swapfilenew
sudo swapoff /swapfile # < delete old swap
sudo rm /swapfile
sudo swapon -s # check to make sure

Edit /etc/fstab to turn on swap when reboot. Change from /swapfile to /swapfilenew

Friday, April 22, 2016

ซ่อมปุ่มกดพัดลม hatari บอร์ด ht7621

อาการคือกดแล้วไฟไม่ติดและไม่มีเสียงอะไรเลย ตอนแรกคิดว่าเป็นที่ C 105K/400V เหมือนที่หลายๆท่านว่ากัน แต่ดูแล้วมอเตอร์มันไม่ได้ขยับหรือมีเสียงอะไรเลย จึงคิดว่าน่าจะเป็นที่สวิทช์เสีย ลองค้นดูเจอเวปนี้ ลองทำดูแล้วได้ผล ต้องขอขอบคุณมากเลยครับ ที่ให้ความรู้ในการซ่อมสวิทช์ ที่ผมทำคือใช้สเปรย์ phillips ฝาสีแดงฉีดที่สวิทช์แล้วกด 100 ครั้ง ทำซ้ำกันสามครั้ง หายจริงเหมือนที่ได้แนะนำไว้

Sunday, March 6, 2016

Fix Missing Boot File problem on Windows 10

I had problem with Boot Manager after installing Windows 10. Running "bcdedit" I could see that the partition on Windows Boot Manager was wrong. I then used EasyBCD to fix
  1. From BCD Backup/Repair, select re-create/repair boot files
  2. Perform Action
  3. Restart

Remove Earlier Version of Windows Menu When Boot

  1. Run Command Line with Admin
  2. Run bcdedit to check previous version entry
  3. bcdedit /delete {identifier of Windows Legacy OS Loader} /f
You can also use EasyBCD Free tool.

Deleting Locked Windows And Program Files Folders (Windows 10)

After installing Windows 10 on a new drive, you might want to delete all the "Windows", "Program Files" folders on the old drive while keeping other data folders. Deleting directly will give you all the permission issues preventing you from doing this. The solutions that worked for me was :
  1. Create a folder "Windows.old" on the old drive
  2. Move all those folders you want to delete under it
  3. Then select the old, right click, Properties and Disk Cleanup
  4. Select "Clean up system files" and click clean previous Windows version

Friday, February 19, 2016

Set Kodi to Support Thai Font

This is for OS X (Mac) but should work similarly for Windows.

Go to, show package content then Resources\Kodi\media\fonts and backup original arial.ttf and replace it with tahoma.ttf (you can copy it from \Library\Fonts). Then go to Kodi Settings\Appearance\Skin\Fonts and make sure it's set to "Arial based". That's it. Setting Language or Character set to Thai just does not work (Feb 2016).

Tuesday, January 12, 2016

Mirror Source folder to Destination folder in OSX

Use rsync.

rsync -avE --delete "source folder/" "destination folder/"

-a = Archive. Copy all attributes.
-v = Verbose
-E = Extended. Copy additional Mac attributes

man rsync to get more info.

The "/" at the end of the folder name is important as it will copy all files/folders within the source folder without creating the source folder itself.