Internet future

In insight, news, Uncategorized on October 4, 2010 by e1saman Tagged: , , , ,

Is facebook the new google? If you believe the graphs maybe yes, but another strong argument in favor of  facebook is that new users of facebook are also new to the internet, or as techCrunch puts it Facebook is the web.

How Facebook Can Become Bigger In Five Years Than Google Is Today

Facebook has figured out itsbusiness model, and wants to keep it out of thepublic eye as long as possible. Facebook’s alleged revenue has grown from$275 million in 2008 to$635 million in 2009 to a rumored $2  billion this year, which is much higher than the also-impressive $1.2 billionnumber circulating earlier this year. Let’s pause and reflect for a moment. Facebook is allegedly already earningdouble the revenues Google reported when it filed to go public. For many consumers, Facebook is the Web.

Facebook Ads employ demographic characteristics (Age/ Sex / Location and Interests), which corporate brand managers and television ad buyers have been accustomed to purchasing for half a century. By contrast, Google AdWords target on the intent revealed by search queries, a practice that has seemed odd and new to Madison Avenue for the past decade and frankly has many of them worried for their jobs.

So the question is; is the old ad industry going to win?

Of course the other strong argument is credits

Facebook Credits are poised to be this generation’s American Express: an “affordable luxury” lifestyle brand and credit card with reward programs, frequent flier miles, and other incentives built right in so that the more you use it, the more you earn.  ”Facebook Platinum”, anyone? I would have thought they’d need a better brand name than “Facebook Credits” but then again, I would have thought they’d need a better brand name than “Facebook”.



Awk Script for automatic ssh config file configuration.

In awk, script, ssh, ubuntu on September 18, 2010 by e1saman Tagged: , , , , , , ,

Awk is very powerful, I usually use it in order to parse and modify files. The example that I present here is a script to automatically modify the .ssh/ssh_config file, using only awk;

Here is a script that I build in order to make my life easier by automatically creating the .ssh_config file and configuring jump boxes and tunnels. The logic behind it is very simple, at the BEGIN section it reads the file (.ssh/ssh_config) line by line and stores the keywords (Host,Hostname,HostKeyAlias,Port,ForwardAgent,ForwardX11,ForwardX11Trusted,LocalForward,CheckHostIP,User) in associative arrays. Then is creates another entry with the options that are given with the command line (check the output without arguments) ans then it prints the whole file.


#!/usr/bin/gawk -f

#Status: it adds the host and works
#               1. It does not check if the host already exists.
#          2. the comments are corresponding to the incorrect host
#        ... and more more others :-)

"date" | getline  current_time
close ("date");
"echo ~/.ssh/config" | getline sshfile_d
close("echo ~/.ssh/config");
#printf("%d-%d-1%d-%d", OptionAddHost,  OptionFindMaxPort ,OptionPrintParents,OptionOutput );
if( OptionAddHost==0 &&  OptionFindMaxPort ==0 && OptionPrintParents ==0 && OptionOutput ==0 && OptionPrintGateways==0 && OptionAddParent==0 && sshfile==0)
print ""
print "This script can be used to create hosts in ~/.ssh/config in an easy way:"
print ""
print "-v sshfile : the path to your ssh config file that you want to change. Defalut ~/.ssh/config"
print ""
print ""
print ""
print "-v OptionAddParent :  Add a parent host that will be used to create tunnels to hosts behind a jumb box."
print "         this host will be an alias of tha jumb box, that whenever you ssh to it, it creates tunnels"
print "         to all the child hosts that you can set with the -v OptionAddHost option."
print "         for example a parent for the LIT hosts host1.lit host2.lit  that are behind "
print "        jumbbox can be the following declaration in ~.ssh/config:"
print ""
print "        Host a-lit-tunnels"
print "         HostKeyAlias a-lit"
print "          HostName"
print "          Port 22"
print "          ForwardAgent yes"
print "          ForwardX11 yes"
print "          ForwardX11Trusted yes"
print "          LocalForward 33049 host1.lit:22"
print "          LocalForward 33050 host2.lit:22"
print ""
print "    example : -v OptionAddHost=parentHost@jumbboxip    "
print ""
print ""
print ""
print "-v OptionAddHost:  Add a new host on the config file that is based on a parent host"
print "    example Usage : -v OptionAddHost=newhost1,newhost2@parentHost.   "
print ""

#main process
#print "reading " sshfile
if (sshfile==0) sshfile=sshfile_d;
if ( sshfile!=sshfile_d) {
print "Using a different file than the default" > "/dev/stderr"

while ( (getline < sshfile ) > 0)
#print $0
if($1~/#.*/) #ignore comments
if(debug==1) print $0
if($1~/Host$/) {host=$2; Host[host]=line; if(debug==1) print "Host: "$2;}
if($1~/Hostname$/) {Hostname[host]=$2; };
if($1~/HostKeyAlias$/) {HostKeyAlias[host]=$2};
if($1~/Port$/) {Port[host]=$2};
if($1~/ForwardAgent$/) {ForwardAgent[host]=$2};
if($1~/ForwardX11$/) {ForwardX11[host]=$2};
if($1~/ForwardX11Trusted$/) {ForwardX11Trusted[host]=$2};
if($1~/LocalForward$/) {LocalForwardPortHost[$2]=host;LocalForwardPortRemoteHost[$2]=$3;}
if($1~/CheckHostIP$/)  {CheckHostIP[host]=$2};
if($1~/User$/)  {User[host]=$2};

#print "End reading    "




for ( hport in     LocalForwardPortHost ) {
if(maxPort<hport) {maxPort=hport}
print "max port = " maxPort;


if(split(OptionAddParent,a,"@")!=2) {print "Wrong input! It shoud be -v OptionAddParent parentHost@Gateway" > "/dev/stderr"; exit; }
#Add a host on a known parent
#Get the max port
#for ( hport in     LocalForwardPortHost ) {
#if(maxPort<hport) {maxPort=hport}




#The format of the info is like that: Hostname;parentname

if(split(OptionAddHost,a,"@")!=2) {print "Wrong input! It shoud be -v OptionAddHost host1@parentHost" > "/dev/stderr"; exit; }

#Add a host on a known parent
#Get the max port
for ( hport in     LocalForwardPortHost ) {
if(maxPort<hport) {maxPort=hport}

#Add the host
#print a[1],a[2],maxPort;


if(n<1) {print "Wrong input! It shoud be -v OptionAddHost host1,host2@parentHost" > "/dev/stderr" ; exit; }

for (i=1;i<=n;++i)

print "#Config File that created automatically by ssh-config.nawk on: "  current_time
#check if the parent exists
for (hostgiven in hostgivenArray)
for ( phost in Hostname ) {
#print "Found the parent host: "phost;
maxPort++; #using the next port
hostgivenNodots=c[1]c[2]; #remove the dots from the host that we add, that will be its new local Alias
#print "Host " - Verlockende Angebote. One-way Flüge bei airberlin ab 29 €

#print "Ended"
if (found==0)
print "#Parent host: " phostgiven " is not found in the config file  " > "/dev/stderr"


#try to find the parent (it can be usefull to find orphan hosts)
print "Parent hosts:"
for (host in Hostname)
if(Hostname[host]~/localhost$/) { parent[host]=LocalForwardPortHost[Port[host]];
#print "parent ["host"]="parent[host]","Port[host]","LocalForwardPortHost[Port[host]];
if(parent[host]=="") print host;

print "\n\n\nGateways hosts:"
for (host in Hostname)

if(Hostname[host]~/localhost$/) {}
{ Gateway[Hostname[host]]=host }
for (gtw in Gateway)
print gtw


#insert the comments at the start
#for (cmt in comments)    print "#"cmt;

#for ( host in Hostname )
for (i=1;i<=n;++i)
if(host_s[i]!="" )
#finally check the comments also
if(comments[host_s[i]]) print "#"comments[host_s[i]];
print "Host "host_s[i]
if(Hostname[host_s[i]]) print "Hostname "Hostname[host_s[i]]
if(HostKeyAlias[host_s[i]]) print "HostKeyAlias "HostKeyAlias[host_s[i]]
if(Port[host_s[i]]) print "Port "Port[host_s[i]]
if(CheckHostIP[host_s[i]]) print "CheckHostIP "CheckHostIP[host_s[i]]
if(ForwardAgent[host_s[i]]) print "ForwardAgent "ForwardAgent[host_s[i]]
if(ForwardX11[host_s[i]]) print "ForwardX11 "ForwardX11[host_s[i]]
if(ForwardX11Trusted[host_s[i]]) print "ForwardX11Trusted "ForwardX11Trusted[host_s[i]]
for  ( port in LocalForwardPortHost)
if(LocalForwardPortHost[port]==host_s[i]) print "LocalForward "port" "LocalForwardPortRemoteHost[port] ;
if(User[host_s[i]]) print "User " User[host_s[i]];
print ""
print ""



Defend the Internet

In Uncategorized on September 13, 2010 by e1saman Tagged: , , ,

This is important; ACTA is is a proposed plurilateral agreement for the purpose of establishing international standards on intellectual property rights enforcement.  The problem is that the negotiations are done behind closed doors and there is no transparency on what they decide. We are based on leaks in order to understand what is going on.

“ACTA would create unduly harsh legal standards that do not reflect contemporary principles of democratic government, free market exchange, or civil liberties. Even though the precise terms of ACTA remain undecided, the negotiants’ preliminary documents reveal many troubling aspects of the proposed agreement” such as removing “legal safeguards that protect Internet Service Providers from liability for the actions of their subscribers” Aaron Shaw

Free Software foundation is against the agreement and they demand for the text to be released;


Manual connection to a wifi network.

In manual configuration, technology, ubuntu, wifi, WPA on September 9, 2010 by e1saman Tagged: , , , , ,

It seems that the Network Manager on my ubuntu is not working properly.

I do not have the time to investigate the issue so I have to connect to the network manually with iwconfig.

Here are some good links that can help in situations like that;

If you want to connect to WEP or an open network;

In case you want to connect to WPA networks then you should do a little work;

Good luck!


Ubuntu, update my patience!

In failure, technology, ubuntu, Uncategorized, updates on September 9, 2010 by e1saman

In this life you cannot have everything, you have to choose what you can tolerate and what you cannot.

In this fashion I have chosen to use an open source OS (ubuntu); Controlling my system is really important for me. But sometimes the advantage can turn to disadvantage. Sometimes controlling your system can lead to a great loss of time, and then you have to think out of the box.

For the past six months I faced a lot of problems that ubuntu had with my system (new hardware you see), but what I cannot take any more is failures after updates which happen every single month (at least).
This time for no obvious reason the driver for my network card just broke overnight. But this  time I DO NOT HAVE the patience to investigate, so I tried to restore my backup which takes ages… This is no problem when someone else is paying for your time, but when you are a freelancer then it costs and maybe more than the laptop itself.