發表文章

目前顯示的是有「Hack」標籤的文章

PhantomJS 擷圖 亂碼修正

使用PhantomJS拮取網站擷時,有時會因為網站Server的Content-Type沒有指定 charset 造成亂碼。Github 上有一個 issue  也是同樣的問題還沒解決。後來想到可以用 chardet 配上HTTP Proxy 來改寫Content-Type header。以上是一個簡單的script來解決這樣的問題:

Turning off discrete graphics for Acer Aspire 4750G

OPTIMUS on Linux has always been a pain in the ass for Linux users. It drains your battery power but you can't use it! Here is a way to turn it off on Linux, enjoy. Install acpi_call From github git clone https://github.com/mkottman/acpi_call.git cd acpi_call make sudo cp acpi_call.ko /lib/modules/`uname -r`/kernel/drivers/acpi From AUR If you are using Arch Linux, it's available at here

嵌入系統實驗PXA300 Lab3

圖片
Ubuntu on ARM Machine? No way. 其實是嵌入實驗做的數位相框XD

Fixing Live CD boot error: Ext3fs unsupported optional features: (240)

Scenario: Live CD boot without problem in qemu, but boot failed in a real machine with ext4 filesystem in local hard drive. The boot failed because of the following error: Ext3fs: sdaX: unsupported optional features: (240) root filesystem is not mounted and the boot sequence either fell into an infinite loop displaying the error or into busybox. Explaination I first encountered this error years ago in clonezilla Live CD, as I choose a new version of the Live CD image, the problem was gone. This time, I encountered this error again with BackTrack 4 Live CD Image. However, BackTrack Linux doesn't have a release roadmap and even if it does, the problem is not likely to be fixed since there is a workaround for it. As I insists in keeping my live usb layout neat, I decided to fix it myself.