steps how to invest your money

1. Follow the money. In today's economic environment you cannot save your way to millionaire status. The first step is to focus on increasing your income in increments and repeating that.

My income was $3,000 a month and nine years later it was $20,000 a month. Start following the money and it will force you to control revenue and see opportunities.

2. Don't show off. Show up! I didn't buy my first luxury watch or car until my businesses and investments were producing multiple secure flows of income. I was still driving a Toyota Camry when I had become a millionaire. Be known for your work ethic, not the trinkets that you buy.

3. Save to invest, don't save to save. The only reason to save money is to invest it. Put your saved money into secured, sacred (untouchable) accounts. Never use these accounts for anything, not even an emergency. This will force you to continue to follow step one (increase income). To this day, at least twice a year, I am broke because I always invest my surpluses into ventures I cannot access.

4. Avoid debt that doesn't pay you. Make it a rule that you never use debt that won't make you money. I borrowed money for a car only because I knew it could increase my income. Rich people use debt to leverage investments and grow cash flows. Poor people use debt to buy things that make rich people richer.

5. Treat money like a jealous lover. Millions wish for financial freedom, but only those that make it a priority have millions. To get rich and stay rich you will have to make it a priority. Money is like a jealous lover. Ignore it and it will ignore you, or worse, it will leave you for someone who makes it a priority.

6. Money doesn't sleep. Money doesn't know about clocks, schedules, or holidays, and you shouldn't either. Money loves people that have a great work ethic. When I was 26 years old, I was in retail and the store I worked at closed at 7 pm. Most times you could find me there at 11 pm making an extra sale. Never try to be the smartest or luckiest person — just make sure you outwork everyone.

7. Poor makes no sense. I have been poor, and it sucks. I have had just enough and that sucks almost as bad. Eliminate any and all ideas that being poor is somehow OK. Bill Gates has said, "If you're born poor, it's not your mistake. But if you die poor, it is your mistake."

8. Get a millionaire mentor. Most of us were brought up middle class or poor and then hold ourselves to the limits and ideas of that group. I have been studying millionaires to duplicate what they did. Get your own personal millionaire mentor and study them. Most rich people are extremely generous with their knowledge and their resources.

9. Get your money to do the heavy lifting. Investing is the Holy Grail in becoming a millionaire and you should make more money off your investments than your work. If you don't have surplus money you won't make investments. The second company I started required a $50,000 investment. That company has paid me back that $50,000 every month for the last 10 years.

My third investment was in real estate, where I started with $350,000, a large part of my net worth at the time. I still own that property today and it continues to provide me with income. Investing is the only reason to do the other steps, and your money must work for you and do your heavy lifting.

10. Shoot for $10 million, not $1 million. The single biggest financial mistake I've made was not thinking big enough. I encourage you to go for more than a million. There is no shortage of money on this planet, only a shortage of people thinking big enough.

Apply these 10 steps and they will make you rich. Steer clear of people that suggest your financial dreams are born of greed. Avoid get-rich-quick schemes, be ethical, never give up, and once you make it, be willing to help others get there too.

DevOps Engineer Role


>> Experience with Unix, Linux and open source software configuration and deployment.
>> Experience as Site Reliability Engineer handling different aspects of a production site like web servers, network issue debugging, good understanding of TCP/IP protocols, DNS, racking and cabling, server configuration and experience working in a 24x7 environment.
>> Experience with Cloud based environments Hadoop, Openstack or Azure and experience supporting production applications in a Cloud environment.
>> Good experience with scripting and automation using Perl, shell , Python or any other scripting languages.
>> Experience with configuration management software like Puppet, Cfengine or bcfg2.
>> Experience with monitoring of Enterprise servers using Nagios, Zabbix etc.
>> Experience with NoSQL environments like Cassandra, Hbase or Mongodb.
>> Basic experience handling databases like Oracle and MySQL and SQL.
>> Experience handling Cisco firewalls and/or Load Balancers would be a plus.
>>
>> -Should have worked in production and Cloud Based environment
>> -Exposure to open source software and scripting automation is mandatory
>> -Should have experience with monitoring and systems administration in Unix
>> -Cloud products like Hadoop, Cassandra , Openstack
>> -Perl/Python or shell scripting
>> -Production experience working in cloud and deployments

python code snippet

http://www.pythonforbeginners.com/code-snippets-source-code/
http://inventwithpython.com/chapter4.html
https://wiki.python.org/moin/SimplePrograms
http://www.ibm.com/developerworks/aix/library/au-python/
http://www.pythonforbeginners.com/code-snippets-source-code/?page=3
http://sysadminpy.com/blog.html
https://developers.google.com/edu/python/

using perl CGI jquery iframe , understanding parallel divs and vhost setting , Ribbon



Use this script on your OWN risk :) .. ( but it works )

this is this Vhost required for perl scripting

<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html
ServerName site2.example.com
ErrorLog logs/site2.example.com-error_log
CustomLog logs/site2.example.com-access_log common


ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/cgi-bin">
        Options +ExecCGI
        AddHandler cgi-script .cgi .pl
</Directory>

</VirtualHost>


-----------------------------------------------------------------------------------------------


#!/usr/bin/perl

use strict;
use warnings;
use Data::Dumper;
use CGI;

my $cgi = new CGI;

my $server_html = '192.168.1.101/test';
my $server = '192.168.1.101/cgi-bin/test.pl';

my %input ;

for my  $key ( $cgi->param() ) {
    $input{$key} = $cgi->param($key);
}

# unhash this for testing
#my %hash_dir_data = (

#            '20-03-2014' => [ 'jenkins_link_20-03-2014-11_21.html','jenkins_link_20-03-2014-11_22.html','jenkins_link_20-03-2014-11_23.html','jenkins_link_20-03-2014-11_24.html'],
#            '21-03-2014' => [ 'jenkins_link_21-03-2014-11_21.html','jenkins_link_21-03-2014-11_22.html','jenkins_link_21-03-2014-11_23.html','jenkins_link_21-03-2014-11_24.html'],
#            '22-03-2014' => [ 'jenkins_link_22-03-2014-11_21.html','jenkins_link_22-03-2014-11_22.html','jenkins_link_22-03-2014-11_23.html','jenkins_link_24-03-2014-11_24.html'],
#            '23-03-2014' => [ 'jenkins_link_23-03-2014-11_21.html','jenkins_link_23-03-2014-11_22.html','jenkins_link_23-03-2014-11_23.html','jenkins_link_23-03-2014-11_24.html'],
#            '24-03-2014' => [ 'jenkins_link_24-03-2014-11_21.html','jenkins_link_24-03-2014-11_22.html','jenkins_link_24-03-2014-11_23.html','jenkins_link_22-03-2014-11_24.html']
#   );


#hash this out for testing
my %hash_dir_data = find_files_data();


html_css_js();



#<span>21-03-2014 </span>
#<a class="Days_list" href="http://www.rapidtables.com/web/tools/linked-page.htm">The Link Text</a>
my $counter = 1;

foreach my $dir ( sort keys %hash_dir_data ) {
   print '<span onclick="return showHide(\''.$counter.'\')" >'.$dir.' </span> ';
   print '<div style="display:none;"  id="Days_list-'. $counter .'"   > ';
   foreach my $Jhtmlfile ( @{$hash_dir_data{$dir}}) {
   #print '<a    style="display:none;" id="Days_list-'. $counter .'"  class="Days_list" href="http://'.$server.'/'.$dir.'/'.$Jhtmlfile .'"> '. $Jhtmlfile .'</a>';
   print '<a  class="Days_list" href="http://'.$server.'?jenkinslink='.$dir.'/'.$Jhtmlfile .'"> '. $Jhtmlfile .'</a>';

    }
   print '</div>';
   $counter++ ;

}

print '</div>';

my $input;


if ( $input{'jenkinslink'} )  {
  html_iframe( $input{'jenkinslink'}, $server_html );

}











sub html_iframe {

my  $jenkinslink = $_[0];

my $server_html = $_[1] ;

print '<div class="myiframedata" >';
#file  FILEAHERE
print '<iframe src="http://'. $server_html .'/'. $jenkinslink.'" scrolling="yes" frameborder="1" marginheight="0px" marginwidth="0px"  >';
print '</iframe>';
print '</div>';

print '</div>';
}





sub html_css_js {
print "Content-type: text/html\n\n";

print   <<'EOF'
<html>
    <head>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
        </script>
        <script>

function showHide(id) {
   $( '#Days_list-'+id ).toggle("slow");
}

        </script>
        <style>

.ListDown {
    float: left;
    left: 0;
    overflow: auto;
    position: relative;
    width: 24%;
    margin-top:3%;
}

.ListDown span {
 background: -moz-linear-gradient(center top , #003366 5%, #003F7F 100%) repeat scroll 0 0 #003366;
    border-color: #000000;
    border-image: none;
    border-style: solid;
    border-width: 0 0 1px 1px;
    color: #FFFFFF;
    display: block;
    font-family: Arial;
    font-size: 9px;
    font-weight: bold;
    padding: 15px;
    text-align: left;
    width: 187px;
    height: 0px;
}

 a.Days_list:link {
   color: Teal;
   background-color: #FFFFFF;
   text-decoration: none;
   target-new: none;
   display: block;
   /*background: -moz-linear-gradient(center top , #003366 5%, #003F7F 100%) repeat scroll 0 0 #003366;*/
    border-color: #000000;
    border-image: none;
    border-style: solid;
    border-width: 0 0 1px 1px;
    color: #FFFFFF;
    display: block;
    font-family: Arial;
    font-size: 9px;
    font-weight: bold;
    padding: 15px;
    text-align: left;
    width: 187px;
    height: 0px;
   color: #0000FF;
   background-color: #FFFFC0;
   text-decoration: underline;
   target-new: window;

  }


.myiframedata {
    float: left;
    overflow: visible;
    padding: 0;
    position: relative;
    right: 1%;
    width: 58%;
    margin-top:3%;
}
.myiframedata iframe {
    border: 13px solid #FFFFFF;
    float: left;
    height: 110%;
    width: 148%;
    margin-top: -16px;
}

.topbar{
   position:fixed;
   top:0;
   left:0;
   width:100%;
   height:28px;
   background-color:black;
    -webkit-box-shadow: #B3B3B3 2px 2px 2px;
    -moz-box-shadow: #B3B3B3 2px 2px 2px;
    box-shadow: #B3B3B3 2px 2px 2px;
    z-index: 1;

}



         </style>
    </head>
    <body>
<div>
<object   class="topbar" data="http://192.168.1.101/ribbon.html" scrolling=no>
<embed  scrolling="no" src="http://192.168.1.101/ribbon.html" > </embed>
</object>



<div class="ListDown" >


EOF



}








sub find_files_data {

my $datapath = '/var/www/html/test';
my %ret_hash_data ;

opendir( FH,  $datapath) or die "cannot open file ";
my @alldir = readdir FH;
close( FH) ;

foreach my $diri (@alldir) {
  next unless  $diri =~ /\d{2}-\d{2}-\d{4}$/;

   opendir ( FRE, $datapath.'/'.$diri) or die "cannot open file $datapath.$diri  $! " ;
   my @J_htmla_files =  readdir FRE;
   close (FRE);

   foreach my $J_files ( @J_htmla_files ) {
        next unless $J_files =~ m/^.*\.html$/;

        push ( @{$ret_hash_data{$diri}}, $J_files ) ;

   }


}

return %ret_hash_data ;


}

-----------------------------------------------------------------------------------------------------

the iframe html file see FILEAHERE

<html>
<head>



<style>

.CSSTableGenerator {
    border: 0px solid #000000;
    border-radius: 0px;
    box-shadow: 10px 10px 5px #888888;
    margin: 74px;
    padding: 0px;
    width: 84%;
    margin: 11;
    -webkit-border-radius: 22px;
    -moz-border-radius: 22px;
    border-radius: 22px;

}
.CSSTableGenerator table {
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0px;
    padding: 0;
    width: 100%;
}


.CSSTableGenerator td {
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    background-color: #CCCCCC;
    border-color: #000000;
    border-image: none;
    border-style: solid;
    border-width: 0 1px 1px 0;
    color: #000000;
    font-family: Arial;
    font-size: 10px;
    font-weight: normal;
    padding: 7px;
    text-align: left;
    vertical-align: middle;
    height: 20px;
}


.CSSTableGenerator span {
    -webkit-border-radius: 22px 22px 0px 0px;-moz-border-radius: 22px 22px 0px 0px;border-radius: 22px 22px 0px 0px;
    background: -moz-linear-gradient(center top , #003366 5%, #003F7F 100%) repeat scroll 0 0 #003366;
    border-color: #000000;
    border-image: none;
    border-style: solid;
    border-width: 0 0 1px 1px;
    color: #FFFFFF;
    font-family: Arial;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    display:block;
    padding: 15px;
}


</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script  >

function showHide(id) {
   $( '#tabledata-'+id ).toggle("slow");
}


</script>
</head>
<body>
    <div class="CSSTableGenerator" >
       <span onclick="return showHide('1')" > I am here to ooooooo </span>
                <table   style="display:none;"   id="tabledata-1"  >
                    <tr >
                        <td> Title 1 i am here </td>
                    </tr >
                    <tr>
                        <td >  Row 1 </td>
                    </tr>
                    <tr>
                        <td >  Row 2 </td>
                    </tr>
                    <tr>
                        <td >  Row 2 </td>
                    </tr>
                    <tr>
                        <td >  Row 3 </td>
                    </tr>
                </table>
            </div>
    <div class="CSSTableGenerator" >
       <span onclick="return showHide('2')" > I am here to ooooooo </span>
                <table  style="display:none;" id="tabledata-2"  >
                    <tr>
                        <td> Title 1 </td>
                    </tr>
                    <tr>
                        <td >  Row 1 </td>
                    </tr>
                    <tr>
                        <td >  Row 2 </td>
                    </tr>
                    <tr>
                        <td >  Row 2 </td>
                    </tr>
                    <tr>
                        <td >  Row 3 </td>
                    </tr>
                </table>
            </div>
    <div class="CSSTableGenerator" >
       <span onclick="return showHide('3')"> I am here to ooooooo </span>
                <table  style="display:none;" id="tabledata-3"  >
                    <tr>
                        <td> Title 1 </td>
                    </tr>
                    <tr>
                        <td >  Row 1 </td>
                    </tr>
                    <tr>
                        <td >  Row 2 </td>
                    </tr>
                    <tr>
                        <td >  Row 2 </td>
                    </tr>
                    <tr>
                        <td >  Row 3 </td>
                    </tr>
                </table>
            </div>
</body>
</html>

--------------------------------------------------------------------------------------------------------------------------------------
header navigation bar  ribbon.html

<style>

#menu_wrap {
    list-style-type: none;
    font-size: smaller;
    margin-top: -14px;
}
.button a {
    cursor: pointer;
    float: left;
    font: 700 13px/100% Arial,Helvetica,sans-serif;
    height: 7px;
    min-width: 36px;
    padding: 10px;
    position: relative;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    font-size: smaller;
}

</style>

<ul id="menu_wrap" class="l_Blue">
    <li class="button"><a href="#">Home</a>
    </li>
    <li class="button"><a href="#">portfolios</a>
    </li>
    <li class="button"><a href="#">Latest Projects</a>
    </li>
    <li class="button"><a href="#">Top Sales</a>
    </li>
    <li class="button"><a href="#">new post</a>
    </li>
    <li class="button"><a href="#">advertise</a>
    </li>
    <li class="button"><a href="#">about us</a>
    </li>
</ul>





--------------------------------------------

collapse div with jquery

<html>
<head>



<style>

.CSSTableGenerator {
    border: 0px solid #000000;
    border-radius: 0px;
    box-shadow: 10px 10px 5px #888888;
    margin: 74px;
    padding: 0px;
    width: 68%;
    margin: 35;
    -webkit-border-radius: 22px;
    -moz-border-radius: 22px;
    border-radius: 22px;

}
.CSSTableGenerator table {
    border-collapse: collapse;
    border-spacing: 0;
    height: 100%;
    margin: 0px;
    padding: 0;
    width: 100%;
}


.CSSTableGenerator td {
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    background-color: #CCCCCC;
    border-color: #000000;
    border-image: none;
    border-style: solid;
    border-width: 0 1px 1px 0;
    color: #000000;
    font-family: Arial;
    font-size: 10px;
    font-weight: normal;
    padding: 7px;
    text-align: left;
    vertical-align: middle;
}


.CSSTableGenerator span {
    -webkit-border-radius: 22px 22px 0px 0px;-moz-border-radius: 22px 22px 0px 0px;border-radius: 22px 22px 0px 0px;
    background: -moz-linear-gradient(center top , #003366 5%, #003F7F 100%) repeat scroll 0 0 #003366;
    border-color: #000000;
    border-image: none;
    border-style: solid;
    border-width: 0 0 1px 1px;
    color: #FFFFFF;
    font-family: Arial;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    display:block;
    padding: 15px;
}


</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script  >

function showHide(id) {
   $( '#tabledata-'+id ).toggle("slow");
}


</script>
</head>
<body>
    <div class="CSSTableGenerator" >
       <span onclick="return showHide('1')" > I am here to ooooooo </span>
                <table   style="display:none;"   id="tabledata-1"  >
                    <tr >
                        <td> Title 1 i am here </td>
                    </tr >
                    <tr>
                        <td >  Row 1 </td>
                    </tr>
                    <tr>
                        <td >  Row 2 </td>
                    </tr>
                    <tr>
                        <td >  Row 2 </td>
                    </tr>
                    <tr>
                        <td >  Row 3 </td>
                    </tr>
                </table>
            </div>
    <div class="CSSTableGenerator" >
       <span onclick="return showHide('2')" > I am here to ooooooo </span>
                <table  style="display:none;" id="tabledata-2"  >
                    <tr>
                        <td> Title 1 </td>
                    </tr>
                    <tr>
                        <td >  Row 1 </td>
                    </tr>
                    <tr>
                        <td >  Row 2 </td>
                    </tr>
                    <tr>
                        <td >  Row 2 </td>
                    </tr>
                    <tr>
                        <td >  Row 3 </td>
                    </tr>
                </table>
            </div>
    <div class="CSSTableGenerator" >
       <span onclick="return showHide('3')"> I am here to ooooooo </span>
                <table  style="display:none;" id="tabledata-3"  >
                    <tr>
                        <td> Title 1 </td>
                    </tr>
                    <tr>
                        <td >  Row 1 </td>
                    </tr>
                    <tr>
                        <td >  Row 2 </td>
                    </tr>
                    <tr>
                        <td >  Row 2 </td>
                    </tr>
                    <tr>
                        <td >  Row 3 </td>
                    </tr>
                </table>
            </div>
</body>
</html>

python : creating a snapshot program


snapshot.py
-------------------------------------------------------
#!/bin/env python


import sys, os, snapshothelper


def menu ():
    os.system("clear")
    print '''DIRECTORY/FILE COMPARISON TOOL
    ====================================
    Please type a number and press enter:
    1. Create a snapshot
    2. List snapshot files
    3. Compare snapshots
    4. Help
    5. Exit
    '''

    choice = raw_input("\t")
    return choice


choice = ""
while choice != 5 :
    choice = menu()
    if choice == "1" :
        os.system('clear')
        print '''CREATE SNAPSHOT
        ===================================='''
        directory = raw_input("Enter the directory name to create snapshort of :  ")

        filename = raw_input("enter the name of the snaphort file to create :  ")
        snapshothelper.createSnapshot(directory, filename)

    elif choice == "2" :
        os.system("clear")
        print '''
        LIST SNAPSHOT FILES
        ====================================
        Enter the file extension for your snapshot files
        (for example, ‘snp’ if your files end in ‘.snp’):
        '''
        extension = raw_input('\t\t')
        snapshothelper.listSnapshot(extension)

    elif choice == "3":
        os.system('clear')
        print '''
        COMPARE SNAPSHOTS
        ====================================
        '''

        snap1 = raw_input("Enter the filename of snapshot 1: ")
        snap2 = raw_input("Enter the filename of snapshot 2: ")
        snapshothelper.compareSnapshots(snap1, snap2)

    elif choice == "4":
         snapshothelper.showHelp()
    else :
        if choice != "5":
            snapshothelper.invalid
---------------------------------------------------------------------------------------------------------

snapshothelper.py

#!/bin/env python

import os, sys, pickle, difflib

def createSnapshot(directory,filename) :
    cumulative_directories = []
    cumulative_files = []

    for root, dirs, files in os.walk(directory):
        cumulative_directories = cumulative_directories + dirs
        cumulative_files = cumulative_files + files

    try:
        output = open(filename, 'wb')
        pickle.dump(cumulative_directories,output, -1)
        pickle.dump(cumulative_files,output, -1)
        output.close
    except:
        print "error encounterd trying to save file "

    raw_input("press ENTER to continue")
    return

def listSnapshot(extention):
    snaplist= []
    filelist = os.listdir(os.curdir)
    for item in filelist:
        if item.endswith(extention):
            snaplist.append(item)

    print '''
    Snapshot list
    ===============================
    '''
    print(snaplist)
    raw_input("Press ENTER to continue")
    return

def compareSnapshots(snap1, snap2):

    try:
        pickle1_file = open(snap1, 'rb')
        dirs1 = pickle.load(pickle1_file)
        files1 = pickle.load(pickle1_file)
        pickle1_file.close()

        pickle2_file = open(snap2, 'rb')
        dirs2 = pickle.load(pickle2_file)
        files2 = pickle.load(pickle2_file)
        pickle2_file.close()

    except:
        print "problems incurred accessing snapshot files"
        raw_input("Press ENTER to continue ")
        return

    result_dirs = list(difflib.unified_diff(dirs1, dirs2))
    result_files = list(difflib.unified_diff(files1, files2))


    added_files = []
    removed_files = []
    added_dirs = []
    removed_dirs = []

    for result in result_dirs:
        if result.find("\n") == -1 :
            if result.startswith("+"):
                res_add = result.strip("+")
                added_dirs.append(res_add)
            if result.startswith("-"):
                res_remvd = result.strip("-")
                removed_dirs.append(res_remvd)


    for result in result_files:
        if result.find("\n") == -1 :
            if result.startswith("+"):
                res_add = result.strip("+")
                added_files.append(res_add)
            if result.startswith("-"):
                res_remvd = result.strip("-")
                removed_files.append(res_remvd)


    print "\n\n Added directories are :\n "
    printList(added_dirs)

    print "\n\n Removed directories are :\n "
    printList(removed_dirs)

    print "\n\n Added files are :\n "
    printList(added_files)

    print "\n\n Removed files  are :\n "
    printList(removed_files)


    raw_input("Press ENTER to continue ")
    return

def printList(item):
    if not  item:
        print "No datafound"
        return

    for ite in item:
        print "\t" + ite


def invalidChoice():
    sys.stderr.write("INVALID CHOICE, TRY AGAIN!")
    raw_input("\n\nPress [Enter] to continue...")
    return

Other Articles

Enter your email address: