engine

Copy Youtube FLV from Firefox in Ubuntu 12.04 Precise Pangolin

29 Mar , 2012  

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 :

1
2
3
4
cd ~/
mkdir Youtube
vim u2tube.sh
chmod a+x u2tube.sh

u2tube.sh

1
2
3
4
5
6
#! /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

engine

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

9 Feb , 2012  

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 :

1
sudo apt-get install tor polipo nmap

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

,

engine

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

7 Feb , 2012  

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 :

1
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.

,

engine

Solve double minibufexplorer opened in VIM

31 Jan , 2012  

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 :

1
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
More…

,

engine

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

30 Jan , 2012  

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 :

1
lspci -vnnn | grep VGA

More…

,

engine

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

27 Jan , 2012  

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

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

Now you should edit your lightdm :

1
sudo vim /etc/lightdm/lightdm.conf
1
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 :

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

or

1
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! 🙂

,

engine

Solve Fabric No handlers could be found for logger “ssh.transport” Fatal error: No existing session

18 Jan , 2012  

After rebuild my ssh on Ubuntu Oneiric 11.10 Dekstop, suddenly my fabric give this error :

1
2
3
No handlers could be found for logger "ssh.transport"

Fatal error: No existing session

More…

,

engine

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

30 Dec , 2011  

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

1
2
3
4
5
6
7
8
[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 :

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

Then we will mount and install VboxGuestAddition by :

1
2
3
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! 🙂

,

engine

Running WordPressure NodeJS in EC2

30 Dec , 2011  

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

1
sudo apt-get install git redis-server

2. Install NodeJS

1
2
3
4
5
6
7
8
9
10
11
12
13
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:

1
2
3
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

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

4. Install Python Dependencies

1
sudo pip install -r requirements.pip

engine

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

29 Dec , 2011  

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.. More…

,

engine

Review how to build Ubuntu Oneiric 11.10 instance on HPCloud

7 Dec , 2011  

Today I got invitation from HPCloud to test cloud services for free. I want to see if HP Cloud can surpass over Amazon EC2 and Rackspace which I have server on both of them. First, I signup with invitation code and set my payment method with credit card. If you have the invitation code like me, don’t worry about billing, HPCloud does not charge in private beta and will give notification if it does. After register my payment method, then I go through with “create server” on Compute — US West 2 – AZ1. You should “activate now” before create cloud server.

It’s pretty simple to create server instance in HPCloud panel. There are several options in create server panel like Size, Security Group, Public IP, Install Image, Key Pair and Instances. I set my Install image into Ubuntu oneiric and default for the other. Only one step taken and your server already build. It’s more simple than EC2 or Rackspace which need a few steps. More…

,

engine

How to install wikistream on Ubuntu 11.10 with NodeJS 0.6

5 Dec , 2011  

Wikistream is great applications and publish on HackerNews. Today, I want to install and run Wikistream on My Ubuntu 11.10 Oneric. I have NodeJS 0.6.5 installed and run properly on my Ubuntu. If you don’t have, then you should install it. In case you need how to install NodeJS on Ubuntu 11.10, open your console and follow this steps :

1. Installing NodeJS

1
2
3
4
5
6
7
8
9
10
11
12
13
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

More…

,