Thanks to antville.org
Sunday, 4. July 2010
concise wikipedia extension
addons.mozilla.org

The user will select any word from the current webpage and choose "wikipedia description" on the right click. The selection will be submitted to the website mobile.wikipedia.org
For e.g. if I have selected the word "obama" and searched using "wikipedia description", I will be directed to the site that will show me a few lines about Barack Obama.

The URL is menioned in the url tag and that looks something like this.
mobile.wikipedia.org/transcode.php?go=obama

pretty easy, huh?

... Link (0 comments) ... Comment


Sunday, 13. June 2010
Improve InnoDB performance
innodb_flush_method=O_DIRECT
innodb_file_per_table
innodb-flush-log-at-trx-commit = 2

... Link (0 comments) ... Comment


Saturday, 12. June 2010
Brace Expansion
Brace expansion is used to generate arbitrary strings. For e.g.
ls mysql*.0000{1..3}

will list the files like mysql.00001 mysql.00002 & mysql.00003

This can also be used for something like this...

cp mysql.log{,.bak}
>> cp mysql.log mysql.log.bak

cp $da.log{.bak,}
>> cp 2010-05-28.log.bak 2010-05-28.log

... Link (0 comments) ... Comment


Thursday, 10. June 2010
Microsoft Mess
Microsoft mess is not a topic for me to blog anymore. But since someone whose blog I track has mentioned about it, let me link the article.

ma.tt

The only advice is do not use Micro$oft products when better alternatives are available. The machine automatically boots when the security updates are installed silently! Another reason to use pirated software?

... Link (0 comments) ... Comment


Monday, 12. April 2010
mysql login
Instead of specifying password in mysql command line, I prefer storing it in ~/.my.cnf while doing such works to avoid typing passwords every time. you can create this file or supply password as you wish.

$ cat ~/.my.cnf
[client]
user=root
password="password"

... Link (0 comments) ... Comment


Tuesday, 6. April 2010
Saving files in VI
You can save the current file as a new file after making changes,
:w new_file.txt

If you want only 50 lines starting from line number 100, use...
:100,150w! new_file.txt

... Link (0 comments) ... Comment


Wednesday, 24. March 2010
User input in shell script
#!/bin/sh
unset REPLY
until [[ $REPLY ]]; do read -p "Enter your name: "
done
echo "welcome $REPLY"

... Link (0 comments) ... Comment


Friday, 19. March 2010
Upgrade PEAR
I spent a lot of time figuring out how to upgrade my PEAR package.
The trick is to install the PEAR package with –force to make it go through

# pear upgrade --force PEAR

... Link (0 comments) ... Comment


Monday, 11. January 2010
Counting file types
cat myawk.sh
#!/bin/sh
# list the type of files with count
find ${*-.} -type f -print | xargs file |
awk '{
$1=NULL;
t[$0]++;
}
END {
for (i in t) printf("%d\t%s\n", t[i], i);
}' | sort -nr

... Link (0 comments) ... Comment


Tuesday, 29. December 2009
show processlist
ps aux
When you run ps you will only get the first 40 or so characters displayed. In order to view the entire string, use ...
ps auxgww

... Link (0 comments) ... Comment


Online for 2930 days
Last modified: 2010.07.06, 20:27
Status
Youre not logged in ... Login
Menu
... Home
... Tags

Search
Calendar
September 2010
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
2627282930
July
Recent updates
concise wikipedia extension https://addons.mozilla.org/en-US/firefox/addon/192492/ The user will select any word from the current webpage and...
by shantanuo (2010.07.06, 20:27)
Improve InnoDB performance innodb_flush_method=O_DIRECT innodb_file_per_table innodb-flush-log-at-trx-commit = 2
by shantanuo (2010.06.13, 19:18)
Brace Expansion Brace expansion is used to generate arbitrary strings. For e.g. ls mysql*.0000{1..3} will...
by shantanuo (2010.06.12, 18:46)
Microsoft Mess Microsoft mess is not a topic for me to blog anymore. But since...
by shantanuo (2010.06.10, 10:25)
mysql login Instead of specifying password in mysql command line, I prefer storing it in...
by shantanuo (2010.04.12, 19:47)
Saving files in VI You can save the current file as a new file after...
by shantanuo (2010.04.06, 12:47)
User input in shell script #!/bin/sh unset REPLY until [[ $REPLY ]]; do read -p...
by shantanuo (2010.03.24, 17:39)
Upgrade PEAR I spent a lot of time figuring out how to upgrade my PEAR...
by shantanuo (2010.03.19, 12:58)
Improve the bash history If you use two bash sessions at the same time, which...
by shantanuo (2010.03.15, 12:13)
Counting file types cat myawk.sh #!/bin/sh # list the type of files with count find...
by shantanuo (2010.01.11, 18:43)
show processlist ps aux When you run ps you will only get the first 40...
by shantanuo (2009.12.29, 09:50)
Which Linux? If you're a Linux expert, Fedora is for you. If you just want...
by shantanuo (2009.12.23, 14:22)
Killing processes You can enter the "kill" command in a terminal if a process hangs....
by shantanuo (2009.12.23, 14:06)
vim syntax behave mswin - Copy and Paste with Ctrl+C CtrlV set laststatus=2 - grey...
by shantanuo (2009.12.18, 17:37)
sed can make you sad! Changing the -e to -i in the following can be...
by shantanuo (2009.12.18, 17:09)
Easy SSH HashKnownHosts no Add the above line in your ssh_config file that can be...
by shantanuo (2009.12.18, 14:43)
Inernal File Separator The safe way to change IFS in a 'while read' loop is:...
by shantanuo (2009.12.01, 17:07)
Overwriting files output redirection using n> usually overwrites existing files. You can control this with...
by shantanuo (2009.11.21, 17:15)
send messages across network The following command can be used to send messages to remote...
by shantanuo (2009.11.19, 18:34)
power of wget wget is really a very powerful utility. Here is an example. wget...
by shantanuo (2009.10.18, 09:46)
Silence of the Foxes This simple Firefox tool lets you create custom Firefox installers which...
by shantanuo (2009.09.13, 19:30)
Wow 15 years IT experience and you don't know the difference between a bit and...
by lolquestionmark (2009.09.01, 18:29)
Zoom in Ubuntu I can change the tabs in firefox by using Alt + 2...
by shantanuo (2009.08.23, 07:49)
Google Calculator >> 24685316 kb in MB shows the wrong results: 24 685 316 kilobits...
by shantanuo (2009.08.16, 13:04)
Old date in Shell If you need to know the 3 days old date, it...
by shantanuo (2009.08.11, 12:50)

RSS feed

Made with Antville
Helma Object Publisher