How to register a global hotkey for your application in C#

How to register a global hotkey for your application in C#

Register a hotkey for your application that can be triggered even if your form is minimized and does not have focus. More »

How to download a file in C# (progressbar and download speed)

How to download a file in C# (progressbar and download speed)

Learn how to download files in C# while displaying the percentage and the download speed. More »

UDP hole punching implementation in C#

UDP hole punching implementation in C#

Learn how to implement UDP hole punching so you can make your clients life a lot easier by not forcing them to open ports on their end. More »

 

How to get your IP in C#

There are two ways of getting your IP address in C#. One of them is by using the methods provided by the .NET framework and the other one by using a third party api.

What is the difference you might ask. The answer is fairly simple. There are two kinds of IP’s, internal IP’s and external IP’s. Sadly the .NET framework methods are not able to retrieve the external IP if the computer is not directly connected to the internet (no router or any other similar devices). Since this limitation exists there is only one option if you wish to get the external IP, and this is by using an online service.

I’ve constructed two methods below. One uses only the .NET framework methods but is not 100% accurate when trying to retrieve the external IP (requires the system to be directly connected to the internet). The second method uses an online service which should have fairly accurate results as long as the service is online and the computer is not behind a proxy.

Method 1
LINQ approach

Non-LINQ approach (for .NET framework versions before 3.5)

Method 2

Share on FacebookTweet about this on TwitterShare on Google+Share on StumbleUponShare on LinkedInShare on RedditPin on PinterestShare on TumblrDigg thisPrint this pageEmail this to someone

Bypass the Internet Explorer 10 requirement for Visual Studio 2013

Since the release of Visual Studio 2013 there have been some complains about one of the requirements in particular. Some versions of Visual Studio 2013 require Internet Explorer 10 to be installed or else the installation refuses to continue. For users that for some reasons they can’t, or simply don’t want to install Internet Explorer 10 on their system this might pose a big problem as they won’t be able to upgrade to the latest version of Visual Studio.

Luckily a user managed to find a workaround that can be used till Microsoft manages to find a way to remove this requirement. The workaround basically tricks the installer into thinking that you already have Internet Explorer 10 installed on your system, therefore allowing the installer to resume the installation.

Simply paste the following lines in a file and save it as .bat. Then simply run it. After that the registry entries should be modified and you can continue the installation of Visual Studio 2013 as you normally would, this time without the Internet Explorer 10 requirement error.

Note that since this alters the registry entries under HKEY_LOCAL_MACHINE you might need administration rights. So make sure that the .bat file you created is run as admin.

If you are having issues creating the .bat file I’ve attached it below for you.

Download

Share on FacebookTweet about this on TwitterShare on Google+Share on StumbleUponShare on LinkedInShare on RedditPin on PinterestShare on TumblrDigg thisPrint this pageEmail this to someone

Eazfuscator.NET free version

Eazfuscator.NET is one of the more popular obfuscators for .NET platform.

In June 29, 2012 the authors of the software decided to take the commercial route therefore not offering Eazfuscator.NET for free anymore. Since they decided to remove all the older versions from their website I decided to host the last free version they offered, which is Eazfuscator.Net 3.3.161 in case people can’t find a working link of the software anymore.

Keep in mind since this isn’t the latest release a few features are not present, such as the support for .NET Framework 4.5. If you wish to take advantage of the latest features then you will probably need to consider paying for the latest version or seeking for another (possibly free) obfuscator which offers the same features.

You can download Eazfuscator.Net 3.3.161 below.

Download

Share on FacebookTweet about this on TwitterShare on Google+Share on StumbleUponShare on LinkedInShare on RedditPin on PinterestShare on TumblrDigg thisPrint this pageEmail this to someone

How to watch streams on VLC

The majority of the popular stream services such as Twitch.tv, Justin.tv, GOMTV.net, etc, display their streams through the flash plugin. Because of that a lot of users might experience high CPU usage generated by the flash plugin as well as causing the stream to lag more because of the overhead that is created.

Thankfully there is a way to watch those streams directly in your VLC player with the use of Livestreamer.

Livestreamer currently supports the following services:

NameLiveVODNotes
Aliez.tvYesNo 
Azubu.tvYesNo 
Cast3D.tvYesYes 
DailymotionYesNo 
Euronews.comYesNo 
Filmon.comYesYesOnly SD (HD requires authentication)
FreedocastYesNo 
GOMTV.netYesYesRequires authentication.
Hashd.tvYesYes 
ILiveYes 
LivestationYes 
LivestreamYesBoth new and old site supported.
MipsYes 
Owncast.meYes 
SVT PlayYesYesVideos may be geo-restricted to Sweden.
Twitch/Justin.tvYesYesPossible to authenticate for access to protected streams.
UStream TVYesYes 
Veetle.comYesYes 
Weeb.tvYesRequires rtmpdump with K-S-V patches.
YouTubeYesYes 
YYCastYes 

The usage of Livestreamer is fairly easy. First you will need the link of the stream you would like to watch. Example: twitch.tv/<streamer id>

Then we need to find which, if any, streams are available, this is done by passing the stream link to Livestreamer as follows.
livestreamer.exe twitch.tv/<streamer id>

The above example will output the streams that are available to watch, assuming the stream link is valid and currently live. The output will be something similar to this if the above requirements are met:

The part we are interested about are the “available streams”. Assuming available streams are found we can simply execute Livestreamer again with the link and the quality you want to watch as parameters.

Example:
livestreamer.exe twitch.tv/<streamer id> mobile_high

Alternative you can use the words in the parenthesis (best/worst etc).

And there you have it. Livestreamer should then launch VLC for you and start displaying the stream.

Note: Keep in mind that by viewing the streams through VLC you will not receive any ads the streamers will play. If you wish to support the streamers please consider running the stream on a separate browser in the background with the lowest quality while setting it on mute so it won’t bother you while still supporting your favorite streamers.

You can download the current latest version of Livestreamer below.

Download

Share on FacebookTweet about this on TwitterShare on Google+Share on StumbleUponShare on LinkedInShare on RedditPin on PinterestShare on TumblrDigg thisPrint this pageEmail this to someone

How to disable WordPress automatic updates

As of WordPress 3.7 and upwards WordPress will now check and install updates automatically. This feature is on by default and only applies to minor versions and not the major ones.

If you wish to have full control over when to update your WordPress installation then it would be wise to disable the automatic installation of the new updates. This way you will still get notified when an update is available to download but it won’t be installed automatically.

There are two methods to disable WordPress automatic update feature.

Method 1 (Recommended)
Edit your wp-config.php file and add the following line.

Method 2 (Advanced)
Make use of the automatic_updater_disabled and/or auto_update_core WordPress filters.

Share on FacebookTweet about this on TwitterShare on Google+Share on StumbleUponShare on LinkedInShare on RedditPin on PinterestShare on TumblrDigg thisPrint this pageEmail this to someone