I am a avid user of tomboy notes on my Ubuntu PC.
It is a very friendly note taking app which is the best of its breed because of the following :
1. Search : It indexes all your notes and allows you to easily search through it
2. Text Formatting : It allows one to highlight a text(with color), use bold fonts and also supports bulleted listing.
3. Notebooks : You can categorize your notes and create a number notebooks for each category e.g. office, home, kids, linux, blogs etc.
For those corporate guys who have to use Microsoft Windows; good news .. It's also available for you guys.
I am addicted to it and I am sure those of you not using it; will soon find it hard to stay without it ;-)
Now the breaking news :
If you guys have caught up with the popularity of Android phones and bought a one for yourself; Tomboy Notes is available for Android also :-)
As of writing this it's still not available in the "Android Market" but you can download it from here : https://launchpad.net/tomdroid/+announcements
Now for those of you wondering .. "how does it help to have the same application on desktop and mobile phones ?" .. because you can sync them up using the "Ubuntu one" cloud. "WOW".
Other thing .. tomdroid is still in beta. So, you can't edit or search your notes for now .. wait on .. things are getting better.
For details on setting up things on your mobile, desktop or syncing it with Ubuntu cloud; please search for it in the Internet. You'll get a lot of tips.
Sunday, December 12, 2010
Saturday, December 11, 2010
Redirect WebPages in Apache WebServer
Recently I had to move my webserver to a different domain (i.e. URL).
Although the old domain was still around for some more time; I still wanted my old users/viewers to be redirected to the new website.
This article in yolinux did the trick
http://www.yolinux.com/TUTORIALS/ApacheRedirect.html
I had to replace my index.php with something like this :
Although the old domain was still around for some more time; I still wanted my old users/viewers to be redirected to the new website.
This article in yolinux did the trick
http://www.yolinux.com/TUTORIALS/ApacheRedirect.html
I had to replace my index.php with something like this :
Saturday, November 13, 2010
disable directory browsing in Apache Web Server
While working on a website I understood that it was a "MUST" security action to disable directory browsing of the files in your website.
Thanks to this post
http://www.felipecruz.com/blog_disable-directory-listing-browsing-apache.php
remove the option "Indexes" from your apache config file and you are good to go.
Please refer the above link for more details.
Thanks to this post
http://www.felipecruz.com/blog_disable-directory-listing-browsing-apache.php
remove the option "Indexes" from your apache config file and you are good to go.
Please refer the above link for more details.
Saturday, October 23, 2010
print to pdf when not connected to printer
Sometimes we come across a situation where we want to print a confirmation e.g. a train/flight ticket; but don't have a printer directly connected.
At those times we can directly print to a pdf; which we can print later.
cups-pdf is the package that does the trick and in Ubuntu it can be installed by "
http://ubuntu-tutorials.com/2008/07/03/printi-directly-to-pdf-in-ubuntu-804/
At those times we can directly print to a pdf; which we can print later.
cups-pdf is the package that does the trick and in Ubuntu it can be installed by "
sudo aptitude install cups-pdf".
For other rpm based distributions use "yum install cups-pdf
".
More details can be found here :http://ubuntu-tutorials.com/2008/07/03/printi-directly-to-pdf-in-ubuntu-804/
Sunday, October 17, 2010
shell script timing various commands
The time taken to execute a particular command (e.g. ls -ltr) can be saved to a file.
This can be useful when your shell script takes a lot of time and you want to profile the time taken by various commands.
-----------------------------
#!/bin/bash
"Time taken by ls" 2>> time.txt
{ time {
ls -ltr
} } 2>> time.txt
"Time taken by cat" 2>> time.txt
{ time {
cat test.sh;
} } 2>> time.txt
----------------------------
This can be useful when your shell script takes a lot of time and you want to profile the time taken by various commands.
-----------------------------
#!/bin/bash
"Time taken by ls" 2>> time.txt
{ time {
ls -ltr
} } 2>> time.txt
"Time taken by cat" 2>> time.txt
{ time {
cat test.sh;
} } 2>> time.txt
----------------------------
Saturday, October 9, 2010
vim - work remotely
vim is an editor which I love to work with. I make sure, I am using the latest stable version and also from time to time explore the new features incorporated into it.
I love my customized "vim" so much that I hate to use the basic "vi" installed by default in a new aix/linux machine. Also it is tedious to install vim in those machines; every time I make a new installation on my test machine.
But as always, there is a solution to get past this problem. use "vim" installed in your local system to read/edit files located on a remote server/machine. "vim + ftp" comes to our rescue.
for e.g. if you want to open "/home/sangeek/test.txt" located in server "abc.xx.com" as a "root" user, use this command :
vim ftp://root@abc.xx.com//home/sangeek/test.txt
you will be prompted to provide the password.
Alternately if you already have "vim" open you open the remote file in "command mode" :
:e ftp://root@abc.xx.com//home/sangeek/test.txt
That's it; a local copy of the file is made on your machine. Any edit and save you make using "vim" is also made in the remote server.
Other advantages of using "vim+ftp" to access files over remote server :
1. This is very helpful in case your remote server is very slow to access over network. Since you have a local copy of the same file; you navigation/edit in the file is very fast .. only delay the is when you save the file.
2. You don't have to authenticate for the ftp session if you want to open another file on the same remote server.
3. Best, your local vimrc settings apply to all the files opened remotely.
I love my customized "vim" so much that I hate to use the basic "vi" installed by default in a new aix/linux machine. Also it is tedious to install vim in those machines; every time I make a new installation on my test machine.
But as always, there is a solution to get past this problem. use "vim" installed in your local system to read/edit files located on a remote server/machine. "vim + ftp" comes to our rescue.
for e.g. if you want to open "/home/sangeek/test.txt" located in server "abc.xx.com" as a "root" user, use this command :
vim ftp://root@abc.xx.com//home/sangeek/test.txt
you will be prompted to provide the password.
Alternately if you already have "vim" open you open the remote file in "command mode" :
:e ftp://root@abc.xx.com//home/sangeek/test.txt
That's it; a local copy of the file is made on your machine. Any edit and save you make using "vim" is also made in the remote server.
Other advantages of using "vim+ftp" to access files over remote server :
1. This is very helpful in case your remote server is very slow to access over network. Since you have a local copy of the same file; you navigation/edit in the file is very fast .. only delay the is when you save the file.
2. You don't have to authenticate for the ftp session if you want to open another file on the same remote server.
3. Best, your local vimrc settings apply to all the files opened remotely.
Thursday, May 13, 2010
strings - smart and useful
Someone gives you up a binary a.out and says he has added some line like this
printf("Hello Universe");
Now the changes may be much bigger then the example. During your testing you do not get the desired result as was expected after his changes.
How do you confirm that he has not misplaced his binaries and handed you a wrong one?
So, if there is a string involved in the change; then you can use the strings command and confirm it.
$ strings a.out | grep Universe
Hello Universe
Better explanation on why to use strings is given here as http://www.oreillynet.com/pub/a/oreilly/linux/news/linuxnut_0800.html
'''
Sometimes you really want to see inside a binary file. Maybe there isn't a manpage and you're looking for usage information, or perhaps you're looking for information about who wrote a program or what application a file is associated with.
printf("Hello Universe");
Now the changes may be much bigger then the example. During your testing you do not get the desired result as was expected after his changes.
How do you confirm that he has not misplaced his binaries and handed you a wrong one?
So, if there is a string involved in the change; then you can use the strings command and confirm it.
$ strings a.out | grep Universe
Hello Universe
Better explanation on why to use strings is given here as http://www.oreillynet.com/pub/a/oreilly/linux/news/linuxnut_0800.html
'''
Sometimes you really want to see inside a binary file. Maybe there isn't a manpage and you're looking for usage information, or perhaps you're looking for information about who wrote a program or what application a file is associated with.
The strings command is perfect for that purpose--it searches through a file looking for sequences of printable character strings and writes them to standard output. You can pipe the output through a pager like more, or if you are looking for particular text, you can pipe the output to the grep command.
'''
Thursday, May 6, 2010
perl trace; a very useful debug utility
I was given a perl script and asked to fix the code where a particular option was not behaving as expected. The code was huge.
What's the best/faster way to locate the problem ?
Obviously I had to use a debugger; just like any other programming language perl too has it's own debbuger.
By giving perl the -d switch at command line will invoke the perl debugger.
The best option to understand the code flow and reach to the problematic option is enable trace while debugging.
perl help describes trace like this :
t [expr] Toggle trace [trace expr]
Once you enable trace; all the statements executed along with their line numbers will be displayed on the screen. It is similar to viewing code flow in a shell script by using a "-x" switch.
It is much better than using step/next not knowing where it is leading to and when it will end. So, get an overview of the code flow with t(trace) and make debugging easier.
What's the best/faster way to locate the problem ?
Obviously I had to use a debugger; just like any other programming language perl too has it's own debbuger.
By giving perl the -d switch at command line will invoke the perl debugger.
The best option to understand the code flow and reach to the problematic option is enable trace while debugging.
perl help describes trace like this :
t [expr] Toggle trace [trace expr]
Once you enable trace; all the statements executed along with their line numbers will be displayed on the screen. It is similar to viewing code flow in a shell script by using a "-x" switch.
It is much better than using step/next not knowing where it is leading to and when it will end. So, get an overview of the code flow with t(trace) and make debugging easier.
Wednesday, April 28, 2010
peculiar ssh requirement on AIX
Some days back I had a requirement to invoke scripts from a remote server periodically.
This is a classic requirement where one of the following solutions can be used :
1. rsh (where remote server would have added my user:host to the list of authenticated machines) and my machine can execute any command on the remote-machine bypassing login.
2. expect script using which I could have automated the login into the remote-machine and run the scripts.
3. ssh login without password.
Method 1 and 2 are not secure and 2nd method has the added disadvantage of changing the password in the script every time the login password changes.
So, I decided to use "ssh login". There are some good links over the Internet which provides the steps :
http://linuxproblem.org/art_9.html
http://www.linuxjournal.com/content/save-authentication (this is something which I contributed some time back)
All the steps are fine on AIX; but an added requirement.
The following files/directories should have these permissions for the automatic login to work fine :
chmod go-w ~/;
chmod 700 ~/.ssh;
chmod 600 ~/.ssh/authorized_keys
Hope this saves others the anxious moments I had to go through.
This is a classic requirement where one of the following solutions can be used :
1. rsh (where remote server would have added my user:host to the list of authenticated machines) and my machine can execute any command on the remote-machine bypassing login.
2. expect script using which I could have automated the login into the remote-machine and run the scripts.
3. ssh login without password.
Method 1 and 2 are not secure and 2nd method has the added disadvantage of changing the password in the script every time the login password changes.
So, I decided to use "ssh login". There are some good links over the Internet which provides the steps :
http://linuxproblem.org/art_9.html
http://www.linuxjournal.com/content/save-authentication (this is something which I contributed some time back)
All the steps are fine on AIX; but an added requirement.
The following files/directories should have these permissions for the automatic login to work fine :
chmod go-w ~/;
chmod 700 ~/.ssh;
chmod 600 ~/.ssh/authorized_keys
Hope this saves others the anxious moments I had to go through.
Sunday, March 14, 2010
ftp made easy with FileZilla
Why did I start using FileZilla than the normal command line ftp :
1. Can send/receive an entire directory to/from server; which is not possible in command-line. This may be "the" reason to use filezilla; but there are many more.
2. It opens up multiple connections to the server and helps in downloading of 10 or so files at the same time.
3. It has a transfer queue; with drag and drop facilities.
4. Configurable transfer speed limits.
P.S. Windows users don't worry; just like most open-source projects FileZilla is also available for windows.
1. Can send/receive an entire directory to/from server; which is not possible in command-line. This may be "the" reason to use filezilla; but there are many more.
2. It opens up multiple connections to the server and helps in downloading of 10 or so files at the same time.
3. It has a transfer queue; with drag and drop facilities.
4. Configurable transfer speed limits.
P.S. Windows users don't worry; just like most open-source projects FileZilla is also available for windows.
Sunday, February 7, 2010
play-with-sound using audacity
In my college days I had used Sound Forge to mix audio files.
Recently while preparing the script for a skit(I was directing it :) ), it striked me that if I could mix audio files well enough the background score could become very catchy. The search for the best sound mixer in linux began and I stumbled upon audacity. As Wikipedia says, it is a digital audio editor and recording application; but what it does not say is; there is virtually nothing that you can't do with it. Your imagination will be your limit and you can play around with sound as efficietly as a magician plays his tricks(sometimes I get very bad with metaphors :D).
Believe me or not background score and audio files I mixed became the central theme of my skit and everything else revolved around it.
I'll just jot down things that I did with it, but you can do much more :
Recently while preparing the script for a skit(I was directing it :) ), it striked me that if I could mix audio files well enough the background score could become very catchy. The search for the best sound mixer in linux began and I stumbled upon audacity. As Wikipedia says, it is a digital audio editor and recording application; but what it does not say is; there is virtually nothing that you can't do with it. Your imagination will be your limit and you can play around with sound as efficietly as a magician plays his tricks(sometimes I get very bad with metaphors :D).
Believe me or not background score and audio files I mixed became the central theme of my skit and everything else revolved around it.
I'll just jot down things that I did with it, but you can do much more :
- Open any audio file and cut/paste any portion of the file as you do with words in a text-editor.
- Bring out various portions of different songs in a single file and arrange them in any order you want.
- You can make two or more clips overlap and adjust the volume of each clip depending upon which one you want to give the priority to. This sort of provides the flexibity to fade-out a song and fade-in another one .. so they mix-out seamlessly.
- If you are looking for short-audio clips on anything for e.g. traffic noise etc. the best place is http://www.freesound.org/. Although not directly related to audacity, they complemented each other to good effect.
- You can either save the project in audacity project format (.aup) for later continued editing or export it to any format of your choice; believe me it supports all of them out there.
- You can very easily change the bit rate, pitch etc of a audio file and there are many tools to ease your task e.g. noise reduction
- Also you can record your own voice using it.
Labels:
audacity,
audio,
audio_editing,
linux,
sound
Sunday, January 31, 2010
wine came to my rescue
I always had problems viewing Microsoft office files(*.doc, *.ppt etc.) in Ubuntu. Openoffice doesn't understand the format in which Office XP/2003/2007 etc. store these files(and why should it? after all they don't comply to the open standards). But the important point is, I should be able to view and edit these files; so that when my collegues(Windows users) view/edit these files, they shouldn't complain.
So, I installed Office XP under "wine" http://en.wikipedia.org/wiki/Wine_(software). The version of wine that is compatible with Office XP(2002) is 1.0.1. The version of wine is important because I upgraded to a newer version of wine 1.1.36 and Office XP applications started crashing.
For others there is also an option to install entire Windows OS under "vmware" http://en.wikipedia.org/wiki/VMware_Workstation. This has the added benefit of using proprietary MS applications under Linux without the need to dual-boot.
So, I installed Office XP under "wine" http://en.wikipedia.org/wiki/Wine_(software). The version of wine that is compatible with Office XP(2002) is 1.0.1. The version of wine is important because I upgraded to a newer version of wine 1.1.36 and Office XP applications started crashing.
For others there is also an option to install entire Windows OS under "vmware" http://en.wikipedia.org/wiki/VMware_Workstation. This has the added benefit of using proprietary MS applications under Linux without the need to dual-boot.
The D day
Today I finally decided to start up this long time desire of mine ..
I intended to scribble down all the hiccups I encounter while using "linux" and most importantly tips on how to get around those blocks.
I intended to scribble down all the hiccups I encounter while using "linux" and most importantly tips on how to get around those blocks.
Labels:
linux,
office XP,
openoffice,
opensource,
ubuntu,
vmware,
wine
Subscribe to:
Posts (Atom)