Friday, March 25, 2011

Cygwin task - My office GTD

I extensively use Cygwin on Widows at home and at work. No no, I am not talking about Windex vs Cygwin. I am talking about the OS Windows :|
To some extent it has become indispensible to me. A nifty new tool that I installed on cygwin a few yrs ago has now become my primary GTD app @Work. I can manage all my office work using this tool. It's a very basic tool but it comes in handy.

You can find all the necessary help here

Wednesday, March 23, 2011

CPU Coolers and Thermal paste

When I first built my PC back in Dec 2009, the i7 920 CPU temp were 36/52 F running @ 2.67Ghz stock, and I was patting myself on the back for choosing a superb cooler. Then last week I thought since the system is running so well, for more than a year now, I needed to try something new.

I tried over clocking it and was successfully able to over clock it to 3.8 Ghz with temps like 55/75 F. Not too shabby on a air cooler! But I never really needed to over clock. Windows 7 Performance index crawled up by .2 from 7.4 to 7.6 out of 7.8; and yes I know I could have used some proper tool like 3D Mark scores, but never mind.

After returning to stock speeds, I realized that the temp was not 36/52 F, as I had or in that ball park, but now it was 42/65 F. I was not too pleased and I wanted to have the idle temps below 40F.

For almost a week, I have been taking off and re-mouting my Noctua NH-U12P SE2 120mm SSO CPU Cooler on my i7 920 CPU. I tried various combinations and techniques of changing the thermal paste and the amount and yet nothing gave in. I cleaned the surfaces with Artic remover and cleaner and used the noctua thermal compound and also bought the artic silver 5. Finally I settled with the artic silver 5 since the noctua compound seemed to have dried out. I used a credit card and a few drops to apply all over the surfaces and just enough to have a thin coat.

I have tried at least 10 iterations to get the CPU temperatures down and finally decided that I don't care anymore. I have concluded that, after a few years the CPU temps will never return to the youthful age again :(

Apparently, I am not the only one facing this problem of how much is too much, when it comes to thermal paste.
http://www.reghardware.com/2011/03/21/apple_macbook_pro_2011_freezes/

Tuesday, March 22, 2011

Ubuntu 10.10 Linux - Using wired for LAN and wireless for internet SIMULTANEOUSLY!

From my post @ http://ubuntuforums.org/showthread.php?p=10590567#post10590567

Amazing, finally its all working!!

Setup: Ubuntu 10.10 connects to the internet using wireless (wlan0) and it also connects to my iMac running Snow Leopard 10.6.6 over the lan (eth0). I have also configured netatalk and avahi so my Linux machine shows up in iMac thru zero conf/Bonjour (No manual connection required. Excellent writeup here)
The suggestions from the post pointed me in the right direction, but it did not work for me. I had to add some of my own tweaks before my networking adventure got on the road!
Steps:
1. I am using Network Manager. I removed Wicd Network Manager since I was looking for this option "Use this connection only for resources on this network"
2. As per quote 2, add a wired connection manually (iMac LAN). Setup is: fig. iMac LAN

Then configure a static IP as shown in fig. LAN.

3. For this LAN connection, using NM add the route details and check "Use this connection only for resources on this network" option after clicking "Routes".

4. I left wireless as is, but here it is in fig. wlan0

The config is now as shown in fig. wireless


5. Additionally, I configured the Network settings on the iMac. Go to System Preferences>Networking>Select 'Ethernet' on the left and for 'Configure IPv4' as Using DHCP with manual address. I used 169.254.26.55/255.255.0.0. This works with the LAN settings!

And now I am streaming movies from my RAID 5 on my Linux to the iMac over this LAN and using the internet on the Linux machine as well. Note: Somehow iMac chose this LAN interface over the wireless one! My avahi configuration does not have any interface info. BTW I need to be able to use the Linux RAID for my laptop over the wireless. Talk about a simple setup .

I am sure a nifty /etc/network/interfaces file config can do the same. But for now this is the Eureka moment !


Quote:
Originally Posted by gpgp
I want to connect to 2 physical networks. I am using my wired to go to lan used for machine control. And using my wireless to connect to the lan attached to the internet.

It seems i cannot use both at the same time in Karmic. If i open a web page via wireless then plug in to the machine control lan with my wired connection, i can no longer get web pages via wireless. The settings for wired are over riding the wireless and it doesn't try the wireless connection.
Can anyone help with this ?
Thanks
gpgp

I found it. there is a box to check : use this connection only for resources on this network. System> Prefernces> Network Connections> Select conection, edit> ip4 tab> routes button> check box.
Thanks, hope this helps someone else.

Quote:
Originally Posted by houstonbofh

If I am reading this right, you want to browse the Internet on wlan, while also connecting to a single network on lan. This is easy.

1) Right click on your network manager icon, and select 'Edit Connections.'
2) Under 'Wired' click '+ Add'
3) Name it something, uncheck 'connect automatically' select the 'IPV4' tab, and give yourself static IP, but do not fill in the gateway.

By not putting a gateway in, your lan interfaces has no default gateway, so the wlan one can be used. Otherwise the lan gateway takes precedence.

Thursday, March 17, 2011

Zen Coding Plugins for Notepad++, TextMate, Coda

In the endless pursuit of plugins and softwares I stumbled upon this amazing plugin - Zen Coding. The best part is, it is available for quite a varitety of editors. I use Notepad++ on Windows and TextMate/Coda on Mac, also Eclipse and Komodo IDE on all platforms, and this plugin helps me with generating some basic template code using a very succinct syntax. 


e.g.,html>(head>title+style+script)+(body>table#mytable>(tr#r$>td*2)*3)

<html>
<head>
<title></title>
<style type="text/css"></style>
<script type="text/javascript"></script>
</head>
<body>
<table id="mytable">
<tr id="r1">
<td></td>
<td></td>
</tr>
<tr id="r1">
<td></td>
<td></td>
</tr>
<tr id="r1">
<td></td>
<td></td>
</tr>
</table>
</body>
</html>


BTW .. In Notepad++ use TextFX>Convert>Encode HTML .. to encode all the html, so that it can be published on the blog.

Wednesday, January 19, 2011

cygwin gcc undefined reference to `_WinMain@16'

I tried to write a simple HelloWorld.c program using cygwin gcc on a Windows XP machine and got this error: undefined reference to `_WinMain@16'

I am not trying to write any Windows GUI app and this error was surprising for a simple c program. Turns out I need to add a default method as mentioned here. I will try to find a better solution than this, but for now this will do ;)

So here is the final code now.

#include <stdio.h>

static int main();

int __declspec(nothrow) __stdcall WinMain(int a, int b, char* c, int d){

  main();

  return 0;

}

static int main(){

  printf("Hello C Again\n");

  return 0;

}

 

Thursday, November 11, 2010

IBM RAD/RSA 7 installation on Ubuntu 10.04 Linux

IBM Rational Application Developer 7 or Rational Software Architect 7.0 installation on Linux can be annoying at times. Here are the steps I followed to get this working and this time around it felt quite simple.
1. IBM Installation Manager 1.4.1: It will be best to get the latest version of the installation manager, so download and install it first. Choose the agent.installer.linux.gtk.x86_1.4.1.
2. Download and install the libstdc++5 lib from Debian site. I had saved libstdc++5_3.3.6-18_amd64.deb locally and used this one. I am not sure but it seems I needed the 64 bit version.
3. Replace the default shell sh from dash to bash; as described here. The command to use is 'sudo dpkg-reconfigure dash' and select 'no'.
This did it for me!

Update Jun 23, 12: I am now running Ubuntu 12.04 64bit version, trying to install the 1.5.2 version of the IM. However, I kept on getting this bash error - bash ./install: No such file or directory
The issue was not having 32bit lib files described here. So install 32 bit library files using
sudo apt-get install ia32-libs

It all works now!

Disclaimer: Again this is the assimilation of all the wisdom that is available over the net, with some of own tweaks

Monday, November 1, 2010

Apple Mac OS X Screen Sharing

Apple Mac OS X Leopard and Snow Leopard comes with an amazing VNC server/client called "Screen Sharing". Once it's enabled from the System Preferences > Sharing > Screen Sharing, Mac OS X magically (Bonjour/Zero Config) looks up any Mac computers on the same network and brings them up on the Finder side bar. Clicking "Share Screen" & after entering the user login/password, brings up the remote desktop view of the other machine.

Screen sharing is nothing new and it has been around for as long as Mac OS X Leopard has been, and Linux guys would immediately quib about VNC being around much longer. However, this isn't about VNC client/server.

This blog is about a eureka moment when I was using my old powerless 2005 Apple PowerBook and working on my 2007 24" Aluminum iMac. I have been using my PowerBook as a very fancy remote for the iMac, but I could never practically use this VNC feature. My iMac is setup on my desk, and the PowerBook is lying around the bed. The reason for this is my 24" iMac native resolution being 1920x1200 and the PowerBook being 1280x854. My PowerBook runs Leopard and the iMac runs the new Snow Leopard (BTW an amazing upgrade).

Due to the huge difference in the PowerBook and iMac resolutions, I could barely read or for heavens type anything on the iMac using the Screen Sharing from my PowerBook. So the silly eureka moment was to just bring down the iMac resolution as close as to the PowerBook's native resolution.

Well there you have it now! I was able to write this entire blog over this Screen Sharing from my PowerBook onto the iMac. Well this may not be so thrilling, but the real advantage of this setup is to run heavy duty applications like eclipse/mysql db server and other development tools over the iMac and then use the PowerBook, which is at a crawling speed even running Safari 5.0 browsing the net, as a very cool laptop chugging at all the J2EE development I can remotely do. Exciting and Sad :|

P.S: Last week, I spent some time googling for ssh -X and the X11 forwarding on a mac, and it all worked. This is a nice tool, if the only applications we need to use are X11 based; which is not the case. Something of an alternative to the VNC and screen sharing where X11 forwarding runs the application on the remote machine, but brings the screen to the local m/c and uses the local keyboard and mouse to interact with this app. It was exciting to get this to work, but this excitement quickly disappeared when I realized X11 forwarding will only work for X11 based apps. One cannot be excited about xeyes for too long!