Skip to content

Instantly share code, notes, and snippets.

View erichexter's full-sized avatar
😮

Eric Hexter erichexter

😮
View GitHub Profile
New-Landlord [filepath]
Remove-Landlord [filepath]
@erichexter
erichexter / gist:b0cca2ff2e3ab120cec8
Created August 14, 2014 15:28
Install octopus agent using a winRM / remote powershell session
function bootstrap-tentacle{
param($username,$password,$environments,$roles)
$rolestring="@(""" + ($roles -join """,""") + """)"
$environmentstring="@(""" + ($environments -join """,""") + """)"
$command = ". c:\redist\configuremachine.ps1;install-tentacle -environments $environmentstring -roles $rolestring"
$command | set-content c:\installoctopus.ps1
Write-Host "Starting Tentacle install script:"
// ==UserScript==
// @name Remove Left Nav Items
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author You
// @match https://manage.windowsazure.com/*
// @grant unsafeWindow
// ==/UserScript==
@erichexter
erichexter / program.cs
Created October 22, 2014 19:58
send SQL AZURE Performance Data to TelemetryApp.com
void Main()
{
do{
try{
var context=new QsContext();
var connection=context.Database.Connection as SqlConnection;
List<dynamic> results= new List<dynamic>();
SqlCommand command = new SqlCommand("SELECT top 1 * FROM sys.dm_db_resource_stats order by end_Time desc",connection);
@erichexter
erichexter / Webserver.js
Created November 24, 2014 19:54
Optimal Dev Ops Description
{
WindowsFeaturesInstalled: ["IIS-WebServerRole",""]
WindowsFeaturesRemoved: ["",""]
ChocolateyPakagesInstall: ["git","chrome"]
ChocolateyPakagesRemoved: ["",""]
CertificatesInstall: ["",""]
CertificateRemoved: ["",""]
PowershellScripts:[ "configuremachine.ps1;install-agent" ]
}
cinst 1password
cinst 7zip
cinst 7zip.install
cinst adobereader
cinst autohotkey.portable
cinst beyondcompare
cinst DotNet4.5.1
cinst fiddler4
cinst WindowsLiveWriter
cinst githubforwindows
@erichexter
erichexter / GitPullAll.ps1
Created March 10, 2015 14:28
Update All Local Branches
git branch | %{ git checkout $_.Trim().Replace("* ","");git pull}
@erichexter
erichexter / Retry.cs
Last active August 29, 2015 14:17 — forked from plioi/Retry.cs
public class IntegrationTestConvention : Convention
{
public IntegrationTestConvention()
{
Classes
.NameEndsWith("Tests");
Methods
.Where(method => method.IsVoid() || method.IsAsync());
[Test]
[TestCaseSource("DocumentContent")]
public void Every_Content_type_Should_have_A_categorizer(string documentContentType)
{
allTypes.Any(s => s.Name.Contains(documentContentType + "DocumentContentCategorizer")).ShouldBeTrue(String.Format("{0} does not have a DocumentContentCategorizer.", documentContentType));
}
DocumentContent = Enum.GetNames(typeof(DocumentContent));
@erichexter
erichexter / gist:8f7c6b1d21102b2234a9
Created March 19, 2015 13:38
calling chrome with a new instance to stream to multiple chrome-casts simultaneously.
use the user-data-dir to create a new instance of chrome that will can stream to a chromecast, once you start up this instance the first time, you need to install the chromecast extension.
Launch this app and then start casting.
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir=c:\temp\chrome1 url