Search This Blog

2006-12-28

how to send mail with perl

http://www.e-nef.com/perl/

http://www.e-nef.com/perl/ntperl.html.en

http://qaix.com/perl-web-programming/84-789-perl2exe-read.shtml

http://alma.ch/perl/Mail-Sendmail-FAQ.html

http://www.perl.com/pub/a/2003/09/03/perlcookbook.html?page=2


SOURCES:


# ppm install MIME::Lite
#perldoc MIME::Lite

    $msg = MIME::Lite->new(
To =>'you@yourhost.com',
Subject =>'HTML with in-line images!',
Type =>'multipart/related'
);
$msg->attach(Type => 'text/html',
Data => qq{ <body>
Here's <i>my</i> image:
<img src="cid:myimage.gif">
</body> }
);
$msg->attach(Type => 'image/gif',
Id => 'myimage.gif',
Path => '/path/to/somefile.gif',
);
$msg->send();




















How to send attachments?

In a way very similar to the HTML mail above. Be aware that you will put the whole file(s) in memory, so this method isn't suitable for very big files. For files of reasonable size though, you can adapt this example:
==================================================START
use HTML::Entities;
use Mail::Sendmail 0.75; # doesn't work with v. 0.74!

$html = <<END_HTML;
<p><strong>HTML mail demo</strong>

<p>This is the message text
<p>It will only be displayed correctly by HTML-capable Mail clients
since it has no "text/plain" alternative part.
END_HTML

$html .= "<p>" . encode_entities("Voilà du texte qui sera encodé") . "\n"
. "<pre>This is text in " . encode_entities("<pre> and <code> tags") . "</code></pre>\n"
;

%mail = (
from => 'you@domain.tld',
to => 'whoever@someplace.tld',
subject => 'Test HTML mail',
'content-type' => 'text/html; charset="iso-8859-1"',
);

$mail{body} = <<END_OF_BODY;
<html>$html</html>
END_OF_BODY

sendmail(%mail) || print "Error: $Mail::Sendmail::error\n";
==================================================END

Let the more clever speak!

SOURCE:
http://www.e-nef.com/perl/ntperl.html.en

Install a Perl Script as a NT service

A NT service answers to an interface message call, to start it, pause it and stop it. So a signle script cannot be installed. The NT Ressource Kit 3 brings INSTSRV and ANYSRV, the first one to install a service name and the second one which is the service interface.

For example we create a service called PerlService :
`c:\\peliproc\\instsrv.exe PerlService c:\\peliproc\\srvany.exe`;
This installs an entry in the Registry Database. You can then finish hand installation as specified in the documentation or modify though the Win32::Registry the entries:

$p = "SYSTEM\\CurrentControlSet\\Services\\PerlService";
$main::HKEY_LOCAL_MACHINE->Open($p,$srv)||die "open: $!";
we are to create the key Parameters containing :
Application : the full path to the script
AppParameters : the execution parameters
AppDirectory : the path where from it will be executed
what we do this way:
$srv->Create("Parameters",$param)||die "Create: $!";
$param->SetValueEx("Application",0,REG_SZ,"c:\\perlproc\\scan.cmd");
$param->SetValueEx("AppParameters",0,REG_SZ,"2>c:\\tetmp\\toto.out");
$param->SetValueEx("AppDirectory",0,REG_SZ,"c:\\perlproc\\");
So we launch scan.cmd in the c:\perlproc directory (nota bene : it is needed to repeat the \ directory separator under NT, which serves to 'escape' i.e. use the specials caracters under Perl, so to have a \ we double it: \\). the argument is 2>c:\temp\toto.out, we redirect the standard error output (StdERR under perl, device 2 under each O.S.) to a file.

Now we can start the service.
`d:\\winnt\\system32\\net.exe start PerlService`;
The only thing that example hides is that the service is started with the SYSTEM account which under NT has more priorities than other account, even Administrator. It is possible through the Registry database to specify another user, but ... a password is needed, and I don't know how to add it trough the Registry database ...
Emulate a CRONTAB under NT

The at command and its interface winat can execute only asingle task a day, and this under the SYSTEM account. For some tasks, this is too constraining, e.g. scan a directory every 10 mn.

So, the best way is to create a NT service, and in the Perl script add an endless loop, and a sleep(600) for 10 mn i.e. 10*60 seconds.
Accessing an UNC reference under NT

It is easily done using the external command NET:
`d:\\winnt\\system32\\net.exe use \\server\ressource "password"
/USER:"user_name"'
The best way to catch the return message is to redirect with 2> to a file and scann it afterward.

Hence, the current environment (CurrentSet) has memorized the acces granting to this resource, and to access it after, you only need to specify the path as a normal path :
open(FIC,"\\serveur\ressource\vol1\DD-XF-FF.080") || warn "$0 $!";
and it is all !
Map a drive under NT

To map a drive is to associate to a resource(share) on the network, a device, i.e. driver, shown as a: à z: .

Thsi is done the same way under NT, but to use it as a service this introduces the problem that the current user may already use this device (only 23 available at least). A drive mapped is only under the current user profile; connection-less or under another login, it will not be anymore, unless this new profile map it itself.
Sending mail under NT

There is two ways:
Outlook:
The NT resource Kit brings a program called MAPISEND which permits to send a mail through an existing locally installed Outlook. It then need to only use the command line arguments.

SMTP Server or SMTP gateway under Exchange:
This more standard method, thanks to the libnet library from Perl (not available with ActiveWare, you then need to use hand-made sockets...) which gives through Net::SMTP all the necessary interface to this protocol;

The call is done with use Net::SMTP; , then you need to connect a SMTP Server :
$smtp = Net::SMTP->new("$MAILHOST");
and say who emits :
$smtp->mail("epierre\@e-nef.com");
and says to whom it is destined :
$smtp->to("$EMAIL");
and then we send the data :
smtp->data();
$smtp->datasend("To: $EMAIL\n");
$smtp->datasend("Cc: $CONTACT\n");
$smtp->datasend("Subject: Perl under NT, hard ?\n");
Here, we specify again who we write to, then we define a CC (a Carbon Copy, a copy to another person), and then the subject after a keyword Subject.We then add the content of the mail by $smtp->datasend("") that we repeat as long as we have lines to send, and we close the mail by
$smtp->dataend();
$smtp->quit();
The mail is now sent !
Using an Access Database through ODBC

Three steps are needed :
Have the corresponding ODBC driver (Start/Control Panel/ODBC 32/)
Add your base to the User DSN (see ODBC Home Page
Access it
The last step is done through Perl :
the database has an alias name through the DSN which serves to call it. We create the Database Connector Object :
$db = new Win32::ODBC($dsn);
we then form the SQL request :
$sql = "SELECT * FROM directory WHERE priority <= $priority2
ORDER BY name,firstname ";
for example.
we then emit the command :
$db->Sql($sql);
we get the result (if many) :
while ($db->FetchRow()) {
and we put in the variable the content of the record :
($name,$firstname,$tel)=$db->Data("name","firstname","tel")
}
we can check the return code through :
$db->Error();
and we close the database connection :
$db->Close();
Simple, simple ... a lot, yes !

Other Links

simple file upload with perl

#!C:\Perl\bin\perl.exe
######################################################
# upload a file with netscape 2.0+ or IE 4.0+
# Muhammad A Muquit
# When: Long time ago
# Changelog:
# James Bee" <JamesBee@home.com> reported that from Windows filename
# such as c:\foo\fille.x saves as c:\foo\file.x, Fixed, Jul-22-1999
# Sep-30-2000, muquit@muquit.com
# changed the separator in count.db to | from :
# As in NT : can be a part of a file path, e.g. c:/foo/foo.txt
# Commented out the user verivication
######################################################
#
# $Revision: 5 $
# $Author: Muquit $
# $Date: 3/28/04 9:38p $

use strict;
use CGI;
# if you want to restrict upload a file size (in bytes), uncomment the
# next line and change the number

$CGI::POST_MAX=50000;

$|=1;

my $version="V1.4";

## vvvvvvvvvvvvvvvvvvv MODIFY vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

# the text database of the user. The text database contains the |
# separated items, namely login|encrypted password|upload path
# example: muquit|fhy687kq1hger|/usr/local/web/upload/muquit
# if no path is specified, the file must be located in the cgi-bin directory.

my $g_upload_db="upload.db";

# overwrite the existing file or not. Default is to overwrite
# chanage the value to 0 if you do not want to overwrite an existing file.
my $g_overwrite=1;

# if you want to restrict upload to files with certain extentions, change
# the value of $g_restrict_by_ext=1 and ALSO modify the @g_allowed_ext if you
# want to add other allowable extensions.
my $g_restrict_by_ext=1;
# case insensitive, so file with Jpeg JPEG GIF gif etc will be allowed
my @g_allowed_ext=("jpeg","jpg","gif","png" , "txt");

## ^^^^^^^^^^^^^^^^^^^ MODIFY ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



#-------------- globals---------- STARTS ------------------
my $query=new CGI;
my $g_debug=0;


my $g_title="File upload";
my $g_upload_path='./deployment/perAgent/';

#-------------- globals---------- ENDS ------------------


print $query->header;

# Java Script for form validation
#
my $JSCRIPT=<<EJS;

var returnVal=true;
var DEBUG=0;

//===========================================================================
// Purpose: check if field is blank or NULL
// Params:
// field (IN)
// errorMsg (IN - MODIFIED)
// fieldTitle (IN)
// Returns:
// errorMsg - error message
// Globals:
// sets global variable (returnVal) to FALSE if field is blank or NULL
// Comments:
// JavaScript code adapted from netscape software registration form.
// ma_muquit\@fccc.edu, May-09-1997
//===========================================================================

function ValidateAllFields(obj)
{
returnVal = true;
errorMsg = "The required field(s):\\n";

// make sure all the fields have values
if (isSomeFieldsEmpty(obj) == true)
{
// DISPLAY ERROR MSG
displayErrorMsg();
returnVal = false;
}

if (returnVal == true)
document.forms[0].submit();
else
return (false);
}

//===========================================================================
function displayErrorMsg()
{
errorMsg += "\\nhas not been completed.";
alert(errorMsg);
}

//===========================================================================
function isSomeFieldsEmpty(obj)
{
var
returnVal3=false;



// check if login is null
if (obj.userid.value == "" || obj.userid.value == null)
{
errorMsg += " " + "Userid" + "\\n";
returnVal3=true;
}

// check if Password is null

if (obj.password.value == "" || obj.password.value == null)
{
errorMsg += " " + "Password" + "\\n";
returnVal3=true;
}

// check if upload_file is null
if (obj.upload_file.value == "" || obj.upload_file.value == null)
{
errorMsg += " " + "Upload filename" + "\\n";
returnVal3=true;
}

return (returnVal3);
}

EJS
;

# print the HTML HEADER
&printHTMLHeader;

if ($query->path_info eq "/author" or $query->path_info eq "/about")
{
&printForm();
&printAuthorInfo();
return;
}

if ($query->param)
{
&doWork();
}
else
{
&printForm();
}

##-----
# printForm() - print the HTML form
##-----
sub printForm
{

print "<center>\n";
print "<table border=0 bgcolor=\"#c0c0c0\" cellpadding=5 cellspacing=0>\n";

print $query->start_multipart_form,"\n";

#------------- userid
print "<tr>\n";
# print "<td align=\"right\">\n";
# print "Userid:\n";
# print "</td>\n";

print "<td>\n";
# print $query->textfield(-name=>'userid',
# -size=>20);
print "</td>\n";
print "</tr>\n";

#------------- password
print "<tr>\n";
# print "<td align=\"right\">\n";
# print "Password:\n";
# print "</td>\n";

# print "<td>\n";
# print $query->password_field(-name=>'password',
# -size=>20);
# print "</td>\n";
# print "</tr>\n";

#------------- upload
print "<tr>\n";
print "<td align=\"right\">\n";
print "Upload file:\n";
print "</td>\n";

print "<td>\n";
print $query->filefield(-name=>'upload_file',
-size=>30,
-maxlength=>120);
print "</td>\n";
print "</tr>\n";



#------------- submit
print "<tr>\n";
print "<td colspan=2 align=\"center\">\n";
print "<hr noshade size=1>\n";
print $query->submit(-label=>'Upload',
-value=>'Upload',
-onClick=>"return ValidateAllFields(this.form)"),"\n";
print "</td>\n";
print "</tr>\n";



print $query->endform,"\n";

print "</table>\n";
print "</center>\n";
}



##------
# printHTMLHeader()
##------
sub printHTMLHeader
{
print $query->start_html(
-title=>"$g_title",
# -script=>$JSCRIPT,
-bgcolor=>"#ffffff",
-link=>"#ffff00",
-vlink=>"#00ffff",
-alink=>"#ffff00",
-text=>"#000000");
}

##-------
#Purpose : to upload the actual file
##-------
sub doWork
{
##################
my $em='';
##################


# import the paramets into a series of variables in 'q' namespace
$query->import_names('q');
# check if the necessary fields are empty or not
# $em .= "<br>You must specify your Userid!<br>" if !$q::userid;
# $em .= "You must specify your Password!<br>" if !$q::password;
$em .= "You must select a file to upload!<br>" if !$q::upload_file;

&printForm();
if ($em)
{
&printError($em);
return;
}

# if (&validateUser() == 0)
# {
# &printError("Will not upload! Could not validate Userid: $q::userid");
# return;
# }

# if you want to restrict upload to files with certain extention
if ($g_restrict_by_ext == 1)
{
my $file=$q::upload_file;
my @ta=split('\.',$file);
my $sz=scalar(@ta);
if ($sz > 1)
{
my $ext=$ta[$sz-1];
if (! grep(/$ext/i,@g_allowed_ext))
{
&printError("You are not allowed to upload this file");
return;
}

}
else
{
&printError("You are not allowed to upload this file");
return;
}
}

# now upload file
&uploadFile();

if ($g_debug == 1)
{
my @all=$query->param;
my $name;
foreach $name (@all)
{
print "$name ->", $query->param($name),"<br>\n";
}
}
}

##------
# printError() - print error message
##------
sub printError
{
my $em=shift;
print<<EOF;
<center>
<hr noshade size=1 width="80%">
<table border=0 bgcolor="#000000" cellpadding=0 cellspacing=0>
<tr>
<td>
<table border=0 width="100%" cellpadding=5 cellspacing=1>
<tr>
<td bgcolor="#ffefd5" width="100%">

<font color="#ff0000"><b>Error -</b></font>
$em</td>
</tr>
</table>
</td>
</tr>

</table>
</center>
EOF
;
}

##--
# validate login name
# returns 1, if validated successfully
# 0 if validation fails due to password or non existence of login
# name in text database
##--
sub validateUser
{
my $rc=0;
my ($u,$p);
my $userid=$query->param('userid');
my $plain_pass=$query->param('password');

# open the text database
unless(open(PFD,$g_upload_db))
{
my $msg=<<EOF;
Could not open user database: $g_upload_db
<br>
Reason: $!
<br>
Make sure that your web server has read permission to read it.
EOF
;
&printError("$msg");
return;
}

# first check if user exist
$g_upload_path='';
my $line='';
while (<PFD>)
{
$line=$_;
chomp($line);
# get rid of CR
$line =~ s/\r$//g;
($u,$p,$g_upload_path)=split('\|',$line);
if ($userid eq $u)
{
$rc=1;
last;
}
}
close(PFD);

if (crypt($plain_pass,$p) ne $p)
{
$rc=0;
}

return ($rc);
}


sub uploadFile
{
my $bytes_read=0;
my $size='';
my $buff='';
my $start_time;
my $time_took;
my $filepath='';
my $filename='';
my $write_file='';

$filepath=$query->param('upload_file');

# James Bee" <JamesBee@home.com> reported that from Windows filename
# such as c:\foo\fille.x saves as c:\foo\file.x, so we've to get the
# filename out of it
# look at the last word, hold 1 or more chars before the end of the line
# that doesn't include / or \, so it will take care of unix path as well
# if it happens, muquit, Jul-22-1999
if ($filepath =~ /([^\/\\]+)$/)
{
$filename="$1";
}
else
{
$filename="$filepath";
}
# if there's any space in the filename, get rid of them
$filename =~ s/\s+//g;

$write_file="$g_upload_path" . "/" . "$filename";

&print_debug("Filename=$filename");
&print_debug("Writefile= $write_file");

if ($g_overwrite == 0)
{
if (-e $write_file)
{
&printError("File $filename exists, will not overwrite!");
return;
}
}

if (!open(WFD,">$write_file"))
{
my $msg=<<EOF;
Could not create file: <code>$write_file</code>
<br>
It could be:
<ol>
<li>The upload directory: <code>\"$g_upload_path\"</code> does not have write permission for the
web server.
<li>The upload.db file has Control character at the end of line
</ol>
EOF
;

&printError("$msg");
return;
}

$start_time=time();
while ($bytes_read=read($filepath,$buff,2096))
{
$size += $bytes_read;
binmode WFD;
print WFD $buff;
}

&print_debug("size= $size");

close(WFD);

if ((stat $write_file)[7] <= 0)
{
unlink($write_file);
&printError("Could not upload file: $filename");
return;
}
else
{
$time_took=time()-$start_time;
print<<EOF;
<center>
<hr noshade size=1 width="90%">
<table border=0 bgcolor="#c0c0c0" cellpadding=0 cellspacing=0>
<tr>
<td>
<table border=0 width="100%" cellpadding=10 cellspacing=2>
<tr align="center">
<td bgcolor="#000099" width="100%">
<font color="#ffffff">
File
<font color="#00ffff"><b>$filename</b></font> of size
<font color="#00ffff"><b>$size</b></font> bytes is
uploaded successfully!
</font>
</td>
</tr>
</table>
</td>
</tr>

</table>
</center>
EOF
;
}
}

sub printAuthorInfo
{
my $url="http://www.muquit.com/muquit/";
my $upl_url="http://muquit.com/muquit/software/upload_pl/upload_pl.html";
print<<EOF;
<center>
<hr noshade size=1 width="90%">
<table border=0 bgcolor="#c0c0c0" cellpadding=0 cellspacing=0>
<tr>
<td>
<table border=0 width="100%" cellpadding=10 cellspacing=2>
<tr align="center">
<td bgcolor="#000099" width="100%">
<font color="#ffffff">
<a href="$upl_url">
upload.pl</a> $version by
<a href="$url">Muhammad A Muquit</A>
</font>
</td>
</tr>
</table>
</td>
</tr>

</table>
</center>
EOF
;
}

sub print_debug
{
my $msg=shift;
if ($g_debug)
{
print "<code>(debug) $msg</code><br>\n";
}
}

Blogger Publisher published with BloogerPublisher.pl ; ) I might do this the hard way, but did not find the easy setting ..

package BloggerPublisher ;
#Purpose: Publish codes so that they should be visible in browser
#TODO: replace any possible symbols with html entities
#hint create a Textpad Command with BloggerPublisher.pl $FileName and
#select Capture output

use strict ;

my $fileToPublish = $ARGV[0] ;
my @file_array = ();


open (INPUT, "<$fileToPublish") || print "could not open the $fileToPublish!\n";
@file_array= <INPUT>;




foreach (@file_array) #foreach line of the file
{
s/</&lt\;/g; #replace < with &lt;
s/>/&gt\;/g; #replace > with &gt;
s/&/&\;/g , #replace & with &amp;
print $_
}

close INPUT;



1;

__END__

2006-12-27

Miten Suomen Pankit "soveltaa" eu-maksujen hinnoittelua

Maksu on EU-maksu, kun seuraavat edellytykset täyttyvät:
- maksu on euromääräinen
- maksun suuruus on enintään 50.000 euroa
- saajan tilinumero on ilmoitettu IBAN-muodossa (International Bank Account Number)
- saajan pankin BIC/SWIFT-koodi on annettu maksun tiedoissa
- maksaja ja saaja maksavat omat kulunsa
- pikamääräys ei ole mahdollinen EU-maksussa

some copy paste theory for uploading files with curl and perl via http

commands:
perldoc CGI
perl -M

Where to download curl from ?
http://curl.haxx.se/dlwiz/

GENERAL PRINCIPLES :

Now the vendor must have a "webpage" for you to interact with. That
webpage could be generated with a Perl CGI script. It must contain a
form (and, since it must have an "upload" field, it must be a multipart
form). So the vendor publishes a webpage with a form that has an
upload field in it. You use Mechanize (or cURL or whatever) to "fill
out" and submit that form. The form can be password-controlled for
security (using .htaccess or authentication within the script itself,
or both, or some other method (cookies, etc)). The script could be
coded to allow access only from a particular host or IP address, etc.

See the CGI.pm documentation for instructions about how to set up a
file upload form.

It's then up to the target CGI to receive and process the incoming
file. This would usually involve security checks and placement into a
particular directory. Unlike FTP, you have no direct control (on your
end) over what directory the file ends up in (though the CGI could be
configured so that you could pass a directory as a parameter which the
CGI would use).





curl - get a file from an FTP, TELNET, LDAP, GOPHER, DICT,
HTTP or HTTPS server.
-a/--append
(FTP) When used in a ftp upload, this will tell
curl to append to the target file instead of over-
writing it. If the file doesn't exist, it will be
created.

-F/--form
(HTTP) This lets curl emulate a filled in form in
which a user has pressed the submit button. This
causes curl to POST data using the content-type
multipart/form-data according to RFC1867. This
enables uploading of binary files etc. To force the
'content' part to be read from a file, prefix the
file name with an @ sign. Example, to send your
password file to the server, named 'passwd':

curl -F passwd=@/etc/passwd www.passwd.com


Uploading CSV File via Curl
curl --connect-timeout 10 --max-time 120 -s -S \
--form 'email=EMAIL_HERE' --form 'pw=PASSWORD_HERE' \
--form 'project_id=22' --form 'tableName=demoData' \
--form 'data_file=@path/to/data.csv' --form 'type=csv' \
http://sensorbase.org/alpha/upload.php


Uploading XML File via Curl
curl --connect-timeout 10 --max-time 120 -s -S \
--form 'email=EMAIL_HERE' --form 'pw=PASSWORD_HERE' \
--form 'project_id=22' --form 'tableName=demoData' \
--form 'data_file=@path/to/data.xml' --form 'type=xml' \
http://sensorbase.org/alpha/upload.php

SOURCES


http://lecs.cs.ucla.edu/wiki/index.php/Slog_Data_via_HTTP_POST_-_SensorBase.org#Uploading_XML_File_via_Curl

CGI documentation for creating file upload field

using perl to upload files from about.com



http://www.google.com/search?client=opera&rls=en&q=PERL+PACKAGE+CURL&sourceid=opera&ie=utf-8&oe=utf-8

http://curl.haxx.se/libcurl/perl/

http://curl.haxx.se/

http://curl.haxx.se/download.html

http://curl.haxx.se/dlwiz/

http://curl.haxx.se/dlwiz/?type=bin

http://curl.haxx.se/dlwiz/?type=bin&os=Win32

http://curl.haxx.se/dlwiz/?type=bin&os=Win32&flav=-

http://curl.haxx.se/dlwiz/?type=bin&os=Win32&flav=-&ver=2000%2FXP

http://webdesign.about.com/od/htmltags/p/bltags_inputfil.htm

http://webdesign.about.com/od/cgi/a/aa030899.htm

http://www.thescripts.com/forum/thread224757.html

http://www.thescripts.com/forum/login.php

http://www.thescripts.com/forum/login.php?do=lostpw

https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl<mpl=m_blanco<mplcache=2

2006-12-26

evoke remote process on Windows XP revised (tested only on Win XP )

use Win32::OLE qw( in );
use Win32::OLE::Variant;
use Win32::IPConfig;
use Socket ;



#Purpose to start remote process :Usage: perl filename.pl exe_to_run.exe
#usage : $0 hostDomainName executableName.exe Argument1 Argument2
our $Machine = $ARGV[0];
our @ARGV = @ARGV[1..$#ARGV] ; #cut the host's name from the comma1nd line
our $CLASS = "WinMgmts:{impersonationLevel=impersonate}!//$Machine";
main();

sub main
{
getIpFromDomainName($Machine);
my $success = startProc();
my $counter = 0 ;
while ( $success == 0 && $counter <= 3 )
{
$success = startProc();
$counter ++ ;
}
if ($success == 0)
{
open ( FH , ">C:/Temp/TEMP/$Machine.txt" ) or
die "cannot open $Machine.txt $! \n" ;
print FH "$Machine failed to execute command :\n" ;

foreach (@ARGV)
{ chomp($_);
print FH "$_ " ;
}
close FH ;
}
}
sub getIpFromDomainName
{
my $host = shift ;
my $hostIp = () ; #the ip of the host we are going to return
my $address = gethostbyname("$host") ;
# print gethostbyname($_) , "\n" ;
print inet_ntoa($address) , "\n" ;
$hostIp = inet_ntoa($address) ;
return $hostIp ;
#eof sub getIpFromDomainName
}
sub startProc
{ #todo

my $hostIp = getIpFromDomainName($Machine);
$WMI = Win32::OLE-> GetObject( $CLASS ) || die "Unable to connect to
$Machine:" . Win32::OLE->lastError();

$PROCESSSTARTUP = $WMI-> Get("Win32_ProcessStartup")->SpawnInstance_;

$PROCESSSTARTUP-> {WinstationDesktop} = "winsta0\\default";

$PROCESSSTARTUP-> {ShowWindow} = 1;

print "$PROCESSSTARTUP-> {WinstationDesktop}\n";

$Process = $WMI-> Get( "Win32_Process" ) || die "Unable to get the
process list:" . Win32::OLE-> LastError();

$vPid = Variant( VT_I4 | VT_BYREF, 0 );

if( 0 == $Process-> Create( join( " ", @ARGV ), undef,
$PROCESSSTARTUP, $vPid ) ) {
print "PID $vPid\n";
sleep 2 ;

return 1 ;
}
else
{
print "Failed .\n";
sleep 2 ;
return 0 ;
}

} #eof startProc

Reinstalling Windows XP Home

Ok. I got sick of the slowness caused by IE 7 and variety of crap I had installed during the last 15 months.... So the best medicine.
- Clean install of Windows XP
- Choose English as OS language (inspite of my better half's complaints )- different shortcuts, programs instability - I just can't trust Windows engineers that translated WinOS is as good as the american one - if that would have been the keys , than you could have had change the language on the fly ...
- Back of all pictures , need better backup software than Explorer and Nero
- back up all settings (forgot my wife's firefox favorites arrrrrrrrrgggggggg )
- back up text pad settings
- copy C:\utils (chock full with some exe's ; )
- run HiJackThis after each install in order to remove obsolete (exe helpers in start up etc. (for example Adobe Acrobat ... )
-

2006-12-22

MY (broken ; ) PERL CHEET SHEAT (html entities to blame ;-)


# INSTALLING MODULES ON PERL
perl -e -MCPAN "install 'GD'"
ppm search module:name


#READ ALL ROWS OF A FILE TO ALIST
open (INPUT, "<$inputfile") || print "could not open the file!\n";
@myfile = <INPUT>;
close INPUT;

#GET A NICE TIME
sub timestamp {
#
# Purpose: returns the time in yyyymmdd-format
#
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
#---- change 'month'- and 'year'-values to correct format ----
$min = "0$min" if ($min < 10);
$hour = "0$hour" if ($hour < 10);
$mon = $mon + 1;
$mon = "0$mon" if ($mon < 10);
$year = $year + 1900;
$mday = "0$mday" if ($mday < 10);
return "$year$mon$mday" . "_" . "$hour$min" . "_" . $sec;
}







#OPEN FILE AND START TO WRITE TO IT FROM A LIST
open(FILEHANDLE,">$outputfile") || die "cannot open output file";
$num=0;
foreach $line (@myfile)
{
$num= $num + 1;
@line_tokens= split('=',$line);
foreach $token(@line_tokens)
{
if ($token =~/(4FID[[:digit:]]{5})|(1USD[[:digit:]]{5})|(ID[[:digit:]]{7})|(2SGD[[:digit:]]{5})|(2KRD[[:digit:]]{5})|(1BRD[[:digit:]]{5})|(4DED[[:digit:]]{5})|(4HUD[[:digit:]]{5})/ )
{
print (FILEHANDLE "$token");
}
else {;}
}
}




# READ ALL ROWS TO LIST
open (FILE,$file);
@rows = ;
close (FILE);


# GREP ALL ROWS CONTAINING 'MACHINE=' (TO A LIST)
@list = grep(/machine=/,@rows);

# A NICE WAY TO CONCATENATE A STRING TO THE SAME STRING
#--- Collect agents from yesterday ------------------------------
$sql = "select some query ";
$sql .= "inner join plah ";
$sql .= "where something like \'" . $APPLICATION . "\' and ";
$sql .= "StartTime between \'" . $DAY2 . "\' and \'" . $DAY1 . "\' ";
$sql .= "order by 1";



# THE EQUIVALENT OF THE SET COMMAND TROUGH THE COMMAND PROMT
foreach $i (keys %ENV)
{
print FH "$i : $ENV{$i} \n";
}

#accept a command line parameter
our $CycleScriptRun_pid = $ARGV[0] ;


#==========================================================
#start a Windows process
use Win32 ;
use Win32::Process ;

my $DayCycle_path= $varHolder->{'BASEDIR'} . "DayCycle.exe" ;
if( $varHolder->{VISIBLE_MODE} == 1)
{ Win32::Process::Create( $DayCycle_o, "$DayCycle_path", "" , 0,
CREATE_NEW_CONSOLE ,$varHolder->{'BASEDIR'}); }
else
{ Win32::Process::Create( $DayCycle_o, "$DayCycle_path", "" , 0,
CREATE_NO_WINDOW ,$varHolder->{'BASEDIR'}); }

$DayCycle_pid = $DayCycle_o->GetProcessID() ;
#==========================================================
#==========================================================
#Purpose : to tie a file
#==========================================================
use Tie::File ;
my @file_array = ();
my $file = 'C:/Temp/folder/settings.txt' ;
tie @file_array , 'Tie::File', $file , memory => 100_000_000 or die "I cannot find the $file" ;

foreach (@file_array) #foreach line of the file
{ s/$setting=(\d+)/$setting=$value/;
}
untie @file_array ;
#==========================================================
#==========================================================
# create a nameless hash
#==========================================================
my $record = #one record for each cycle
{
APP=> "$csAppName" ,
SCRIPT=> "$psCurrentScript" ,
STEP=> "$psCurrentStep"
} ;
#==========================================================
#==========================================================
#simple perl regex cheatsheet
#==========================================================
Operators
m// 'Match' operator
s/// 'Substitute' operator
tr/// 'Translate' operator

# Special Characters
. Any single character escept newline n
b Between word and non-word chars, ie: /bcat/b/ matches "cat" but not "scat"
B NOT between word and non-word chars
w Word character
W Non-word character
d Digit
D Non-digit
s White-space
S Non-white-space

# Assertions (Position Definers)
^ Start of the string
$ End of the string

# Quantifiers (Numbers Of Characters)
n* Zero or more of 'n'
n+ One or more of 'n'
n? A possible 'n'

n{2} Exactly 2 of 'n'
n{2, } At least 2 (or more) of 'n'
n{2,4} From 2 to 4 of 'n'

# Groupings
() Parenthesis to group expressions
(n/sitebuilder/regex/images/1/a) Either 'n' or 'a'
Character Classes
[1-6] A number between 1 and 6
[c-h] A lower case character between c and h
[D-M] An upper case character between D and M
[^a-z] Absence of lower case character between a and z
[_a-zA-Z] An underscore or any letter of the alphabet

Useful Perl Snippets
$mystring =~ s/^s*(.*?)s*$/$1/; Trim leading and trailing whitespace from $mystring
$mystring =~ tr/A-Z/a-z/; Convert $mystring to all lower case
$mystring =~ tr/a-z/A-Z/; Convert $mystring to all upper case
tr/a-zA-Z//s; Compress character runs, eg: bookkeeper -> bokeper
tr/a-zA-Z/ /cs; Convert non-alpha characters to a single space



#=============================================================
#Install a perl module from behind a firewalll using ppm
#=============================================================
Example with Compress-Bzip2

1. Download tar package from the nearest cpan mirror to C:\Temp\TEMP folder (could be other also ; )
2. Create Compress-Bzip2.ppd type of file , containging the following:

<?xml version="1.0" encoding="UTF-8"?>
<SOFTPKG NAME="Compress-Bzip2" VERSION="2,2,09">
<TITLE>Compress-Bzip2</TITLE>
<ABSTRACT>Blah</ABSTRACT>
<AUTHOR>Somebody</AUTHOR>
<IMPLEMENTATION>
<CODEBASE HREF="file:///C|/Temp/TEMP/Compress-Bzip2-2.09.tar.gz"></CODEBASE>
<INSTALL></INSTALL>
<UNINSTALL></UNINSTALL>
</IMPLEMENTATION>
</SOFTPKG>

Attention: . Name and codebase NOT C:\ BUT file:///C|

3. Open Dos prompt into the C:\Temp\TEMP (or whichever you prevered in the beginning)
4. Run the command :
ppm rep add myNewRepository C:\Temp\TEMP
In order to add the folder to the list of your current ppm repositories

5. ppm install Compress-Bzip2
In order to install the module from the local folder

6. ppm rep delete myNewRepository
In order to remove the repository from the ppm

(Section contributed by Y. Georgiev)

#sleep for less than second in Windows
use Win32 ;
Win32::sleep ($time_in_milliseconds);

#===================================================================
#throw proper errro messages while checking the file size
use File::stat qw(:FIELDS);
#create the obj wrapper for getting the file attributes
my $st =stat($file) or croak ( "No $stdout : $!"); #die will shut down the program !!!!
# get the file size
my $size = $st->size();
$stat_obj =stat($stdout) or die "No $stdout: $!";
#throw proper errro messages ^^^^
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks)
= stat($filename);
#===================================================================

#================================================================
#Add some servers to thte local ppm's repository
ppm rep add name1 http://server.nam.com
ppm rep add name2 ftp://server.name.com


#get the computername of a computer
$computername = $ENV{COMPUTERNAME} ;
#get the username of the a Windows computer
$userName = $ENV{USERNAME} ;
#get the name of the currrent executing script and ints pid
print $0 , $$ ;
#===================================================================
#The textpad settings for jump to error for perl scripts File 1 Register 2
^.+at (.+) line ([0-9]+)[.,]?
exec *.pl *.pm *.cgi /s /b do perl -wc

#================================================================

#===================================================================
#======== Exctract only the name of a file witout the long path
#===================================================================

my ($keijo) = "c:\\homo\\urpo\\neste\\kekvo.exe";
@homo = split(/\\/,$keijo);
$jee = pop(@homo);
#The same thing
$file=~m/^.*(\\|\/)(.*)/; # strip the remote path and keep the filename
my $name = $2;

#===================================================================
#===================================================================
#PRINT TILL THE END OF A LABLE
#===================================================================
print <<END_HTML;

<html> <head>
<title>thanks!</title>
</head>

<body>
<p>thanks for uploading your photo!</p>

<p>your photo:</p>
<img src="/upload/$filename" border="0">

</body> </html>

END_HTML
# IMPORTANT !!!! IF THERE ARE SPACES IN THE PREVIOUS LINE == SYNTAX ERROR

#===================================================================

#check for file existance and other attributes
$readfile="myfile.cgi";

if ( (-e $readfile) && (-r $readfile) )
{
#proceed with your code
}

#=================================================================
#how to check my perl installed modules
#perldoc perllocal OR
#ppm install ExtUtils::Installed save and run this one
#source http://www.cpan.org/misc/cpan-faq.html#How_installed_modules

use ExtUtils::Installed;
my $instmod = ExtUtils::Installed->new();
foreach my $module ($instmod->modules())
{
my $version = $instmod->version($module) || "???";
print "$module -- $version\n";
}

#=================================================================

html entities (source http://www.htmlhelp.com/reference/html40/entities/special.html)





















































































































































































































































































































Character Entity Decimal Hex Rendering in Your Browser
Entity Decimal Hex
quotation mark = APL quote &quot; &#34; &#x22; " " "
ampersand &amp; &#38; &#x26; & & &
less-than sign &lt; &#60; &#x3C; < < <
greater-than sign &gt; &#62; &#x3E; > > >
Latin capital ligature OE &OElig; &#338; &#x152; Œ Œ Œ
Latin small ligature oe &oelig; &#339; &#x153; œ œ œ
Latin capital letter S with caron &Scaron; &#352; &#x160; Š Š Š
Latin small letter s with caron &scaron; &#353; &#x161; š š š
Latin capital letter Y with diaeresis &Yuml; &#376; &#x178; Ÿ Ÿ Ÿ
modifier letter circumflex accent &circ; &#710; &#x2C6; ˆ ˆ ˆ
small tilde &tilde; &#732; &#x2DC; ˜ ˜ ˜
en space &ensp; &#8194; &#x2002;
em space &emsp; &#8195; &#x2003;
thin space &thinsp; &#8201; &#x2009;
zero width non-joiner &zwnj; &#8204; &#x200C;
zero width joiner &zwj; &#8205; &#x200D;
left-to-right mark &lrm; &#8206; &#x200E;
right-to-left mark &rlm; &#8207; &#x200F;
en dash &ndash; &#8211; &#x2013;
em dash &mdash; &#8212; &#x2014;
left single quotation mark &lsquo; &#8216; &#x2018;
right single quotation mark &rsquo; &#8217; &#x2019;
single low-9 quotation mark &sbquo; &#8218; &#x201A;
left double quotation mark &ldquo; &#8220; &#x201C;
right double quotation mark &rdquo; &#8221; &#x201D;
double low-9 quotation mark &bdquo; &#8222; &#x201E;
dagger &dagger; &#8224; &#x2020;
double dagger &Dagger; &#8225; &#x2021;
per mille sign &permil; &#8240; &#x2030;
single left-pointing angle quotation mark &lsaquo; &#8249; &#x2039;
single right-pointing angle quotation mark &rsaquo; &#8250; &#x203A;
euro sign &euro; &#8364; &#x20AC;

How to start automatically several files in Textpad under Win XP (well any good editor )

cmd /c start /max textpad "C:\Temp\Kikkulas\HTML_CHEATSHEET.html"
cmd /c start /max textpad "C:\Temp\Kikkulas\cmdCheatSheet.cmd"
cmd /c start /max textpad "C:\Temp\Kikkulas\PerlCheatSheat.pl"
cmd /c start /max textpad "C:\UTILS\exctract.pl"
cmd /c start /max textpad "C:\Documents and Settings\%userName%\Desktop\Good_Morning.cmd"

2006-12-21

how to check my perl installed modules

#perldoc perllocal OR
#ppm install ExtUtils::Installed save and run this one
#source http://www.cpan.org/misc/cpan-faq.html#How_installed_modules


use ExtUtils::Installed;
my $instmod = ExtUtils::Installed->new();
foreach my $module ($instmod->modules())
{
my $version = $instmod->version($module) || "???";
print "$module -- $version\n";
}

how to send big files via e-mail ?

Well, do not use e-mail use :

http://www.transferbigfiles.com/

Thus , the link stays there for several days and hei you could personally send the link to as many friends of yours as you wish !!!

2006-12-11

If the codes on this page do not work

Is due to the following character entities I am too lazy to find and replace each time when posting

I dont know why the code and pre do not always work here ...
" " quotation mark, apl quote
& & ampersand
< < less-than sign
> > greater-than sign

so mail me and you will get the working codes , thus I will know that somebody is really reading this ; ) ...

perl dnslookup for multiple hosts from input file

use warnings ;
use strict ;
use Socket ;

#usage perlDNSLookUp file , where file is the full path ot any text file containing the domain names of the hosts , which ips you would like to retrieve


my $inputFile = $ARGV[0] ;
my $outputFile = "IpNumbers.txt" ;
open (INPUT, "<$inputFile") or
print "could not open the $inputFile!\n";
my @hosts = <INPUT>;

open (OUTPUT, ">$outputFile") or
print "could not open the $inputFile!\n";


foreach (@hosts )
{
print "$_" , "\n" ;
chomp $_ ;
my $address = gethostbyname("$_") ;
# print gethostbyname($_) , "\n" ;
print $address , "\n" ;
print OUTPUT inet_ntoa($address) , "\n" ;

}



close INPUT;
close OUTPUT;
my $cmd = "$outputFile" ;
`$cmd` ;

2006-12-08

Cool calendar pop-up colontrol - some asp.net + ajax

Guess who is going to make copypaste , pardon code reusability for school project ; )

AJAX ASP.NET POP UP CALENDAR CONTROL BY MIKEPOP !!!!






Killing combination - perl and wmic for information retrieval

use Win32::OLE qw(in with);
use Win32::Registry;

# Pick a host that you have the necessary rights to monitor

$host = "PutHereTheHostsDomainName";

# Gather System Information

$WMI = Win32::OLE->new('WbemScripting.SWbemLocator') ||
die "Cannot access WMI on local machine: ", Win32::OLE->LastError;

$Services = $WMI->ConnectServer($host) ||
die "Cannot access WMI on remote machine: ", Win32::OLE->LastError;

# Gather Computer System Information

$sys_set = $Services->InstancesOf("Win32_ComputerSystem");
foreach $sys (in($sys_set))
{
$system_name = $sys->{'Caption'};
$system_type = $sys->{'SystemType'};
$system_manufacturer = $sys->{'Manufacturer'};
$system_model = $sys->{'Model'};
}

# Gather Processor Information
$processor_set = $Services->InstancesOf("Win32_Processor");
foreach $proc (in($processor_set))
{
$proc_description = $proc->{'Caption'};
$proc_manufacturer = $proc->{'Manufacturer'};
$proc_mhz = $proc->{'CurrentClockSpeed'};
}


# Gather BIOS Information

$bios_set = $Services->InstancesOf("Win32_BIOS");
foreach $bios (in($bios_set))
{
$bios_info = $bios->{'Version'};
}

# Gather Time Zone Information

$loc_set = $Services->InstancesOf("Win32_TimeZone");
foreach $loc (in($loc_set))
{
$loc_timezone = $loc->{'StandardName'};
}

# Gather Operating System Information

$os_set = $Services->InstancesOf("Win32_OperatingSystem");
foreach $os (in($os_set))
{
$os_name = $os->{'Caption'};
$os_version = $os->{'Version'};
$os_manufacturer = $os->{'Manufacturer'};
$os_build = $os->{'BuildNumber'};
$os_directory = $os->{'WindowsDirectory'};
$os_locale = $os->{'Locale'};
$os_totalmem = $os->{'TotalVisibleMemorySize'};
$os_freemem = $os->{'FreePhysicalMemory'};
$os_totalvirtmem = $os->{'TotalVirtualMemorySize'};
$os_freevirtmem = $os->{'FreeVirtualMemory'};
$os_pagefilesize = $os->{'SizeStoredInPagingFiles'};
}

# Now convert the system's Locale to a string
# Use the Rfc1766 Database stored in the Registry as a lookup table

$main::HKEY_LOCAL_MACHINE->Open("SOFTWARE\\Classes\\MIME\\Database\\Rfc1766",$Rfc1766);
$Rfc1766->GetValues(\%Values);
foreach $key (keys %Values)
{
$key = $Values{$key};
if ($$key[0] eq $os_locale)
{
($lang, $country) = split(/\;/, $$key[2]);
last;
}
}

print "System Summary Information\n";
print "--------------------------\n";
print "OS Name\t\t\t\t$os_name\n";
print "Version\t\t\t\t$os_version Build $os_build\n";
print "OS Manufacturer\t\t\t$os_manufacturer\n";
print "System Name\t\t\t$system_name\n";
print "System Manufacturer\t\t$system_manufacturer\n";
print "System Model\t\t\t$system_model\n";
print "System Type\t\t\t$system_type\n";
print "Processor\t\t\t$proc_description $proc_manufacturer ~$proc_mhz Mhz\n";
print "BIOS Version\t\t\t$bios_info\n";
print "Windows Directory\t\t$os_directory\n";
print "Locale\t\t\t\t$country\n";
print "Time Zone\t\t\t$loc_timezone\n";
print "Total Physical Memory\t\t$os_totalmem KB\n";
print "Available Physical Memory\t$os_freemem KB \n";
print "Total Virtual Memory\t\t$os_totalvirtmem KB\n";
print "Available Virtual Memory\t$os_freevirtmem KB\n";
print "Page File Space\t\t\t$os_pagefilesize KB\n";

Sitä sun tätä ; ) WMC Monad

WMIC


Windows services also remotely from the command line :
net stop "PCAnywhere Host Service"
sc \\servername stop schedule
psservice \\computername -u johndoe -p foo stop printer spooler



SET UP PERSONAL SSH SERVER ON WINDOWS BOX










:: IMPROT DAILY REGISTRY SETTINGS TO PCANYWHERE IN ORDER TO RESTORE JUMP TO SETTINS
REG IMPORT C:\Temp\SETTINGS\PCAnywhereGoTo.settings.reg

[HKEY_CURRENT_USER\Software\Symantec\pcAnywhere\CurrentVersion\File Transfer\Jump]
"Master0"="C:\\Temp\\SOMEPATH"
"Master1"="C:\\Temp\\SECONDPATH"
"Slave0"="C:\\Temp\\SOMEPATH"
"Slave1"="C:\\Temp\\SECONDPATH"

MONAD ADVENTURES

get-command
get-command get-service | format-list
Get - me all running services
get-service | where-object { $_.status -eq "Running" }
Get - me all stopped services
get-service | where-object { $_.status -eq "Stopped" }

cmd quoting rules
http://forums.wolfram.com/mathgroup/archive/2006/May/msg00457.html

2006-12-03

Visual Studio 2005 - most ofter used shortcuts

All shortcuts for the English version ; )


Focus Solution Explorer - Ctrl + Alt + F
Close all windows - Alt + W , L
View full screen - Alt + Shift + Enter
Stop Debugging - Shift + F5
Start Debugging - F5
Find string (regex ) in project - Shift + Ctrl + F
Find string in current document ( selection ) - Ctrl + F
Cycle trough pages - Ctrl + Tab
View Class View - Ctrl + Shift + C

ASP.NET browse trough DataSet obj code snipet

foreach(DataTable dt in ds.Tables)
{
foreach(DataRow dr in dt.Rows)
{
foreach(DataColumn dc in dt.Columns)
{
myList.Items.Add(dr[dc].ToString()); //processing

}
} //eof foreach2
} //eof foreach1
//copy paste http://www.codersource.net/

2006-12-01

Opera session links exctractor

<pre>
package getAdd ;
#Purpose to exctract all currently opened pages from an Opera session on Windows XP
#save them in Addresses.txt on the Desktop and Links
use strict ;
use Tie::File ;
use Win32 ;

our $sessionFile = "C:/Documents and Settings/$ENV{USERNAME}/Application Data/Opera/Opera/profile/sessions/autosave.win" ;
our $outputFile = "C:/Documents and Settings/$ENV{USERNAME}/Desktop/Addresses.txt" ;
our ($fileString , @addresses , @out ) = ();
our $outputPage = "C:/Documents and Settings/$ENV{USERNAME}/Desktop/Links.html" ;
#Action
main() ;

sub main
{
parseFile() ;
showAddresses();
`$outputFile`
}

sub parseFile
{
{
local( $/, *FILE ) ;
open (FILE , $sessionFile ) or
die "Cannot find $sessionFile !!! " ;
$fileString = <FILE>; #slurp the whole file into one string !!!
close FILE ;



# $fileString =~ s/((http.*?)\n)+/\$1/ig;
@addresses = ($fileString =~ /(http.*?)\n/gi); # matches,

#copy paste
#http://www.ayni.com/perldoc/perl5.8.0/pod/perlfaq4.html#How-can-I-remove-duplicate-elements-from-a-list-or-array-
my $prev = "not equal to $addresses[0]";
@out = grep($_ ne $prev && ($prev = $_, 1), @addresses);

}
} #eof parseFile


sub showAddresses
{
open (FH , ">$outputFile") or
die "cannot open $outputFile !!! " ;


foreach (@out )
{ chomp ;
print FH "$_" . "\n" ;
}
close FH ;


open (F , ">$outputPage") or
die "cannot open $outputPage!!! " ;
print F "

<html>
<head>

<title>Links</title>
</head>
<body>
<div>" ;


foreach (@out )
{ chomp ;
print F "<a href=\"$_\">$_</a><br/>" ;
}

print F "
</div>
</body>
</html> \n"

}


1 ;


__END__

</pre>

Labels

perl (41) Cheat Sheet (25) how-to (24) windows (14) sql server 2008 (13) linux (12) oracle (12) sql (12) Unix (11) cmd windows batch (10) mssql (10) cmd (9) script (9) textpad (9) netezza (8) sql server 2005 (8) cygwin (7) meta data mssql (7) metadata (7) bash (6) code generation (6) Informatica (5) cheatsheet (5) energy (5) tsql (5) utilities (5) excel (4) future (4) generic (4) html (4) perl modules (4) programs (4) settings (4) sh (4) shortcuts (4) поуки (4) принципи (4) Focus Fusion (3) Solaris (3) cool programs (3) development (3) economy (3) example (3) freeware (3) fusion (3) git cheat sheet (3) logging (3) morphus (3) mssql 2005 (3) nuclear (3) nz (3) parse (3) python (3) sftp (3) sofware development (3) source (3) sqlplus (3) table (3) vim (3) .Net (2) C# (2) China (2) GUI (2) Google (2) GoogleCL (2) Solaris Unix (2) ascii (2) awk (2) batch (2) cas (2) chrome extensions (2) code2html (2) columns (2) configuration (2) conversion (2) duplicates (2) excel shortcuts (2) export (2) file (2) free programs (2) informatica sql repository (2) linux cheat sheet (2) mssql 2008 (2) mysql (2) next big future (2) nsis (2) nz netezza cheat sheet (2) nzsql (2) ora (2) prediction (2) publish (2) release management (2) report (2) security (2) single-click (2) sqlserver 2005 (2) sqlserver 2008 (2) src (2) ssh (2) template (2) tools (2) vba (2) video (2) xlt (2) xml (2) youtube videos (2) *nix (1) .vimrc (1) .virmrc vim settings configs (1) BSD license (1) Bulgaria (1) Dallas (1) Database role (1) Dense plasma focus (1) Deployment (1) ERP (1) ExcelToHtml (1) GD (1) GDP (1) HP-UX (1) Hosting (1) INC (1) IT general (1) ITIL management bullshit-management (1) IZarc (1) Java Web Start (1) JavaScript anchor html jquery (1) Khan Academy (1) LINUX UNIX BASH AND CYGWIN TIPS AND TRICKS (1) Linux Unix rpm cpio build install configure (1) Linux git source build .configure make (1) ListBox (1) MIT HYDROGEN VIRUS (1) OO (1) Obama (1) PowerShell (1) Run-time (1) SDL (1) SIWA (1) SOX (1) Scala (1) Services (1) Stacks (1) SubSonic (1) TED (1) abstractions (1) ansible hosts linux bash (1) ansible linux deployment how-to (1) ansible yum pip python (1) apache (1) apache 2.2 (1) application life cycle (1) architecture (1) archive (1) arguments (1) avatar (1) aws cheat sheet cli (1) aws cli (1) aws cli amazon cheat sheet (1) aws elb (1) backup (1) bash Linux open-ssh ssh ssh_server ssh_client public-private key authentication (1) bash perl search and replace (1) bash stub (1) bin (1) biofuels (1) biology (1) books (1) browser (1) bubblesort (1) bugs (1) build (1) byte (1) cas_sql_dev (1) chennai (1) chrome (1) class (1) claut (1) cmdow (1) code generation sqlserver (1) command (1) command line (1) conf (1) confluence (1) console (1) convert (1) cool programs windows free freeware (1) copy-paste (1) csv (1) ctags (1) current local time (1) cygwin X11 port-forwarding mintty xclock Linux Unix X (1) cygwin bash how-to tips_n_tricks (1) cygwin conf how-to (1) data (1) data types (1) db2 cheat sheet (1) db2 starter ibm bash Linux (1) debt (1) diagram (1) dictionaries (1) digital (1) disk (1) disk space (1) documentation (1) dos (1) dubai (1) e-cars (1) electric cars (1) electricity (1) emulate (1) errors (1) exponents (1) export workflow (1) extract (1) fast export (1) fexp (1) file extension (1) file permissions (1) findtag (1) firewall (1) for loop (1) freaky (1) functions (1) fusion research (1) german (1) git gitlab issues handling system (1) google cli (1) google code (1) google command line interface (1) gpg (1) ha (1) head (1) helsinki (1) history (1) hop or flop (1) host-independant (1) how-to Windows cmd time date datetime (1) ibm db2 cognos installation example db deployment provisioning (1) ideas (1) image (1) informatica oracle sql (1) informatica repo sql workflows sessions file source dir (1) informatica source files etl (1) install (1) isg-pub issue-tracker architecture (1) it management best practices (1) java (1) jump to (1) keyboard shortcuts (1) ksh (1) level (1) linkedin (1) linux bash ansible hosts (1) linux bash commands (1) linux bash how-to shell expansion (1) linux bash shell grep xargs (1) linux bash tips and t ricks (1) linux bash unix cygwin cheatsheet (1) linux bash user accounts password (1) linux bash xargs space (1) linux cheat-sheet (1) linux cheatsheet cheat-sheet revised how-to (1) linux how-to non-root vim (1) linux ssh hosts parallel subshell bash oneliner (1) london (1) make (1) me (1) metacolumn (1) metadata functions (1) metaphonre (1) method (1) model (1) movie (1) multithreaded (1) mysql cheat sheet (1) mysql how-to table datatypes (1) n900 (1) nano (1) neteza (1) netezza bash linux nps (1) netezza nps (1) netezza nps nzsql (1) netezza nz Linux bash (1) netezza nz bash linux (1) netezza nz nzsql sql (1) netezza nzsql database db sizes (1) non-password (1) nord pol (1) nps backup nzsql schema (1) number formatting (1) nz db size (1) nz table count rows (1) nzsql date timestamp compare bigint to_date to_char now (1) on-lier (1) one-liners (1) one-to-many (1) oneliners (1) open (1) open source (1) openrowset (1) openssl (1) oracle PL/SQL (1) oracle Perl perl (1) oracle installation usability (1) oracle number formatting format-model ora-sql oracle (1) oracle templates create table (1) oracle trigger generic autoincrement (1) oracle vbox virtual box cheat sheet (1) oracle virtual box cheat sheet (1) outlook (1) parser (1) password (1) paths (1) perl @INC compile-time run-time (1) perl disk usage administration Linux Unix (1) perl modules configuration management (1) permissions (1) php (1) picasa (1) platform (1) postgreSQL how-to (1) powerShell cmd cygwin mintty.exe terminal (1) ppm (1) predictions (1) prices (1) principles (1) productivity (1) project (1) prompt (1) proxy account (1) public private key (1) publishing (1) putty (1) qt (1) read file (1) registry (1) relationship (1) repository (1) rm (1) scp (1) scripts (1) scsi (1) search and replace (1) sed (1) sendEmail (1) sh stub (1) shortcuts Windows sql developer Oracle (1) sidebar (1) silicon (1) smtp (1) software procurement (1) sofware (1) sort (1) sql script (1) sql_dev (1) sqlcmd (1) sqlite (1) sqlite3 (1) sshd (1) sshd cygwin (1) stackoverflow (1) stored procedure (1) stub (1) stupidity (1) subroutines (1) svn (1) sysinternals (1) tail (1) tar (1) temp table (1) templates (1) teradata (1) terminal (1) test (1) testing (1) theory (1) thorium (1) time (1) tip (1) title (1) tmux .tmux.conf configuration (1) tmux efficiency bash (1) tool (1) ui code prototyping tips and tricks (1) umask Linux Unix bash file permissions chmod (1) url (1) urls (1) user (1) utility (1) utils (1) vb (1) vbox virtual box cheat sheet (1) vim perl regex bash search for string (1) vim recursively hacks (1) vim starter (1) vim-cheat-sheet vim cheat-sheet (1) vimeo (1) visual stuio (1) warsaw (1) wiki (1) wikipedia (1) window (1) windows 7 (1) windows 8 (1) windows programs (1) windows reinstall (1) windows utility batch perl space Windows::Clipboard (1) wisdoms (1) workflow (1) worth-reading (1) wrapper (1) xp_cmdshell (1) xslt (1) youtube (1)

Blog Archive

Translate with Google Translate

My Blog List

VideoBar

This content is not yet available over encrypted connections.