Using GeckoFX instead of .NET WebBrowser Control

GeckoFX is a .NET control, that works similarly to “System.Windows.Forms.WebBrowser” Control, while being cross platform, and offering much more control, it is in my opinion, a great replacement for the “System.Windows.Forms.WebBrowser”.

GeckoFX is based on the same engine as Firefox, the Mozilla Gecko.

This is an example on how to use it in Visual Studio.

This is a great replacement for Forms.WebBrowser control.

Continue reading

PHP StartsWith and EndsWith functions with optional case senstive

It seems that the default PHP library doesn’t have an implementation for functions that tests for the existence of a sub string at the start or end of a larger string, so here they are:

Those functions accept an optional 3rd argument to choose whether to match the string with case sensitive or case insensitive comparison.

By default, the matching will be case sensitive.

Continue reading

Undo your last GIT commit

If you have accidentally added the wrong file or didn’t add an important file to the last commit, you can either reset the last commit completely or just modify the last commit, modifying the last commit should be sufficient if you only need to do some minor modifications, and you are ready with the new changes that you want the files to be committed with, otherwise, you may need to reset the last commit, then continue editing, and later re-committing, .. this article will show you how do both, and how to recover in case of accidentally reseting an important commit.

Continue reading