Skip to content

Instantly share code, notes, and snippets.

@xtrmstep
xtrmstep / cleanup-objbin.ps1
Created March 29, 2016 09:02
PowerShell script to delete all \bin and \obj folders
Get-ChildItem .\ -include bin,obj -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
@eyecatchup
eyecatchup / hosts
Last active July 12, 2023 08:53
Disable Skype ads: 1.) Add hosts to your hosts file 2.) Flush DNS resolver cache (ipconfig /flushdns)
# Block Skype ads
127.0.0.1 *.msads.net
127.0.0.1 *.msecn.net
127.0.0.1 *.rad.msn.com
127.0.0.1 a.ads2.msads.net
127.0.0.1 ac3.msn.com
127.0.0.1 ad.doubleclick.net
127.0.0.1 adnexus.net
127.0.0.1 adnxs.com
127.0.0.1 ads1.msn.com
using System;
using System.DirectoryServices;
namespace EmailAddressTest
{
class Program
{
static void Main(string[] args)
{
do
@DamianEdwards
DamianEdwards / Program.cs
Created March 19, 2013 05:54
Demonstrates that SqlDependency notifications can occur concurrently with the command that set them up. This might cause issues in certain cases if the application isn't expecting multiple commands to be executed at the same time.
using System;
using System.Data;
using System.Data.SqlClient;
using System.Threading;
namespace SqlDependencyConcurrency
{
class Program
{
private static readonly string _connectionString = "Data Source=(local);Initial Catalog=Sample;Integrated Security=SSPI;";