Posts

Showing posts from March, 2012

Find path to perl on windows

perl -e "print $^X"

Interior designs

Image

Basic things to handle SLR manually

Image
Hi guys, just wanna share some basic information  to camera users should know if they choose shoot setting manually. Aperture, Shutter Speed and ISO is very common term in SLR, above is the example of ideal value for each setting   this is sample combination for aperture (f-stops) and shutter speed. let's try it out..

Understand focal length and aperture value

Image
In every aperture value we can get different kind of photo, but what is actually we looking for? it't depend on what we need. Below is a diagram illustrated subject focus in different aperture value.  as what we know, every lens have their own function, but we need to know the limitation too, below is the type of lenses with focal length size. did we know how much our camera can see?

Web links of Perl tutorials

http://perl5maven.com/perl-tutorial Perl, is a general programming language. It has been used in everything from bioscience ( http://www.bioperl.org ) to web development ( http://mojolicio.us  , http://perldancer.org ,  http://www.catalystframework.org  , and many many more.) As with many things in Perl there is usually more then one way to do things. Here is a small sample of things Perl community in general has: Parsers:  http://www.jeffreykegler.com/marpa BioPerl:  http://www.bioperl.org Scientific computing:  http://pdl.perl.org/ Webframe works: (lots here, just naming a few) * Plack:  http://plackperl.org/ * Mojolicious:  http://mojolicio.us * Perl Dancer:  http://perldancer.org * Catalyst:  http://www.catalystframework.org * CGI Application : http://search.cpan.org/~markstos/CGI-Application-3.21/lib/CGI/Application.pm Templating Frameworks: (Lot here, just naming a few) * Template Toolkit :  http://temp...

What are the unique features in Perl

" Perl was originally written to manipulate text in files, extract data from files, and write reports, but through continued development, it can manipulate processes, perform networking tasks, process Web pages, talk to databases, and analyze scientific data."  "Perl makes simple tasks easy, and makes difficult tasks possible."  1) Perl using a scalar, but no boolean / integer / long / float / double / scring. 2) Perl inherits / extends features of many shell scripting languages: shell / korn shell / C shell / Born shell 3) there are above 25k open source modules on the CPAN site one of the greatest advantages of Perl is the wealth of modules that can be found on CPAN.

Script to take dump from mysql and send mail

#! /bin/bash # your MySQL server's name SERVER=localhost # directory to backup to BACKDIR=~/backups # date format that is appended to filename DATE=`date +'%m-%d-%Y'` #----------------------MySQL Settings--------------------# # your MySQL server's location (IP address is best) HOST=localhost # MySQL username USER=root # MySQL password PASS="" # List all of the MySQL databases that you want to backup in here, # each separated by a space DBS="mtv_kbc" # set to 'y' if you want to backup all your databases. this will override # the database selection above. DUMPALL=n #----------------------Mail Settings--------------------# # set to 'y' if you'd like to be emailed the backup (requires mutt) MAIL=y # email addresses to send backups to, separated by a space EMAILS="cinu97@gmail.com" SUBJECT="MySQL backup on $SERVER ($DATE)" #----------------------FTP Settings----------------...

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

solution: ------------ /etc/init.d/mysqld stop mysqld_safe --skip-grant-tables & mysql  -u root mysql > use  mysql ; mysql > update user set password=PASSWORD(" newrootpassword") where User='root'; mysql > flush privileges; mysql > quit /etc/init.d/mysqld stop /etc/init.d/mysqld start

mysql user grant permissions

mysql> GRANT ALL PRIVILEGES ON  dbname.* TO 'user'@'localhost';

sample ss7.conf for 8port

$ vi /etc/ asterisk /ss7.conf [linkset-MSC1]  enabled => yes  enable_st => no  use_connect => yes  hunting_policy => seq_htl  subservice => auto  context => ss7  language => en  t35 => 15000,timeout  [link-l1]  linkset => MSC1  channels => 2-31  schannel => 1@host1:12000  ;schannel => 1,host1:12000  for chan_ss7 < 1.3  firstcic => 1  enabled => yes  [link-l2]  linkset => MSC1  channels => 1-31  schannel =>  firstcic => 33  enabled => yes  [link-l3]  linkset => MSC1  channels => 1-31  schannel =>  firstcic => 65  enabled => yes  [link-l4]  linkset => MSC1  channels => 1-31  schannel =>  firstcic => 97  enabled => yes  [link-l5]  linkset => MSC1  channels => 1-31  schannel =>...

sangoma card installation procedure

reference : http://wiki.sangoma.com/wanpipe-linux-asterisk-zaptel 1)Zaptel Installation Download Zaptel into arbitrary directory (/usr/src) and untar it. #>tar xvfz zaptel-<version> #>ln -s zaptel-<version> zaptel #>cd zaptel-<version> #>./configure #>make #>make install 2)# LibPRI Installation Download libpri into arbitrary directory (/usr/src) and untar it. #>tar xvfz libpri-<version> #>cd libpri-<version> #>make #>make install 3)Download Asterisk into arbirary directory (/usr/src/) and untar it. Untar Asterisk and proceed with installation #>tar xvfz asterisk-<version>.tgz #>cd asterisk-<version> #>./configure #>make #>make install #>make samples (in case of very first install) 4)Wanpipe installatio...

perl search & replace a string recursivly

perl -p -i -e 's/oldstring/newstring/g' `grep -ril oldstring *`

delete all data in a file

$cat /dev/null > filename

what is the difference between linux and unix?

For a start Linux is open source, Unix is proprietary.  Many applications are available on Linux, drivers are available compare to Unix.  The GUI and GUI applications on Linux are much more advanced than in Unix.  More community support for Linux than Unix.

Add a new line in beginning of file (Using SED)

sed -i '1i  write text watever u want to add ' filename.pl

cronetab for taking backups for every two days

#crontab -e 0 0 */2 * * /bin/sh /export/home/telesoft/vxml/ logs/cinu.sh ============================== =========== cinu.sh ----------- #!/bin/sh DATE=`date +%b\ %d --date="2 days ago"` echo COPY $DATE LOGS BACKUP_DIR=`date +%b%d` echo BACKUP DIR $BACKUP_DIR mkdir $BACKUP_DIR ls -l| grep "$(date +%b\ %d  --date="2 days ago")" | awk '{ print $9}'>$BACKUP_DIR.txt list=`cat $BACKUP_DIR.txt` for i in $list; do echo $i cp $i $BACKUP_DIR done tar -zcvf $BACKUP_DIR.tar.gz $BACKUP_DIR scp $BACKUP_DIR.tar.gz 123.176.41.150:/home/admin/

SHELL: copy perticular date created files into other directory

1step : #  ls -l | grep  'Nov  3'  | awk '{ print $9}' >> /dest/file.txt ------------------------------ ------------------------------ ------------------------------ ------------------  | |    note: $9 is for what                                                                                | |                                              ...

PERL Startup

Perl by Example 4th Edition by Ellie Quigley "...If you're just getting started with Perl, this is the book you want—whether you're a programmer, system administrator, or web hacker