Brazil goes down, Germany was overwhelming and spectacular.
In tweets and popular media, terms used “Soccer Blitzkrieg”. term known as “blitzkrieg” is a highly mobile form of infantry and armour working in combined arms teams. It is more meaningful to Germans, forces a breakthrough into the enemy’s line of defense through a series of short, fast, powerful attacks. yes this was German tactical and operational methodology during world war II.
In Tuesday GERMANY vs BRAZIL match, same kind of technique was used by Germany team.
That’s why you could see lot of tweets and posts used term blitzkrieg.
Sharukhan tweeted, “GER showed meaning of Blitzkrieg! A series of fast powerful attacks; 1ce in enemy territory, proceed 2 dislocate them using speed & s’prise”. Wall street journal used this term too.
I never heard of this term, if i did then I must never tried getting familiar of what is it. though I read lot about World War I,II. Once it was my favorite topic of interest. I just researched bit more about this technique and wiki articles let me reminds of days in past.
Last few week i worked on data scrapping projects, million of pages need to scrap and later insertion into database. cron jobs were set to process these records and were running for many days. memory management become critical for that project.
In PHP we have two most famous ways to free memory after job is done, set our variables to NULL or free using unset($var). i was unaware of any other way to free memory. i got problems when we run crons, memory goes higher after each iteration on Server and i was unable to control.
Another amazing behavior i observed and i want to share, that in Windows(on my localhost) when program run, program memory goes higher but at the end of iteration due to unset of variable and objects, it return to previous position. I was using memory_get_usage() to get stat and echoed at each iteration. but Linux server was doing different job memory never returned back and get higher after each iteration. even setting ini memory limit to -1 did no trick.
At the end we were thinking of purchasing more RAM to run these Cron jobs successfully. but that time these few lines did the trick I never thought.
//Memory cleanup for long-running scripts.
gc_enable();// Enable Garbage Collector
var_dump(gc_collect_cycles());// # of elements cleaned up
gc_disable();// Disable Garbage Collector
This new Garbage Collection (also known as GC) mechanism is part of PHP 5.3 and can do amazing job when you are on long running script. gc_collect_cycles() will give you count for garbage cleanups. This script will not get you down due to memory shorting. Happy coding!
You want to make secure SSH connection to server, sure you need a client. here i am talking about Putty. PuTTY is an SSH and telnet client, developed originally for the Windows platform. PuTTY is open source software that is available with source code and is developed and supported by a group of volunteers. There a two ways to connect with server using Putty: 1) Long way (which most people use, i don’t) 2) Short way (Persistent connection)
1) Long way
First download putty.
Don’t need to install, just double click screen will appear.
select protocol Enter ‘yourdomain.com’ in the field for ‘Host Name (or IP address)’ and select ‘SSH’ as Protocol and simply press open button.
Accept host key If this is the first time. popup will appear. if you press ‘Yes’ PuTTY will store the key and not ask you this question again.
Enter username and password after this. import thing password will not appear when enter keywords.
2) Short way
You already have downloaded the Putty, just create shortcut of it.
Rename it, right click the shortcut and open properties.
In the ‘Target’ field add “D:\putty.exe username@hostname/”IP address” -pw Your-password” and Press ‘OK’.
Every time you need to connect, open up this shortcut. this will create a persistent connection with server.
I prefer short way, it fast and create persistent connection.