Copy Youtube FLV from Firefox in Ubuntu 12.04 Precise Pangolin

Here is simple bash script to copy FLV Youtube into your folder in Ubuntu 12.04 Precise Pangolin. At this example, I put this script on home folder and create “Youtube” folder :


cd ~/
mkdir Youtube
vim u2tube.sh
chmod a+x u2tube.sh

u2tube.sh

#! /bin/sh
lsof -n -P | grep FlashXX | awk '{ print "/proc/" $2 "/fd/" substr($4, 1, length($4)-1) }' | while read f
do
echo $f
cp $f /home/ubuntu/Youtube/`basename $f`-`date +%H:%s-%d-%m-%y`
done

How to enable TOR open for remote access with Polipo on Ubuntu

Tor usually installed and running on 127.0.0.1 port 9050 which it’s can’t be accessed from outside. We can open this local listen address TOR signed into IP network and run as HTTP Proxy with Polipo. FYI, I use Vagrant and running Ubuntu Oneiric on Guest. I install TOR in Vagrant guest and accessed it remote from Host (Ubuntu). Let we start with installing tor and polipo on Ubuntu :


sudo apt-get install tor polipo nmap

After this installation, TOR should be running on localhost 9050. You can check it by scan using :
Continue reading

How to login into HPCloud Instance and edit Security Group using Hybridfox

Hybridfox is great tools for connecting with our cloud server. When you configure HPCloud server, then you should have this for manage your security groups and allowing several ports to be open. Because default group in HPCloud only allowing SSH port only.

I use the latest Firefox (10 and always updated through update-manager). Then you should download add-on for hybridfox and remember to pick the correct version ” hybridfox-1.6.000112.xpi ” on http://code.google.com/p/hybridfox/downloads/list. Using another version may give error results.

Download and use “Open file” in Firefox to install this add-on. You should restart your Firefox and on “Tools” menu, you should see “HybridFox”. Don’t open it yet, because it will show pop-up. If you have, then you should cancel all confirmation box pop-up by Hybridfox.

Go to your HPCloud, Go to “Account” and select API Keys. I have two region here, but I pick the first one for example. Show access key and secret key “EC2 Compability” :

You should copy this both key into your text editor. Because when you open HybridFox, you can’t switch window.

Then open you Hybridfox, click on Region to add AZ-.

For instance, I add :

https://az-1.region-a.geo-1.ec2-compute.hpcloudsvc.com/services/Cloud/

Now, you can add your instance by click on Credentials :

You can insert your access key and secret key.

After connecting, go to Security Group
Go to “Group permission” and click on check(V). Then you can fill it with what kind of port you will open for.

Solve double minibufexplorer opened in VIM

When using Minibufexplorer in VIM, I usually use Fuzzfinder for opening files. But, somehow, I see double minibufexplorer window every open more than 2 files. To solve this issue :


let g:miniBufExplorerMoreThanOne = 0

This will for miniBufExplorer into single window only. Another VIM configuration that may useful, taken from http://dotfiles.org/~joaoTrindade/.vimrc
Continue reading

Switch off ATI VGA in dual VGA with Intel on Ubuntu to solve overheat problem

I have AMD Radeon HD 6470M which sometimes it make my laptop overheat until 90 C. Usually, it’s run on 70 C. This is because ATI Radeon run together with Intel VGA. By switch off VGA AMD Radeon, it decrease overheat from 70 C into 58 C. And my laptop not overheat anymore. Basically, turn off ATI VGA will decrease heat problem in Ubuntu.

UPDATE: Try upgrade your BIOS. Several people have said they reduce heat by upgrading the BIOS.
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&cc=th&prodNameId=5086746&prodTypeId=321957&prodSeriesId=5086745&swLang=13&taskId=135&swEnvOID=4061#93211

First, check your dual VGA by :


lspci -vnnn | grep VGA

Continue reading

How to setup VNC server for remote desktop in Ubuntu 11.10 Oneiric

Install VNC server in Ubuntu 11.10 Oneiric for remote-desktop is very easy. Here are the steps to install :


sudo apt-get install x11vnc
sudo x11vnc -storepasswd yourpasswordhere /etc/x11vnc.pass
sudo chmod 744 /etc/x11vnc.pass

Now you should edit your lightdm :

sudo vim /etc/lightdm/lightdm.conf


greeter-setup-script=/usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /tmp/x11vnc.log

To run manually :

sudo x11vnc -rfbauth /etc/x11vnc.pass -o /var/log/x11vnc.log -forever -bg -rfbport 5900 -nomodtweak

or


sudo x11vnc -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /tmp/x11vnc.log

Happy remote desktop! :)

Solve Vagrant “The guest additions do not match the install version of VirtualBox”

After upgrading my Virtualbox, I try build my base box and got this errors :


[ff] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.

Guest Additions Version: 4.1.6
VirtualBox Version: 4.1.8

Yeap, this is happen because I have Ubuntu Oneiric on base box with old Guest Additions Version. Then, let go to the solution. First, remember your Virtualbox Version and download VBoxGuestAdditions with related version. For instance :


wget -c http://download.virtualbox.org/virtualbox/4.1.8/VBoxGuestAdditions_4.1.8.iso

Then we will mount and install VboxGuestAddition by :


sudo umount /mnt
sudo mount VBoxGuestAdditions_4.1.8.iso -o loop /mnt
sudo sh /mnt/VBoxLinuxAdditions.run

Now try to “vagrant halt” and “vagrant up” again to see if this works! :)

Running WordPressure NodeJS in EC2

Today I see Dchud release WordPressure, NodeJS + Python apps which aggregate new post in WordPress.com Real-time. Curious how it would be, then I put my unused domain ani-rss.org as my experiments. I use Amazon EC2 with Ubuntu 11.10 64bit (Oneiric). So, here are the steps.

1. Install base packages
sudo apt-get install git redis-server

2. Install NodeJS

cd ~/
sudo apt-get install git-core curl build-essential openssl libssl-dev pkg-config
mkdir ~/local
wget -c http://nodejs.org/dist/v0.6.6/node-v0.6.6.tar.gz
tar -xvvf node-v0.6.5.tar.gz
cd node-v0.6.5
export JOBS=2
./configure --prefix=$HOME/local/node
make
make install
echo 'export PATH=$HOME/local/node/bin:$PATH' >> ~/.profile
echo 'export NODE_PATH=$HOME/local/node:$HOME/local/node/lib/node_modules' >> ~/.profile
source ~/.profile

Configure /etc/environment to run NodeJS every boot startup:


NODE="/home/ubuntu/local/node"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$NODE/bin:$NODE/lib/node_modules"
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

3. Download repository

git clone https://github.com/dchud/wordpressure.git && cd wordpressure
npm install -g

4. Install Python Dependencies
sudo pip install -r requirements.pip

How to receive reset password hpcloud by whitelist email in gmail account

Yesterday, I wanna login into my hpcloud account and accidentally forgot my password. Then I go to forgot password page and put my email there. Waiting for more than 3 hours, there no confirmation email yet from HPCloud in my Gmail inbox. Try with three times and no result yet. Event spambox still empty. Then I contact HPCloud through their twitter account and contact pages.. Continue reading