Skip to content

Instantly share code, notes, and snippets.

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;
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
@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
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 / 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

@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 / 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
{
public static class MethodInfoExtensions
{
/// <summary>
/// Return the method signature as a string.
/// </summary>
///
/// <param name="property">
/// The property to act on.
/// </param>
///

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

@kellyelton
kellyelton / global_area.php
Created December 18, 2014 19:55
ConcreteSnippit
public function display() {
$c = Page::getCurrentPage();
if(!$c->cID)
{
$c = Page::getByPath("/page_not_found");
if(!$c->cID)
echo "1";
}
parent::getOrCreate($c, $this->arHandle, 1);
parent::display($c);