Thanks to antville.org
Friday, 15. July 2011
Creating nagios filter

If you are getting too many emails from nagios service, you can create a filter in gmail.
From: nagios@company.com
to: shantanu.oa+nagios@gmail.com
Doesn't have : (db1 OR db2 OR localhost)

Do this: Skip Inbox, Apply label "company/nagios", Never send it to Spam

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


Friday, 8. July 2011
Cache Service installation

Download and Install redis from http://www.redis.io/download or use the following commands on the target server.

$ wget http://redis.googlecode.com/files/redis-2.2.8.tar.gz
$ tar xzf redis-2.2.8.tar.gz
$ cd redis-2.2.8
$ make

Start the redis server. To start the redis server please use the following command
$src/redis-server

configure the redis server ip in the Java properties file (cache.server) and ip (cache.port). The default port is 6379.

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


Thursday, 7. July 2011
Set the correct date under linux

Important things to remember about Linux date:

* /etc/sysconfig/clock sets whether the hardware clock is stored as UTC or local time.
* Symlink /etc/localtime to /usr/share/zoneinfo/... to set your timezone.
* Run ``date MMDDhhmm'' to set the current system date/time.
* Type ``/sbin/hwclock --systohc [--utc]'' to set the hardware clock.

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


Friday, 24. June 2011
Skype font size

The default 8pt Tahoma font looks very small in Skype. It can be changed to 11pt Times New Roman. Tools - Option - IM & SMS - IM appearance - Change font

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


Thursday, 19. May 2011
Using memory as device

// copy the file to RAM - 30 times faster
cp -af /root/100mb.bin /dev/shm/

// increase it to 4GB
mount -o remount,size=4G /dev/shm

// new memory device
mkdir -p /var/www/www.mysite.com/ramdrive
mount -t tmpfs -o size=500M,mode=0744 tmpfs /var/www/www.mysite.com/ramdrive

// add it to /etc/fstab to make it permanent:
tmpfs /var/www/www.mysite.com/ramdrive tmpfs size=500M,mode=0777 0 0

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


Friday, 6. May 2011
chmod permissions to remember

660 mysql data dir
700 home directory
777 world writeable files
chmod +x asper.sh OR (chmod 754 asper.sh)

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


Wednesday, 27. April 2011
MySQL Connection Timeouts

Default value of kernel net.ipv4.tcp_max_syn_backlog is 2048, increase it to 8192. Default value of net.core.somaxconn kernel setting is 128 and can be increased to 1000
MySQL parameter back_log which has default value of just 50. You may want to set it to 1000 or even higher.

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


Monday, 11. April 2011
Innodb_fast_shutdown

If innodb_fast_shutdown is set to 0, the log files are purged when mysqld shuts down - larger files mean a longer shutdown time. The default for innodb_fast_shutdown is 1, which
means that the log files are not purged before a shutdown. A value is 2 simulates a crash, and at the next startup InnoDB will do a crash recovery.
This can be useful when testing to see approximately how long InnoDB takes to recover from a crash, to determine if the size of your log files is too large.

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


Wednesday, 30. March 2011
Mobile wikipedia search plug-in

You must have used the wikipedia search plug-in for firefox. I have written a similar plug-in that will take you to mobile wikipedia page.

http://mycroft.mozdev.org/search-engines.html?author=shantanu.oak

It is very fast, without images and looks good even on very small screens.

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


Thursday, 17. February 2011
Curling PHP

CURL can be used very effectively using PHP. Here is an example.

# cat curl.php
<?php
$ch = curl_init("http://www.google.com/");
$fp = fopen("example.txt", "w");

curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);

curl_exec($ch);
curl_close($ch);
fclose($fp);
?>

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


Online for 8128 days
Last modified: 10/13/24, 10:18 AM
Status
Youre not logged in ... Login
Menu
... Home
... Tags

Search
Calendar
November 2024
SunMonTueWedThuFriSat
12
3456789
10111213141516
17181920212223
24252627282930
October
Recent updates
Extract words Extract all incorrect
words in first.txt file and all correct ones in second.txt...
by shantanuo (10/13/24, 10:18 AM)
Remove hyperlink in LO writer
1) Select "Internet Link" from Character styles. 2) Right click...
by shantanuo (10/9/24, 8:09 AM)
Templates in LO writer 1)
File > Templates > Save as Template 2) Give it...
by shantanuo (10/9/24, 8:07 AM)
discretize continuous features You can
"discretize" or "bin" continuous features into categorical features. from sklearn.preprocessing...
by shantanuo (4/24/24, 9:33 AM)
User Defined Property You
can create User Defined Property in libreoffice writer. File – Properties...
by shantanuo (1/9/23, 8:52 AM)
Arranging Chapters in the Navigator
To use a custom paragraph style for a heading, choose...
by shantanuo (1/4/23, 8:26 AM)
Use focus mode using Android
phones Settings > Digital Wellbeing and parental controls. Tap your...
by shantanuo (1/1/23, 3:59 AM)
Embed Fonts in document If
you use a font that the recipient is unlike to...
by shantanuo (12/18/22, 10:07 AM)
Using Navigator in Writer To
open the Navigator, select View > Navigator, or press the...
by shantanuo (12/18/22, 10:06 AM)
More about hyphenation The settings
for Tools > Options > Language Settings > Writing Aids...
by shantanuo (12/18/22, 10:04 AM)
link or unlink template If
you are using Libre office then template changer extension is...
by shantanuo (12/16/22, 5:27 AM)
Finding Styles you can select
Edit > Find and Replace > Other Options > Paragraph...
by shantanuo (12/14/22, 7:17 AM)
regex in clac In LibreOffice
Calc, you can use function REGEX for e.g. Begins with...
by shantanuo (12/14/22, 4:40 AM)
Libre Calc tips Turn Off
Grid Lines If you want to turn off grid lines...
by shantanuo (12/13/22, 8:14 AM)
More about Styles You can
goto View - Styles and change "All Styles" to "Applied...
by shantanuo (12/13/22, 7:49 AM)
Page Break Before Every Chapter
If your chapter titles are using the "Heading 2" Style:...
by shantanuo (12/13/22, 6:36 AM)
View and print in different
color Displaying Color in LO but Printing as White Page...
by shantanuo (12/13/22, 6:26 AM)
Change Normal Template in Libreoffice
Writer 1) Open a new file and set your font;...
by shantanuo (12/12/22, 8:45 AM)
Short english words in Devanagari
The list of short english words written in Devanagari. #...
by shantanuo (10/5/22, 9:05 AM)
Card issuing banks CITI
Standard Chartered HSBC American Express HDFC ICICI AXIS INDUS IND Kotak...
by shantanuo (7/16/22, 4:46 AM)
Activate IAM Access To activate
the Activate IAM Access setting, you must log in to...
by shantanuo (7/12/22, 5:52 AM)
use cheat instead of man
wget https://github.com/cheat/cheat/releases/download/4.2.3/cheat-linux-arm64.gz gunzip cheat-linux-arm64.gz chmod 770 cheat-linux-arm64 ./cheat-linux-arm64 mv cheat-linux-arm64...
by shantanuo (7/4/22, 8:53 AM)
python module itertools list of
useful methods of itertools module. permutations combinations combinations_with_replacement zip_longest count...
by shantanuo (9/8/21, 7:50 AM)
wikipedia tools 1) Collection of
useful utilities https://wikipediatools.appspot.com/ 2) all history of a user https://xtools.wmflabs.org/ec/mr.wikisource.org/Shantanuo...
by shantanuo (8/20/21, 6:36 AM)
Duration/Term of Copyright In the
case of original literary, dramatic, musical and artistic works, the...
by shantanuo (8/20/21, 6:26 AM)

RSS feed

Made with Antville
Helma Object Publisher