Wednesday, July 04, 2012

Get IP address of the machine in Arch Linux

How to get IP address in Arch Linux? Well, it turns out to be easy:
#: ip addr

You should see something like:


1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1f:c6:d5:32:4d brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.105/24 brd 192.168.0.255 scope global eth0
    inet6 fe80::21f:c6ff:fed5:324d/64 scope link
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:15:af:92:3e:8a brd ff:ff:ff:ff:ff:ff

!Enjoy ts

Saturday, June 02, 2012

Cisco VPN client failed to connect on Windows 8

I tried to connect to a remote location using Cisco AnyConnect VPN Client (v 2.2.0140) using Windows 8 Release Preview but failed with error message "The VPN client driver has encountered an error."

Does this indicates that the client application is not compatible with Windows 8, at least for now? There is a workaround though. Following are the steps to make it to work.
  1. Open Registry Editor (like type regedit.exe).
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpnva
  3. Locate key DisplayName, like mine shows @oem3.inf,%vpnva_Desc%;Cisco AnyConnect VPN Virtual Miniport Adapter for Windows
  4. Change it to Cisco AnyConnect VPN Virtual Miniport Adapter for Windows
  5. Close then open Cisco AnyConnect VPN Client. Retry to connect. It should work from here on.
~ts

Wednesday, May 30, 2012

ERROR: database disk image is malformed in Fedora 17

Got a spanking brand new Fedora 17 install, it looks a lot different from Fedora 16 on the surface which is a welcome change, quite refreshing actually. Tried to do a software update but instead got the following error message:
ERROR: database disk image is malformed
 Seems like my rpm database got corrupted for some reason but this is a new install on VirtualBox. Anyway, got it fixed by doing the following:

$ sudo yum clean dbcache 

~ts

CPP Quick Guide

Basics Hello world User input While loop If statement For loop Switch statement Read file using ifstream Write to a file using ofstr...