{{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.
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
Great PNG transparent icon finder site - http://www.iconfinder.com/
A great icon finder site: http://www.iconfinder.com/ - Icon Finder.Com
Advantages:
  1. Ability to filter by pixel size (16x16, 24x24, ranges, etc.);
  2. Ability to show the icon with transparent background;
  3. Easy to download, no registration, no forms, no procedures;
  4. Licence filtering - free, commercial.
Programatic HTML automatic selection
A very useful way to programatically select text in your HTML.
Usage as in usage.html.
2 files attached: selectElementContents.js usage.html
selectElementContents.js usage.html
<a class='dms-button' href='#' onclick='selectElementContents($(this).siblings()[0])'><%icon:copy%></a>
Easy way to install the Microsoft Expression Encoder - using the MS WebPI
An easy way to install the Microsoft Expression Encoder (in case you need to process multimedia streams (via C#, etc.) is to simply follow the link http://www.microsoft.com/web/downloads/platform.aspx from where you install the Web Platform Installer - were you select the Microsoft Expression Encoder and it will automatically install the dependencies - Azure, .NET Web Express, etc. And all of it is free and easy.
Simple Dynamic C# Execution
A simple way to execute C# code, without using the Visual Studio is shown in RunCS.cs. Steps:
  1. Compile the code as RunCS.exe;
  2. Create a CS file;
  3. Execute RunCS.exe "my_file.cs" param1 param2
The CS file must contain the following lines, as in Program.cscript.
2 files attached: RunCS.cs Program.cscript
RunCS.cs Program.cscript
//@main MyNameSpace.MyClassName
//@assembly %programfiles%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll
using System;
//@title This is optional, and it will be the window title
//@include ..\\my_dependency_file.cs
using System;
namespace MyNameSpace{
 public class MyClassName{
  public static void Main(string[]args){
    Console.WriteLine(args[0]+" "+args[1]);
  }
 }
}
How to execute remote programs on Windows
Recently I needed to start a program on a remote machine, so I used the following C# code (after adding the System.Management assembly).
1 files attached: Remote.cs
Remote.cs
Tray icon flash on new messages in Outlook
Using the utility class from the previous post I wrote a small utility that is running through all the Outlook accounts and counts all the unread messages from inbox. Once a change is detected, the icon starts blinking, that will stop once you click once with the mouse on it.
Right now it is working for me with two Exchange accounts configured on my Outlook.
Very important note: before importing, you must add the reference to Microsoft.Office.Interop in order to access the Outlook interoperability automation engine.
The code is attached.
1 files attached: OutlookNotification.cs
OutlookNotification.cs