Saturday, December 7, 2013

Became Triple CCIE this month

Got my Routing and Switching CCIE in 2002, and SecurityCCIE in 2004. Added one more to the list. Datacenter CCIE this week.

I have no plans for taking another CCIE exam.  Its fun, but I think passing the test 3 times is enough. I'll probably sign up for Emeritus status before it expires.

Friday, November 22, 2013

Remmina Client says "Unable to Connect". Rdesktop Works.

Easy fix for this one

```
rm ~/.freerdp
```

Whenever I experience this failure, it always has to do with the Certificate generated for the connection. Not sure why.

Saturday, November 2, 2013

Chrome Browser Debugging

Couldn’t figure out why ADB Chrome extension was not starting on my Ubuntu 12.04 home laptop. It worked fine on my work Ubuntu 12.04 laptop. After using my fav search friend, Google, I found out how to enable Chrome browser debugging. It starts the Chrome browser without sending it to the background.
```
#chrome-browser --enable-logging

```
It produced the following error message when I attempted to start ADB. Which of cause lead me the solution.

```
# sudo apt-get install libncurses5:i386

```
I promptly added this to my [ansible restore PC playbook](http://github.com/skamithi/restore_pc)

Saturday, September 28, 2013

Good Bye Mythfrontend..Hello Plex!

It has been about 4 years since I last contributed to the MythTv Project. I think its a great project. But recently I've started using Plex. First to watch TED Talks and NPR Internet Channel, but now, with this [simple patch from alewando's github fork of Mythtv](https://github.com/MythTV/mythtv/pull/32) , I can now get Plex to show all my Mythtv Recordings.

So its bye, bye MythFrontend. I love how Plex organizes shows, and now I can view my TV recordings on multiple platforms with ease. My home has both Android and Apple products. 

I've never much liked the UPNP feature in Mythtv, so now that I use Plex, I am happier.




Monday, September 16, 2013

Lenovo S431 - Ubuntu 12.04

My Lenovo S431 has the following specifications:

*Component Description*
---------------------------------

* Processor: Intel Corporation Intel(R) Core(TM) i7-3226 CPU @ 1.9GHz
* Bios: Lenovo HFEET30WW (1.07 )
* Memory: 4GB Output of ``lspci ``

```
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1c.3 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 4 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)
03:00.0 Network controller: Intel Corporation Centrino Wireless-N 2230 (rev c4)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07)

```

Ubuntu 12.04.3 works for most components, out of the box.

I haven't played around with tweaking the mousepad. It just feels weird using it. Definitely need to do more research there.

Battery life is pathetic. Only get 3 hours of battery time on it. Not sure why yet. I hope to improve on this and update this blog post.

 Check out my [ansible playbook for restoring my lenovo ideapad](http://github.com/skamithi/restore_pc)

Tuesday, August 13, 2013

Kenya Government Customs Denys Poor Children an Education

Two and a half weeks ago, I sent a shipment of 13 laptops from the US to Kenya. The laptops are
destined to classrooms with children from Kibera and children from an orphan home in Ngong.

Customs officials to my complete shock and disbelief are demanding taxes worth 200% of the value
all laptops. Total cost of the laptops is $1000.00. They want $2000 in taxes. One of the laptops has already been stolen. (No surprise there)...but still, its hard
to understand why someone can be so souless and heartless.

This is for POOR CHILDREN.. Kids who have lost BOTH parents due to HIV.. Why! I would love an explanation. It truely saddens me that there is
someone at the KRA who has no heart. Don't you have kids of your own? You were once a kid. Would
you steal from a child?

I told the clearing agent , DHL, that I am done. I have no hope anymore in these Kenyan officials.
Seriously, does none of them have a heart, even care about those way less fortunate then them.

So the laptops are gone. Who knows what they are going to do with it.  Maybe give it their cousin
in the rural area. THe laptops basically hold little value in the open market. They don't run windows.
I put Linux with Wikipedia, educational games and 4000 khan academy videos.

I remember coming to america. The first thing that totally overwhelmed me was the knowledge. The
university library just blew me away. I couldn't stop learning. I thought. If I had this growing up
I'd be an Einstein.  I just want some children to who would not get this opportunity ordinarily
to have access to this kind of information. It is just so liberating...

Good luck Kenyan Official. I hope you are happy! Now you can go and try and sell these laptops, which hold little value. See how much money you get.. Not much I tell you.

I am mad, but I written this post, because I want to let go of this anger. Give this up to God.
Let God deal with their selfishness and lack of compassion.

I thought after 20 years of being out of Kenya, things have changed. I saddened to see, nothing
has changed


Thursday, April 15, 2010

Hdhomerun_config scan of cable channels.

In my area, my local cable provider likes, on occassion, to change the frequency and/or program number for a channel.  Recently WRAZ, channel 13 stopped working.

When I ran the command


hdhomerun_config FFFFFFFF scan /tuner1 scan_output.log

it said something like this

SCANNING: 803000000 (us-bcast:69)
LOCK: none (ss=72 snq=0 seq=0)
SCANNING: 797000000 (us-bcast:68)
LOCK: none (ss=96 snq=0 seq=0)

us-bcast, I thought. That's wrong. When I did this last year, it selected us-cable channel map by default. I didn't have to change anything. I searched and searched the web for an answer. Finally I decided to hunt for the Silicondust config guide. I found the hdhomerun development guide. In there you can set the channelmap and change it from us-bcast to us-cable.


hdhomerun_config FFFFFFFF set /tuner1/channelmap us-cable

Now when I ran the "scan" command, I got the new frequency and program number for WRAZ.

I manually scan for channels instead of relying on mythtv's channel scanner cause I map my channels differently then the channel scanner would. I've used this config for years and would hate to jack it up.

Saturday, February 20, 2010

Grub woes with my 2 TB disk

This is my first time using a 2 TB disk. After performing a Ubuntu Karmic Update on it, it upgraded the kernel and it asked "Configure GRUB using the package maintainers version". What made me do this I don't know, but I think this totally messed me up. It seemed like it deleted the bios partition.

When the disk booted, it printed the following on the screen and then just hung


GRUB GRUB GRUB GRUB


The fix for this whole mess, I loaded the Ubuntu bootup USB stick, and recreated the BIOS disk partition. After doing this, I executed /usr/sbin/grub-install /dev/sda, then everything started working.

LVM2 error: Cannot add 16th partition using pvcreate

Got a 2TB disk that has 48 raw partitions that I want to add to LVM.
When creating the partitions, I thought it wouldn't let me do more then 16 partitions. I was delighted to know that I could go beyond this 16 partition limitation. I guess maybe with new disks this is not a problem?? Don't know why.

Go this error message when I was in the process of upgrading my hard disk.


#sudo pvcreate /dev/sdc16
Device /dev/sdc16 not found (or ignored by filtering).


I reran the command with the "-vvv" option. It failed because of the following error message


/dev/sdc16: Skipping: Unrecognised LVM device type 259


After much web searching I found that this type is known as blkext

So I added the following line to lvm.conf

types = ['blkext', 50]


After doing this, I can now add all the remaining 40+ partitions to LVM.

This setup is for my mythtv production box. I use the same PC as a backend and frontend. Its not advisable I think but I have to do it this way. I use a Logical volume to store recordings. I found that my performance is greatly improved if the physical partitions are small. My thought is that this reduces seek time. I saw improvements after doing this when my PC is taping 2 HD shows and I'm watching a HD show at the same time. Maybe my theory may be wrong, but this works for me.

Monday, November 2, 2009

Convert an encoded URL query string into a nested hash in a Rails App

On my work with churchservicefinder.com, I wanted to parse out the following string, and produce a nested hash of the query part, just like rails does.

I search the web and found no answer. So I searched through the rails source code and found the answer in the Rack gem.

The command is Rack::Utils.parse_nested_query

Here is my example:

Loading development environment (Rails 2.3.4)
>> ab = "http://localhost:3000/churches/list/address/27713/5?fr[ed]=0&fr[ed]=1&fr[d]=0&fr[tz]=1&fr[et]=0&fr[et]=1&fr[tw]=0&fr[t_opr]=before&fr[t_opt(4i)]=9&fr[t_opt(5i)]=00&commit=Filter+Results"
=> "http://localhost:3000/churches/list/address/27713/5?fr[ed]=0&fr[ed]=1&fr[d]=0&fr[tz]=1&fr[et]=0&fr[et]=1&fr[tw]=0&fr[t_opr]=before&fr[t_opt(4i)]=9&fr[t_opt(5i)]=00&commit=Filter+Results"
>> c = URI.parse(ab)
=> #
>>
?> d = Rack::Utils.parse_nested_query(c.query)
=> {"commit"=>"Filter Results", "fr"=>{"t_opt(4i)"=>"9", "t_opt(5i)"=>"00", "tw"=>"0", "et"=>"1", "d"=>"0", "tz"=>"1", "t_opr"=>"before", "ed"=>"1"}}
>> d = Rack::Utils.parse_nested_query(c.query).symbolize_keys
=> {:commit=>"Filter Results", :fr=>{"t_opt(4i)"=>"9", "t_opt(5i)"=>"00", "tw"=>"0", "et"=>"1", "d"=>"0", "tz"=>"1", "t_opr"=>"before", "ed"=>"1"}}
>> e = d[:fr].symbolize_keys
=> {:tz=>"1", :d=>"0", :"t_opt(4i)"=>"9", :ed=>"1", :et=>"1", :"t_opt(5i)"=>"00", :tw=>"0", :t_opr=>"before"}

Saturday, October 3, 2009

Upgrading my 1st Gen Jailbroken IPhone to Version 3.1

Last week I followed the usual instructions to update the 1gen phone from 2.x to 3.1. I've listed the steps I followed. Details on each step can be easily found from web searches.

  • Backup the Iphone settings using Itunes. Jot down all the apps downloaded via 3rd party installers like Cydia. You'll have to install these later after the upgrade.
  • Download PwnageTool 3.1 via bittorrent
  • From Itunes download the 3.1 software update
  • Use PwnageTool expert mode to create a custom 3.1 .ipsw file. Keep all the default options, except make sure not to select Ivy app from the Custom Packages section. Failure to do this will mean Cydia Installer will fail to work.
  • Take out the SIM (not sure if this helps)
  • Put the IPhone in DFU Mode using PwnageTool
  • Install the custom 3.1 .ipsw file using Itunes
  • Restore the Iphone settings using Itunes
  • Reinstall apps installed via 3rd party installers like Cydia. My favourites are BossPrefs and OpenSSH.
Surfing the web using EDGE stopped working after this upgrade. Modifying the carrier.plist file on the Iphone reveals the configuration option to edit APN/Username/password information.

Thursday, April 16, 2009

Switching to PostgreSQL

After watching the podcast , I realized that mysql is not a truely free product.
My goal is to always use open source

Wednesday, March 18, 2009

Creating dummy network interfaces in Linux

I'm working on a lab recreate where I have to replay traffic from a sniffer capture.
I need 2 interfaces, one ethernet and one dummy interface. After a few hours searching the web I found my answer on how to setup a dummy interface.


To create the dummy interfaces, make sure the kernel is compiled with the CONFIG_DUMMY option.

In the 2.6.27 kernel this is found in Device Drivers -> Network Drivers section

To create the dummy interface after the dummy module is installed issue:
modprobe dummy
If you need 3 fake interfaces, the command is
modprobe dummy numdummies=3

Now I can assign traffic to go out dummy0 interface..