{{error}}
{{(quickSearchResults.length>10)?'10+':(quickSearchResults.length)}} {{(quickSearchResults.length==1)?'result':'results'}}
{{result.title}} {{result.timeStamp | mysql2ymd }}
I am sorry, no such article was written yet.
Easy tool to query for IP details http://whois.net/ip-address-lookup/[IP_VALUE]
Often I was in need to know who is accessing my site. Aside the IP, I needed further information (like country or company owning the IP), and I found the following site very useful: http://whois.net/ip-address-lookup/[IP_VALUE] link.
Sorescu.EU SSL enabled - and how to enable SSL using cPanel for all subdomains
Steps (yes - it works out-of-box with Windows, you Linux geeks!):
  1. First step would be to buy a wildcard certificate, in my case being wildcard.sorescu.eu.pfx; this file should contain both, the private and the public key;
  2. Extract the key from the PFX: openssl pkcs12 -in wildcard.sorescu.eu.pfx -nocerts -out sorescu.eu.key; attention - you must know from before the password to be able to open the PFX; you will also be promted to enter the PEM pass phrase - which you should put it of a different value;
  3. Ensure that sorescu.eu.key was generated;
  4. Decrypt the key by running openssl rsa -in sorescu.eu.key -out sorescu.eu.decrypted.key;
  5. Ensure that sorescu.eu.decrypted.key got created;
  6. IMPORTANT! Now you need to generate the actual certificate, by running openssl pkcs12 -in sorescu.eu.pfx -clcerts -nokeys -out sorescu.eu.crt;
  7. Check that sorescu.eu.crt file got created;
  8. Generate the PEM file using openssl pkcs12 -in wildcard.sorescu.eu.pfx -cacerts -nokeys -out cabundle.pem; sincerely I don't understand much from this extension, only that it seems to contain the certification chain of the certificate;
  9. Check that the PEM file is created;
  10. Inside the cPanel open the SSL section;
  11. Go to Certificates (CRT);
  12. Once you install the CRT, you get a message similar to Installed Certificates for the domain(s): *.sorescu.eu (auto-detected);
  13. From the SSL home page in cPanel go to Activate SSL on Your Web Site (HTTPS);
  14. In the Certificate (CRT), Key (KEY), Ca Bundle (CABUNDLE) paste the text contents of the following files: sorescu.eu.crt, sorescu.eu.key, cabundle.pem;
  15. Open the web page.
I want to thank to http://www.mickgenie.com/cpanel-how-to-install-ssl-with-pfx-file/ for figuring me out how manage it.
Please also see below:
Sorescu technical Knowledge Base now supports OSSD fast search in Google Chrome
Now, once you visited KB.Sorescu.EU for the first time, you may instantly search the site via the Chrome's search extensions just by typing K, B, and [TAB] followed by your search query.
An example is below:

The technology used is OSSD Open Search standard; implementation has been done in two steps:
  • The home file contains the link to the OSSD file;
  • The second step was to supply the browser with the OSSD file.
Have a nice browsing experience!
2 files attached: header.html OSSD.xml
header.html
<link title="Sorescu KB" type="application/opensearchdescription+xml" rel="search" href="http://kb.sorescu.eu/ossd"/>
OSSD.xml
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
	<ShortName>Sorescu KB</ShortName>
	<Description>Sorescu technical knowledge base</Description>
	<InputEncoding>UTF-8</InputEncoding>
	<Image height="16" width="16" type="image/x-icon">http://kb.sorescu.eu/favicon.ico</Image>
	<Url type="text/html" template="http://kb.sorescu.eu/search/{searchTerms}"/>
</OpenSearchDescription>
Google Maps zoom control and other events - list for dummies
http://gmaps-samples-v3.googlecode.com/svn/trunk/map_events/map_events.html
Or, how to check if the Google Map zoom changed in your page.
An example of using it is attached.
1 files attached: googleMapsListener.js
googleMapsListener.js
google.maps.event.addListener(map,'bounds_changed',function(){
				alert('Tada - '+map.getBounds());
			});
Light easy to use open web fonts - and how to use them
A great collection of web fonts found on: http://www.google.com/webfonts.
The usage of such fonts is very easy, as in example.
1 files attached: GoogleWebFonts.css
GoogleWebFonts.css
@import url(http://fonts.googleapis.com/css?family=Crafty+Girls|La+Belle+Aurore|Rock+Salt);
*{
	font-size:10px;
	font-family:"Rock Salt";
}
.dms-button{
	font-family:"Crafty girls";
}
Annoying issue with PHP $_GET replacing the dots in variable names
The PHP replaces certain characters (among which dots, spaces, and square brakets) in the $_GET field names.
Personally I am strongly against pre-processing such information without a strong ground. The ground, the same with the well-known magic quotes workaround is to ameliorate the developer's life in using the parameters in a safer and easier way.
However, the effect is that in order to use any kind of variable name the developer needs to patch the patch.
The idea is that before using the $_GET variables they have to be corrected:
  1. clear the old keys;
  2. replace them with the correct key.
But now, another issue appeared in the PHP LightOpenID implementation, where the constructor strongly relies on this workaround.
Also this had to be fixed now.
2 files attached: PhpArgumentsFix.php LightOpenIdFix.php
PhpArgumentsFix.php
{// Fix because $_GET replaces var name ., underscore, space, etc. to "_" FIX:F1301041743
	foreach($_GET as $k=>$v)
		unset($_GET[$k]);
	$get=explode('&',$_SERVER['QUERY_STRING']);
	foreach($get as $kv){
		if(!@strlen($kv))
			continue;
		$kv=explode('=',$kv);
		$k=urldecode($kv[0]);
		$v=@urldecode($kv[1]);
		$_GET[$k]=$v;
	}
}//EOFIX:F1301041743
LightOpenIdFix.php
//FIX:F1301041743
		foreach($this->data as $k=>$v){
			$this->data[str_replace(".","_",$k)]=$v;
		}
		//EOFIX:F1301041743
jQuery - adding custom selectors
A trick for jQuery on how to add custom made selectors (I needed case insensitive CONTAINS selector).
Example:
$("td:icontains('IE9')").prepend(icon('ie'));

Credentials go to http://css-tricks.com/snippets/jquery/make-jquery-contains-case-insensitive/ from where I found it.
1 files attached: jQuerySelector.js
jQuerySelector.js
Google Chrome extension to dynamically manipulate pages
How to make a small ad-hoc extension that manipulates dynamically pages every time they get loaded.
Their utility might be (but not limited to) autologin, GUI augmentation, manipulation, reformatting.
  1. Create a folder on disk (as an example, "E:\ChromePlugin\");
  2. Create a manifest.json file;
  3. Copy one JS utility (like jquery-1.8.2.js to the folder);
  4. Add an icon file (let's call it icon.png) to the folder (check http://kb.sorescu.eu/article/121107093243/Great-PNG-transparent-icon-finder-site-http-www.iconfinder.com- to find nice icons);
  5. Create the script file (let's call it script.js);
  6. Add the extension: Google Chrome > Wrench > Extensions > tick the "Developer mode" > click "Load unpacked extension" and select the folder ("E:\ChromePlugin\");
  7. Make available via HTTP (preferably HTTPS if you want to avoid some minor issues) the dynamic file (let's call it ChromeExtension.js);
  8. Attention, the jquery-1.8.2.js script mentioned in the manifest.json file won't be available in the context of http://localhost:81/js/ChromeExtension.js.
The manifest.json file contents should be as in manifest.json
The script.js is file the script that is actually launched every time a page loads. The ChromeExtension.js file contents is as attached.
3 files attached: manifest.json script.js ChromeExtension.js
manifest.json
{
	"manifest_version":2, 
	"name": "Hello World!", 
	"content_scripts":[
		{
			"matches":["*://*/*"],
			"js":["jquery-1.8.2.js","script.js"]
		}
	],
	"version":"1.0",
	"description": "My first Chrome extension.",
	"browser_action":
	{
		"default_icon": "icon.png",
	}
}
script.js
jQuery.getScript("http://localhost:81/js/ChromeExtension.js", function(data, textStatus, jqxhr){
}).fail(function(x){
	//alert("http://localhost/js/ChromeExtension.js could not be loaded");
});
ChromeExtension.js
// the jquery.js dump: (function(a,b){fu...
if(window.location=='www.erepublik.com'){
	// my actions
}
if(window.location.host.match(/^projects.*/)){
	// my TOP-SECRET work-related tweaking and bypassing applications
}
if(window.location=='http://betalogin.mdmconsole.com/#Login'){
	$("input#email").val("MY_SECRET_USER");
	$("input#password").val("MY_SECRET_PASSWORD");
	$("#ext-gen20").click();
}
Small utility that types unique values from keyboard just by a hot key stroke
A short utility that types the current time stamp from keyboard (anywhere on desktop). I developed it because I was bored on typing all the times unique values while testing applications.
Executing the program is simple:
start RunCS TypeTimeStamp.cs

This program does the following:
  • When pressing CTRL-INS, the application will type the date in YYMMDDHHmmss format;
  • When pressing CTRL-SHIFT-INS, the application will type the date in YYMMDDHHmmssqq format;
  • When pressing CTRL-SHIFT-ALT-INS, the application will quit;
1 files attached: TypeTimestamp.cscript
TypeTimestamp.cscript
RunCS with two new features - identification of default .NET runtime and compilation check
A new version of RunCS with the following features.
2 files attached: Header.cs RunCS.cs
Header.cs
/// v1212050857-1: @assembly %RunCSLib% refers to the .NET main assembly's libraries folder
    /// v1212050857-2: Usage: RunCS [-no-run] <file.cs> [<params>]
RunCS.cs