Skip to content

Instantly share code, notes, and snippets.

How to Pull Request

We will only accept pull requests if they're in they follow our specific guidelines, so please follow this guide in order to submit a pull request to us.

Sign the CLA

We absolutely will no accept any new code unless you sign our CLA

What Are You Trying to Contribute

public static class MethodInfoExtensions
{
/// <summary>
/// Return the method signature as a string.
/// </summary>
///
/// <param name="property">
/// The property to act on.
/// </param>
///
@kellyelton
kellyelton / ClickSoundService.cs
Last active December 16, 2015 17:05
MouseClick Drum
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using System.Windows.Media;
namespace DevTools.Services
{
@kellyelton
kellyelton / gist:7307752
Created November 4, 2013 19:18
SingletonTemplate
#region Singleton
internal static $name$ SingletonContext { get; set; }
private static readonly object $name$SingletonLocker = new object();
public static $name$ Instance
{
get
{
@kellyelton
kellyelton / taco.md
Last active February 29, 2016 20:33

prosecutor: "On the night of Aug 25, 2015, what operating system were you using?"

defendant: "...uhh...ww...windows..."

prosecutor: "WHICH windows"

defendant: mumbles "xp"

image

public static void Main(string[] args){
var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "tester.txt");
using(var eve = new AutoResetEvent(false))
using(var file = new FileStream(path, FileMode.Create, FileAccess.ReadWrite, FileShare.Delete)){
Task.Run(()=>{
File.Delete(path);
if(File.Exists(path))
Console.WriteLine("File Exists");
eve.Set();
});
@kellyelton
kellyelton / ProcessWatcher.cs
Last active February 21, 2017 21:22
Watches for new processes to be run and fires an event when they are.
using System;
using System.Management;
using System.Threading;
namespace KellyElton.Components
{
/// <summary>
/// Watches for new processes to be run and fires an event when they are.
/// </summary>
public class ProcessWatcher : IDisposable
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions -EnableShowFullPathInTitleBar
Disable-BingSearch
Install-WindowsUpdate
Enable-RemoteDesktop
Set-TaskbarOptions -Size Small -Lock -Dock Right -Combine Never
cinst msysgit
cinst tortoisegit
cinst poshgit
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
@kellyelton
kellyelton / CLA.md
Last active October 3, 2017 13:32
CLA

Harmony Individual Contributor License Agreement

Thank you for your interest in contributing to OCTGN ("We" or "Us").

This contributor agreement ("Agreement") documents the rights granted by contributors to Us. This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.

1. Definitions

  • "You" means the individual who Submits a Contribution to Us.