0

Getting rid of ^M ..

Posted by sanjay on 3:27 PM
Tip #26 - Getting rid of ^M - mixing dos and unix : vim online

This thing keeps bugging me from time to time. It seems to reappear just after I have not used it long enough that I've forgotten how to do it.. That's why I'm linking to it. Smart, hmm? ^M

technorati tags:


0

Gmodeler -- UML modelling online... print them too!

Posted by sanjay on 12:18 AM

Check it out here. I'll post reviews once I have better feeling for it


Other UML tools are JUDE, Fujuba,

StarUML While not UML tool, I like Mindmap

Any other suggestions for UML tools?


0

G-loaded

Posted by sanjay on 4:38 PM
Latex for beginners check this out
Also http://www.g-loaded.eu/
and http://linuxhelp.blogspot.com

0

Software Design Template

Posted by sanjay on 4:09 PM in
Brad Appleton (did i get his name right?) has a good template on getting a template for Software designs. check it out
http://www.cmcrossroads.com/bradapp/docs/sdd.html

0

Comparing and merging files ..

Posted by sanjay on 5:47 PM in , , ,
Just came across what seems to be a good tutorial on diff and patch
http://www.network-theory.co.uk/docs/diff/

0

Fun things to do with ssh

Posted by sanjay on 8:50 AM in ,
may not be everyone's definition of fun, but here's a good article about the fun you can have with ssh on ubuntu
And then the link to mindterm

0

privsep: unable to drop privileges

Posted by sanjay on 11:56 PM in ,
chmod 4111 /opt/cisco-vpnclient/bin/cvpnd

0

How to check if server is up and responding

Posted by sanjay on 3:33 PM in
// todo launch server
Thread executeThread = new Thread(this);
executeThread.setPriority(Thread.NORM_PRIORITY);
executeThread.start();
int port = 8080

String host = "localhost";
int sleepCount = 0;
boolean doLoop = true;
while (doLoop) {
try {
logEvent(this,Log.DBG,"..Creating Socket ");
Socket sock = new Socket (host,port);
logEvent(this,Log.DBG,"..Connected to Server");
// test code ...
PrintWriter out = new PrintWriter (sock.getOutputStream(),true);
BufferedReader in = new BufferedReader(new InputStreamReader(sock.getInputStream()));
out.println("GET /index.jsp HTTP/1.1");
out.println("Host: " + host + ":" + port);
out.println("Connection: Close");
out.println();
while (doLoop){
if (in.ready()){
sock.close();
doLoop = false;
break;
} else {
try {
Thread.currentThread().sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

} catch (IOException e) {
logEvent(this,Log.WARNING,"..Unable to connect");
if (sleepCount==120) {
logEvent(this,Log.WARNING,".. proceeding without connection to " + host + " at " + port);
break;
}
logEvent(this,Log.DBG,"..About to sleep for 5 seconds");
try {
Thread.sleep(5000);
}catch (InterruptedException ie) {
logEvent(this,Log.WARNING,"..InterruptedException on main thread:" + ie);
}
logEvent(this,Log.DBG,"..Waking up after 5 seconds");
sleepCount++;
}

}
try {
// sleep 90 seconds for the server to finish startup
Thread.sleep(1000);
} catch (InterruptedException e ) {
logEvent(this,Log.DBG,e.toString());
}
logEvent(this,Log.DBG,"..server is up");
return true;
}

public void run() {
String startupScript = hubDeployer.getStartupScript();
String[] args = null;
String logFolder = logFolder
try {

ps = new ProcessExec(SHELL_COMMAND, args, outputFile, outputFile);
ps.executeProcess();

} catch (Exception e) {
logEvent(this, Log.ERROR, "Failed to execute " + installScript);
logEvent(this, Log.ERROR, e);
}
}


}

0

Hard disk power management explained ..

Posted by sanjay on 2:23 AM in
here

spinning down usb hard disk for nslu2 --> here

0

ProFont? or which font

Posted by sanjay on 7:02 PM in
Like ProFont? I do. Do you like it so much that you'd like to use it for your cmd prompt? Well... if you use windows, that is :)

I also came across this list.. where you can choose your font!!

0

Need help with Ubuntu?

Posted by sanjay on 10:00 AM in
Well, you can contact me! or just refer to the Ubuntu Guide wiki. It seems pretty comprehensive

0

An introduction to patterns

Posted by sanjay on 1:14 AM in
I just came across Brad Appleton's Introduction to Patterns. Don't know how i missed it earlier, but I'm glad I came across it. It provides a nice brief intro

0

GVIM Tips

Posted by sanjay on 7:43 PM in
I just came across David Rayner's gvim tip page. It seems comprehensive. I just discovered :e .

Good!!

Also check the Vi Lovers Home Page. Yeah, true love, for some :)

And then there is Vim-shell. Check this page for details.. maybe you'll be all set. I haven't tried this yet

Use svk? then try svk.vim

0

InSinkErator -- Disposer Doctor

Posted by sanjay on 10:00 PM in
Homeowners -- ever have your InSinkErator get into trouble. Well, before you call your Joe's Home service, you might give the doctor a click. That's right! I was surprised to find that InSinkErator has a website with a pretty good FAQ and troubleshooting guide to quickly repair your insinkerator. They say that most repairs are so simple, you can do it at home... Well, if only every other appliance we had was so "well documented"!

0

Mirror SVK to SVN

Posted by sanjay on 3:35 PM in

How to mirror a SVK repository onto an SVN repository

tells you how to mirror a local SVK repository onto an SVN repository. Exactly what I need


 svk mkdir //mirror
$ svk ls http://svn.scottstuff.net/public/

$ svk sync --all
$ svk mkdir //mirror/public/typo
$ svk smerge --baseless //typo/ //mirror/public/typo -m 'Initial publication'



0

Autoblog

Posted by sanjay on 10:36 PM in
Autoblog

Serious about autos. Take a look at Autoblog!!

technorati tags:,


0

Distributed Version Control with svk

Posted by sanjay on 10:37 PM in
Pretty cool linkI've used svk before, but did not know this history. Well, what can you say? I like to know where we came from as much as where we're going :)

Also worth noting (for no real reason) that Polarion makes a clearcase to svn tool. worth checking out! (pun unintended)

0

GLS^3

Posted by sanjay on 7:40 AM in
GLScube.org Came across this link from a discussion about exciting software in Linux on /. This looks excting enough. I'll make you click the link to take a peek. Take a look at the Flash Demos, too. Would not take more than a few minutes

technorati tags:


0

Tax Guides for Investors

Posted by sanjay on 11:38 PM in

Reference Room contains a very useful reference to tax tables for this and previous years!


0

What would you like to do in Excel today?

Posted by sanjay on 11:12 PM

Confessions of an Excel Junkie 

 has articles and quite importantly examples of a bunch of stuff you can do in Excel.. Enjoy

technorati tags:,


0

Mortgage Shopping Worksheet

Posted by sanjay on 12:02 PM
Federal Trade Commission

This helps compare different mortgages

technorati tags:


0

D3 vs. MonkeyGTD

Posted by sanjay on 11:31 AM
http://www.geocities.com/gtdwannabe/essays/d3vsmonkeywiki.htm

This page compares D3 and Monkey for GTD. Still to check into the differences. I've just started using MonkeyGTD and like it quite a lot

technorati tags:


0

Sun product documentation

Posted by sanjay on 11:13 AM
docs.sun.com: Browse Product Documentation

Link to Sun product documentation. Very useful if you use Sun products


0

Swing Tutorial for AWT programmers

Posted by sanjay on 3:30 PM
http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/

technorati tags:,


0

Benefit Access

Posted by sanjay on 5:23 PM
1-888-873-1194

0

Benefit Access

Posted by sanjay on 5:23 PM
1-888-873-1194

0

Subversion properties

Posted by sanjay on 7:55 AM

Always forget about svn propset. It's quite useful!

svn propset svn:mime-type text/html element name


technorati tags:


0

Notable Calls

Posted by sanjay on 10:36 PM
Just came across this website ... actually blog on Notable Calls
Thought it might be worth noting.

technorati tags:


0

Vim for Perl Developers

Posted by sanjay on 11:07 AM

Blog of Leonid Mamchenkov » Vim for Perl developers

Ok .. I'm not technically a perl developer. But then technically, I'm neither a developer not  a sofware engineer.. Let's leave that part out for now. Leonid has some pretty good VIM tips on this page.

I didn't notice it on this page, but one tip from me is to use gf to open the file under which the cursor is present. Makes sense? No? Try it ... and it will :)


technorati tags:


0

Opening parent folder with vim

Posted by sanjay on 9:07 AM

How do you open the directory listing for the folder which contains the current file?

Simple :vi %:p:h

But I keep forgetting it .. that's why it's here!

technorati tags:


0

Getting started with ksh

Posted by sanjay on 11:06 AM
LUG@GT :: Articles :: Using the Korn Shell

I am a regular bash (3.0) user. But sometimes, I come across systems where bash is not installed and the only "modern" shell that I have access to is ksh. Initially, I tried to get along with just the basics, doing everything manually, but now I am at a point where I need to learn a few more ksh tricks. I found the article at this URL good to jumpstart my ksh experience.

technorati tags:,


0

Ghost busting with dtrace.

Posted by sanjay on 10:48 AM

 Ghost Busting

While looking up some information about debugging on Solaris 10, I came across this presentation by  Christoper Beal, on using dtrace. I'll call it an introduction to dtrace. I don't need it right now, but seems like it will be really useful. I'm going to get my hands dirty with this, as soon as I can.


technorati tags:, ,


0

Mumbai Navigator

Posted by sanjay on 10:43 AM

Mumbai Navigator

Getting around Mumbai should no longer be a pain!...

technorati tags:


0

Inline Skating

Posted by sanjay on 12:50 AM
How to Stop on Inline Skates - Inline Skate Stopping Tutorials

 I've just started learning inline skating and like most beginners am worried about how to stop. This URL seems to have some decent info on the subject... Now, two more things left to do..Study these techniques and PRACTICE them!!

technorati tags:,


0

Flock...

Posted by sanjay on 9:25 PM

Just when I discovered Performancing, I saw a post on Slashdot about Flock. Is it a coincidence? Probably, but I'm going to try using both and see which one I prefer... Well, an idea just struck me  " Use Performancing with Flock"


That way I can try both without having to switch back and forth!.. Brilliant!! You might see me posting some more :)


technorati tags:


0

Intalling fonts on Linux .. quick and dirty way

Posted by sanjay on 1:25 AM
Quick and dirty steps to install fonts.. I keep forgetting the Yo Linux link. So I thought I'd put the steps down here and then link to the main page, so tthat I can do this quickly or correctly or both:)





  • create a ~/.fonts directory


  • copy your fonts into this directory


  • fc-list | grep font name to verify fonts are available


  • /usr/bin/font-cache to update the cache


  • chmod 644 *.ttf


  • ttmkfdir > fonts.scale

  • Create index of X font files in directory: /usr/X11R6/bin/mkfontdir
    (Red Hat 7.0: package freetype, 7.3+: package xorg-x11-font-utils)

  • Add font directory to the xfs config file: /etc/X11/fs/config

    catalogue = comma-separated-list-of-font-directories

  • Update font-config cache: /usr/bin/fc-cache


  • /usr/sbin/chkfontpath --add /font-directory-path


  • xset fp rehash


  • service xfs restart
    (or: /etc/init.d/xfs restart)

  • Restart X:


    • init 3


    • init 5


Refer to YoLinux for all details

0

Performancing for Firefox

Posted by sanjay on 11:55 PM
Just visited Performancing website. They have a pretty cool blogging tool for Firefox. You can just hit F8 and start blogging... Looks like something I should try. Would definitely make me blog more!

Any thoughts?

0

Ubuntu build environment for custom packages

Posted by sanjay on 12:37 PM
While compiling/installing custom packages, you need a dev enviornment. The easiest way to do this with Ubuntu is


sudo apt-get install linux-headers-`uname-r`
sudo apt-get install build-essential
sudo apt-get install shareutils

gets you the development package so that you are ready to go

If you really want the source

sudo apt-get install linux-source-2.6.x

will get you the source

3

LVM mount with Ubuntu upgrade

Posted by sanjay on 11:30 PM

Yesterday, I updated .. Ok, attempted to update my Ubuntu 5 system to Ubuntu 6. Everything seemed to go alright, until I had to reboot. Suddenly my system was hosed...Well, I could surely go to the backup copy I had, right? Nopes.. was taking a risk after reading about the smoothness of the Ubuntu dist-upgrade procedure.. Ouch.. that skipped back-up does hurt.

Anyway, today, I booted with the Live Ubuntu 6.06 disc and tried hard to get to my data on my logical volume. I remembered my disk looked like this before the upgrade

/boot 250 MB ext3 /dev/sda1
/ 65 GB reiserfs /dev/sda5 (LVM)

Yes, I now know that it is a BAD idea, but you learn by mistakes. Anyway, just that knowledge was useful. After a lot of reading up on lvm*, pv*, etc.. I am able to access my data with the following commands

sudo pvscan
PV /dev/sda5 VG Ubuntu lvm2 [x.y GB/0 free]

# load device module
modprobe dm-mod

#change logical volumes to active
sudo vgchange -a y

#create mount point
sudo mkdir /mnt/newroot

#list devices for VG ubuntu
sudo ls /dev/Ubuntu
root swap_1

# I want to mount root -- that's where my data is
# remember that it is reiserfs
# I just realized that I also had a swap partition under my logical volume!
sudo mount -t reiserfs /dev/Ubuntu/root /mnt/newroot/

cd /mnt/newroot
cd my_data_dir
ls -al

Wow!! everything is here .. back it up ... fast!! :)





0

Super cool VIM Cheatsheet

Posted by sanjay on 1:04 AM
Vim, actually, gvim.. now that's my editor of choice, lately. I have used emacs before and for some tasks, like editing I18N files I have used EmEditor and Yudit, but for most of my daily work, I have been using vim.This link provides a cheatsheet for some of the vi commands. I find that browsing these cheat sheets every now and then helps, because I cannot possibly train my fingers to use everything the editor has to offer all at once. Every now and then, I think "Hmm.. there's got to be a better way to do this" and either google it (or more recently a9 it) and review some cheatsheets and tutorials to get a better grip on it all. So, do you have any cool vim tips? Or links to cool tutorials?

0

ResourceBundles in java. some useful statements

Posted by sanjay on 1:20 PM


Locale userLocale = Locale.getDefault();


Sets default locale.



private static String getFormatString(String formatStr, Object[] args) {
if (args != null) {
// MessageFormat is brain dead in the fact that it won't
// convert unknown or unhandled object types into Strings.
// So we have to do it...
for (int i=0, count=args.length; i Object obj = args[i];

// don't bother with bogus or handled types...
if (obj == null || obj instanceof String ||
obj instanceof Number || obj instanceof Date)
continue;

// convert anything unknown
args[i] = obj.toString();
}

formatStr = MessageFormat.format(formatStr, args);
}

return formatStr;
}


Returns formatted string from given string and argument list


public static String getFormatString(String rscBundleName, String msgKey, Object[] args) {
String formatStr = getString(rscBundleName, msgKey);

return getFormatString(formatStr, args);
}



getsFormatted string


public static String getFormatString(String rscBundleName, String msgKey, Object arg) {

if (arg == null) {
arg = "NULL";
}
Object[] args = {arg};
return getFormatString(rscBundleName, msgKey, args);
}


Gets formatted string with one argument


public static String getString(String rscBundleName, String msgKey) {
ResourceBundle resourceBundle = (ResourceBundle)rscBundlesTable.get(rscBundleName);

if (resourceBundle == null) {
Locale locale = getLocale();

if (locale == null) {
resourceBundle = ResourceBundle.getBundle(rscBundleName);
} else {
resourceBundle = ResourceBundle.getBundle(rscBundleName, locale);
}

// Cache resource bundle
rscBundlesTable.put(rscBundleName, resourceBundle);
}
String str;
try {
str = resourceBundle.getString(msgKey);
} catch (MissingResourceException mRE) {
str = null;
}
return (str == null) ? msgKey : str;
}


Gets string with no arguments

0

Use chatr to change program's internal attributes on HPUX

Posted by sanjay on 9:08 AM

man chatr
gives the following

chatr(1)

NAME
         chatr - change program's internal attributes
....


We needed to use chatr to enable libcrypto.sl to be loaded dynamically from SH_LIBPATH instead of statically from a location on HPUX32 bit system. This definitely poses a security risk... but it is convinient

This issue is related to the lib file is not taken from SHLIB_PATH, so we need to run the following command first, then it will work fine.
chatr +s enable / libcrypto.sl /ldapdelete
This will enable libcrypto.sl to be dynamically linked and picked up from SHLIB_PATH for ldapdelete. This will need to be done for all the binaries under the folder.


Once source binaries are modified with this attribute, they can be copied to another machine and they will still allow loading the libraries dynamically. Perhaps a

chatr +s disable /libcrypto.sl /ldapdelete

would disable dynamic loading. Need to experiment

0

DSL off your flash drive?

Posted by sanjay on 12:46 AM

Ok .. by DSL I'm referring to Damn Small Linux. I was looking at this article about installing DSL on USB flashdrives with GRUB.. One project, I'd love to try!

0

SAP JCO shared libraries

Posted by sanjay on 12:01 PM
Shared libraries are good to use. They make your code base smaller, but they do create some issues while deploying. Recently while deploying a Java provider for SAP JCO, I came across an issue where the dynamic library path was different for each platform. Why is it so? I do not know.. But here it is











OSDynamic Library Environment Variable
Windows NT, 2000, 2003PATH
LinuxLD_LIBRARY_PATH
Sun SolarisLD_LIBRARY_PATH
IBM AIX/td> LIBPATH
HP-UXSHLIB_PATH
HP Tru64LD_LIBRARY_PATH
Apple Mac OS X, Version 10.3.1DYLD_LIBRARY_PATH
IBM OS/400ADDENVVAR ENVVAR(LIBPATH) VALUE ('(sapjco-install-path)')
IBM z/OSLIBPATH


Ok two interesting points here. I was surprised to find that SAP JCO supports Mac OS X. Perhaps Mac OS X is big, but I really did not know that it would be used to run business software. I always thought of Macs as personal computers!.I am learning
The second interesting point I noticed is that on HP-UX the enviornment variable is SHLIB_PATH where as it is LD_LIBRARY_PATH on HP Tru64. Aren't they both sold by the same vendor? How come the names of the shared libraries are so different?

I know not.

0

Yahoo! Developer network

Posted by sanjay on 11:30 PM
Just came across this for Yahoo DN! Looks like a good start for creating custom Yahoo! applications. I also read recently that Yahoo! is getting more open with the YDN (that's what I'm calling it, don't know if they do) and publishing APIs to various applications (a la Google). This should be good opportunity for developers to look into learning more about web services and publish Patterns, as the link above does!

Wonder when they will release the Calendar API!

1

Real Estate Public Records

Posted by sanjay on 5:22 PM
Santa Clara County Assesor

Also interesting is the SCC FAQ

It says




Annual tax bills are mailed once a year no later than November 1, and can be paid in two installments. Every effort is made to get a copy of the tax bill to each new property owner. To avoid penalties, you should check the status of your property taxes and/or request a duplicate bill by calling our office. Our Interactive Voice Response System allows you to obtain information from the computer 24 hours a day, 7 days a week. (Don't wait until it's too late and you are required to pay penalties.) If you did not receive a bill, or if you recently purchased a property, you may obtain a duplicate tax bill by calling (408) 808-7900 or visiting our office.








2

Digital photographs

Posted by sanjay on 11:23 PM
Short Courses on digital photographs..

I looked at Book 3, Chapter 5 Understanding lenses -- it has some explanations of lenses and more importantly, it has sample photographs!

0

http://www.tldp.org/LDP/abs/html/

Posted by sanjay on 4:02 PM


#!/usr/bin/bash
RELEASE=${1}
RELEASE=${RELEASE:?No release specified. Please choose from available releases : `ls resources`}
source resources/${RELEASE}/env.sh
#VOB_HOME=/lhome/sravat/piglet/ccase/vobs/CommonTech/cis
VOB_PATH=$VOB_HOME/test/configToolTest/scripts/build
JAVA_HOME=/usr/local/j2sdk1.4.2_04
ANT_HOME=/lhome/sravat/tools/Ant/1.6.3beta1
WORKDIR=/lhome/sravat/workspace/CIS/scripts
HYPERION_HOME=/mnt/sravat3/Hyperion
PATH=$ANT_HOME/bin:$JAVA_HOME/bin:$PATH
ISMP_HOME=/lhome/sravat/local/ISMP/5.03
PROPERTIES_FILE=sravat.cis.build.properties
BUILD_LOG=build.log
export VOB_HOME VOB_PATH JAVA_HOME ANT_HOME WORKDIR HYPERION_HOME PATH ISMP_HOME PROPERTIES_FILE BUILD_LOG

TARGET=$2
TARGET=${TARGET:=makeConfigTest}
export TARGET

cp $WORKDIR/resources/${RELEASE}/${PROPERTIES_FILE} $WORKDIR/${PROPERTIES_FILE}
cp $WORKDIR/resources/${RELEASE}/ismp.cp ${ISMP_HOME}/ismp.cp
cp $WORKDIR/resources/${RELEASE}/alias.properties ${ISMP_HOME}/alias.properties
rm ${ISMP_HOME}/*.release
touch ${ISMP_HOME}/is.${RELEASE}.release

pushd $VOB_PATH
xterm -geometry 255x6+25+0 -e tail -f $WORKDIR/${BUILD_LOG} &
LOGTASK=$!
$ANT_HOME/bin/ant --noconfig -Dcis.build.properties=$WORKDIR/${PROPERTIES_FILE} -buildfile configToolTest.xml -logfile $WORKDIR/${BUILD_LOG} $TARGET
sleep 10
kill $LOGTASK
popd

echo "Done"


Copyright © 2009 Note my web All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.