Saturday, October 22, 2011

Get idVendor of usb devices in Linux

Sometimes we need idVendor in order to create rules of connected devices using usb port in Linux. The command bellow show you how to get the idVendor information value.
root@digital-home:~# lsusb
Bus 002 Device 004: ID 090c:37b0 Feiya Technology Corp.
Bus 002 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 413c:b007 Dell Computer Corp.
Bus 001 Device 004: ID 0bda:0158 Realtek Semiconductor Corp. USB 2.0 multicard reader
Bus 001 Device 003: ID 0a5c:21b4 Broadcom Corp.
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The list aboce show us information that 413c is usb idVendor from Dell Computer Corp. which currently connected to my computer.

Wednesday, October 19, 2011

Using GIT under HTTP PROXY

If you want to use git command under http proxy, you can use this way:

  1. Install socat
    $sudo apt-get install socat

  2. Create configuration file which match with your proxy server address and port under /bin
    # Use socat to proxy git through an HTTP CONNECT firewall.
    # Useful if you are trying to clone git:// from inside a company.
    # Requires that the proxy allows CONNECT to port 9418.
    # Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
    # chmod +x gitproxy
    # git config --global core.gitproxy gitproxy
    # More details at
    # Configuration. Common proxy ports are 3128, 8123, 8000.
    exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport

  3. Now git command should work in your network under http proxy
    $git config --global core.gitproxy gitproxy

Tuesday, October 4, 2011

Review Dell Streak 5

Hi gadget mania.....aku mo share  niy tentang pengalamanku memakai Dell Streak 5. Dell Streak 5 emang udah diklaim sebagai produk gagal, namun aku justru penasaran kenapa sih dikatakan produk gagal, so sekitar 2 minggu yang lalu aku coba beli Dell Streak 5, dan saat itu emang harganya lagi turun banget. Denger-denger sih produk Dell yang satu ini dikatakan produk gagal karena ukurannya yang nanggung banget, yaitu 5 inch. Ada yang bilang kalo ukuran Dell Streak terjebak di antara smartphone dan Tablet. Aku juga bingung kok dikatakan terjebak, kenapa gak dikatakan telah mengisi segmen pasar gadget baru yaitu segment pasar untuk ukuran layar 5inch. Berikut pendapat aku mengenai Dell Streak 5

Battery  Life

Battery Dell Streak 5 lumayan bagus, untuk pemakain normal (browsing, SMS, melakukan panggilan telp) bisa tahan seharian


Sejauh ini saya gak suka dengan camera 5 MP yang ada di Dell Streak 5

Custom ROM

Wah ini yang seharusnya temen2 semua pertimbangkan kalo mau beli gadget baru, khususnya gadget Android. Aku bener2 kecewa dengan sedikitnya custom ROM untuk Dell Streak 5 ini.

Processor and Memroy

Emmmm menurutku gak jelek2 amatlah spesifikasi untuk processor dan RAM, RAM 512MB dan processor 1GHz

Wednesday, March 2, 2011

My Mac feel better with 4GB memory than 8GB

About two months ago I have been decided to upgrade my MacBook Pro memory from 4GB to 8GB. This is the second MacBook Pro ever I have or the seventh notebook for me. In the first day of using MacBook with new memory installed inside, I think my MacBook will work better than before, but I don't feel it till now. The unfortunately, contrary condition has been appeared :(

I have been replaced new memory with the old (original) memory now.

Friday, February 25, 2011

Create web site launcher in Android

In this tutorial we will try to create a simple application to launch specific web address. Like a shortcut, this application will call another android application and launch it, in this case will launch default browser and open specific web address.

We will use the power of Android Intent. Here is example of the code:


import android.content.Intent;
import android.os.Bundle;

public class SiteLauncher extends Activity {

Intent intent;
public SiteLauncher(){
String webAddress="";
intent=new Intent(Intent.ACTION_VIEW);
/** Called when the activity is first created. */


public void onCreate(Bundle savedInstanceState) {




Thursday, February 24, 2011

POST data to server from Android

Today most of application need to communicate with server, in this case client-server architecture is needed. For example facebook client application for Android and iPhone. Both of these application exactly using client-server architecture. There are many protocols for client-server architecture. The most famous protocol is HTTP, in this protocol we can send data using two methods, with POST method or GET method.

In this article we will explore about POST method in android application.

  1. First we must declare these objects

  2. HttpClient client=new DefaultHttpClient();
    HttpPost httpPost=new HttpPost(LOGIN_ADDRESS);
    //LOGIN_ADDRESS is URL string address of login in server, e.g:

  3. Collect data which will be sent in ArrayList

  4. List pairs=new  ArrayList();
    String strUsername=username.getText().toString();
    String strPassword=password.getText().toString();
    pairs.add(new BasicNameValuePair("username", strUsername));
    pairs.add(new BasicNameValuePair("password", strPassword));

  5. Call setEntity method from HttpPost object/instance
    httpPost.setEntity(new UrlEncodedFormEntity(pairs));

  6. Call execute method from HttpPost object/instance
    HttpResponse response= client.execute(httpPost);