Skip to content

Instantly share code, notes, and snippets.

View motowilliams's full-sized avatar

Eric Williams motowilliams

View GitHub Profile
@motowilliams
motowilliams / CleanHostHeaders.cs
Created March 13, 2014 15:57
Returns the first segment past known TlDs
/// <summary>
/// Returns the first segment past known TLDs
/// </summary>
/// <param name="uri">Source Uri</param>
/// <param name="tlds">http://data.iana.org/TLD/tlds-alpha-by-domain.txt</param>
/// <returns>Target Uri</returns>
private static Uri CleanHostHeaders(Uri uri, IEnumerable<string> tlds)
{
// IANA currently has the list upper case
string host = uri.Host.ToUpper();
@motowilliams
motowilliams / DownloadVSGitIgnore.ps1
Last active February 28, 2016 19:43
Download VS .gitignore from GitHub via Powershell
(new-object System.Net.WebClient).Downloadfile("https://raw.github.com/github/gitignore/master/VisualStudio.gitignore", "$pwd\.gitignore")
@motowilliams
motowilliams / gist:7393954
Last active December 27, 2015 21:49
ASP.NET web server base vm (first boot)
cinst IIS-WebServerRole -source windowsfeatures
cinst IIS-ASPNET -source windowsfeatures
cinst IIS-HttpErrors -source windowsfeatures
cinst IIS-HttpRedirect -source windowsfeatures
cinst IIS-HttpLogging -source windowsfeatures
cinst IIS-WebServerManagementTools -source windowsfeatures
cinst IIS-WindowsAuthentication -source windowsfeatures
cinst IIS-BasicAuthentication -source windowsfeatures
cinst IIS-CustomLogging -source windowsfeatures
@motowilliams
motowilliams / Repo.md
Created August 30, 2013 02:36
Submitting Feedback & Bugs To Jetbrains (╯°□°)╯︵ ┻━┻

We already don't like your feedback system

##Fiddler Request##

POST /xmlrpc HTTP/1.1 Content-Type: text/xml User-Agent: XML-RPC.NET Host: easervice.jetbrains.net

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAp4AAAG2CAYAAADWYYZVAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAGcGSURBVHhe7b17tC3Ffd/Z+S+TZJI1a2atZNaKH5Idy0kcTZDFWZksK8oEL8sjZxLFkXhorMuRJSHZCpZkC8nAYjzjAEdKIkDIGg8YCZBAAo4UB+uCeEiIl0C8zoV7eT/E48IF7pP74nGBW1O/6q7ev66u6u59zu59+pz9+a31Wbu76le/qvp1767v6d57n8wou/SyK8xb3vYrFb5+8TfN3/+5t5iXXnqp5Iv/5atFi9x03Z8unFOUYhiGYRiGYbNmogW1NhTz2hHhiWEYhmEYhk3MEJ4YhmEYhmHYVAzhiWEYhmEYhk3FEJ4YhmEYhmHYVAzhiWEYhmEYhk3FEJ4YhmEYhmHYVGzNCM/Dhw8DAAAAwARYLRu88AwT9eabbzreeOMN8/rrr1c4dOgQAAAAwEwT6iPRTF4/hbpq2jZY4RkmJhSbr732muOVV14xL7/8MgAAAAAoRCN5vRSK0FBnTcsGKTx1IrxC92LTC80DBw6Y/fv3m3379pm9e/c6dF8AAAAAs4jXRaKRRCuJZtJCVDSV11dac03DBic8dQIkIaLM5baxJOvgwYMugRJr9+7dZufOnWbHjh3mxRdfLHnhhRcAAAAAZhKtiUQjiVYSzSTaSTSUaCnRVKKtYnc/+7bBCs/wLqcXnJLA559/3mzdutU89dRT5qc//al5/PHHzWOPPQYAAAAAFtFGTz75pHnmmWfMc88954Torl27nJYSTRXe/ZxJ4RkTnXJrWG4VS7JEcEoSH374YXPfffeZe+65x9x5553mJz/5ibn99ttLbrvttso+AAAAwCwh+kh00ubNm81DDz3k9NOzzz5rtm/f7u6AivgUjTVt8dlZeH7LCs+3vu2fVLjQCs+f6Ul4+sfr
@motowilliams
motowilliams / ActivityLog.xml
Created August 26, 2013 17:37
Web Essentials?
<?xml version="1.0" encoding="utf-16"?>
<?xml-stylesheet type="text/xsl" href="ActivityLog.xsl"?>
<activity>
<entry>
<record>1</record>
<time>2013/08/26 17:21:28.036</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Microsoft Visual Studio 2012 version: 11.0.60610.1</description>
</entry>
@motowilliams
motowilliams / executify.csx
Last active December 20, 2015 22:09
HelloGist.cs » executify.com
Console.WriteLine("Hello Gist World");

Parts

  • 1 » 10' stick schedule 40 1/2" PVC
  • 1 » 1 1/4" slip connector
  • 1 » 1 1/2" slip Tee
  • 1 » 1/2" adapter, slip and internal thread
  • 1 » 1/2" adapter, slip and external thread
  • 1 » 1" min diameter hose clamp
  • 8 » 8" zip ties
  • 1 » 3' rope/twine
  • 1 » tire (schrader) valve
#!/bin/sh
sudo apt-get update
sudo apt-get -y install python-virtualenv
sudo pip install Flask
@motowilliams
motowilliams / WhatChaGonnaDo
Created April 30, 2013 22:22
Created branch from feature01 instead of master
sitting on feature01 - all commited, no changes
started to work another problem
better create a branch for this
- git branch -b feature02
whoops sitting on feature02 with some new changes that I really wanted based on master instead of feature01
... something-something profit ...