Skip to content

Instantly share code, notes, and snippets.

@samgooi4189
samgooi4189 / FinderHiddenConfig
Created November 1, 2012 06:23
Config Finder to view hidden files
Open the Terminal application (or, I much prefer iTerm) and type the following:
defaults write com.apple.finder AppleShowAllFiles TRUE
and after hitting return, follow it up with
killall Finder
which restarts the Finder and shows all files.
@samgooi4189
samgooi4189 / FUSEremover
Created November 1, 2012 06:29
Uninstall macfuse / osxfuse
For those who are having problem with brew doctor:
if the errors are related to macfuse or osxfuse, follow the following instruction:
1. Open terminal
2. cd /
3. cd Library
4. cd Filesystems
5. ls
6. you will then see osxfuse.kext
@samgooi4189
samgooi4189 / gist:5022743
Created February 24, 2013 05:28
Recover from Ubuntu ATI graphic failure
sudo apt-get purge fglrx
sudo apt-get install linux-headers-generic
@samgooi4189
samgooi4189 / touchpad_fix
Last active December 14, 2015 03:39
HP touchpad patch for Ubuntu
1. Download the patch from here, http://www11.zippyshare.com/v/67935989/file.html
2. sudo apt-get install dkms build-essential
3. cd ~/Desktop
4. tar jxvf psmouse-3.2.0-24-generic-pae.tar.bz2
5. sudo mv psmouse-3.2.0-24-generic-pae /usr/src
6. cd /usr/src
7. sudo chmod -R a+rx psmouse-3.2.0-24-generic-pae
8. sudo dkms add -m psmouse -v 3.2.0-24-generic-pae
9. sudo dkms build -m psmouse -v 3.2.0-24-generic-pae
10. sudo dkms install -m psmouse -v 3.2.0-24-generic-pae
@samgooi4189
samgooi4189 / Installation for OpenCV 2.4
Last active December 16, 2015 14:28
OpenCV 2.4 for linux
THIS TUTORIAL WORKS FOR UBUNTU 12.04
tar xvf OpenCV-2.4.2.tar.bz2
cd OpenCV-2.4.2/
mkdir build
cd build
To install OpenCV 2.4.2 or 2.4.3 on the Ubuntu 12.04 operating system, first install a developer environment to build OpenCV.
sudo apt-get -y install build-essential cmake pkg-config
@samgooi4189
samgooi4189 / update AMD graphics
Created April 24, 2013 05:45
Update AMD graphics in Ubuntu
== Worked with 6600M series ==
Now install the drivers using this command
sudo apt-get install fglrx-updates fglrx-amdcccle-updates
Initialise aticonfiguration
sudo aticonfig --initial --input=/etc/X11/xorg.conf
Restart the system
Verify installation by using
@samgooi4189
samgooi4189 / fix ubuntu login issue
Created May 11, 2013 06:37
[Solved] Unable to get into Ubuntu home although password is correct
Press CTRL+ALT+F1
Log in with you user name and password
Run the following command: sudo chown -R $USER:$USER $HOME
Press CTRL+ALT+F7
Try to log in.
@samgooi4189
samgooi4189 / gist:6216722
Last active December 20, 2015 23:59
HP Mini 311 Fixed (8/12/2013)
Working solution:
- Unplug power adapter
- Remove CMOS battery and laptop battery for 1 day
- plug in CMOS battery
- Insert 2GB RAM (I am using Samsung RAM)
- Extract .fd file from HP BIOS file
- Rename .fd to .BIN, only reserve the front 4 character in the name. Eg: 5152ex.fd will rename to 5152.BIN
- Format 1GB pendrive (I use Kingston DT) using HP USB Disk Storage Format Tool
- Put the .BIN file to the pendrive
- insert the pendrive to the left USB port
@samgooi4189
samgooi4189 / photo.js
Created November 23, 2013 17:20 — forked from bradorego/photo.js
function sendAJAX(url, method, callback, data, headers) {
var xhReq = new XMLHttpRequest();
if (method !== "POST" && method !== "GET" && method !== "PUT" && method !== "DELETE") {
return false;
}
xhReq.open(method, url);
if (typeof(headers) != "undefined") {
for (var i = 0; i < headers.headers.length; i++) {
xhReq.setRequestHeader(headers.headers[i].type, headers.headers[i].value);
}
@samgooi4189
samgooi4189 / gist:8032006
Created December 19, 2013 00:00
[Solution] Enable Nvidia hardware acceleration in Ubuntu
Nvidia Hw Acceleration =
in Flash:
1. Download Flash player from website
2. Open readme in downloaded tar, and follow the instructions in the txt file. (put the .so library under firefox plugin, and copy files into local usr)
in VLC:
[Optional]: upgrade your driver using restricted driver menu.
1. install vdpau1 vdpau-dev vdpau-va-driver