Skip to content

Instantly share code, notes, and snippets.

View aaronpowell's full-sized avatar
😶‍🌫️

Aaron Powell aaronpowell

😶‍🌫️
View GitHub Profile
@jlongster
jlongster / Gruntfile.js
Last active August 29, 2015 13:56
example Gruntfile for grunt-sweet.js
module.exports = function(grunt) {
grunt.initConfig({
sweetjs: {
options: {
modules: ['es6-macros'],
sourceMap: true,
nodeSourceMapSupport: true
},
src: {
@fekberg
fekberg / DepthFirstSearch.cs
Last active August 29, 2015 13:56
Depth First Search
void Main()
{
// Define all the vertices in the graph
var a = new Vertex<string>{ Value = "A" };
var b = new Vertex<string>{ Value = "B" };
var c = new Vertex<string>{ Value = "C" };
var d = new Vertex<string>{ Value = "D" };
var e = new Vertex<string>{ Value = "E" };
var f = new Vertex<string>{ Value = "F" };
var g = new Vertex<string>{ Value = "G" };
@robdmoore
robdmoore / Add-ToHostsFile.ps1
Created July 23, 2014 08:17
Script to set up ASP.NET development environment in IIS with SQL Express using Network Service
# Originally from http://poshcode.org/3819
function Add-ToHostsFile {
<#
.DESCRIPTION
This function checks to see if an entry exists in the hosts file.
If it does not, it attempts to add it and verifies the entry.
.EXAMPLE
Add-ToHostsFile -IPAddress 192.168.0.1 -HostName MyMachine
@ducas
ducas / Octopus-Umbraco.psm1
Last active August 29, 2015 14:04
Umbraco helpers for Octopus Deploy
function Set-UmbracoPermissions($SitePath, $AppPoolAccount, $PathOverrides)
{
$readExecute = $AppPoolAccount,"ReadAndExecute","ContainerInherit, ObjectInherit","None","Allow"
$read = $AppPoolAccount,"Read","ContainerInherit, ObjectInherit","None","Allow"
$modify = $AppPoolAccount,"Modify","ContainerInherit, ObjectInherit","None","Allow"
$fileModify = $AppPoolAccount,"Modify","Allow"
$objects = @{}
$objects["App_Browsers"] = $readExecute
$objects["App_Code"] = $modify
@adamralph
adamralph / notes.csx
Last active August 29, 2015 14:04
Create release notes from GitHub issues with power of scriptcs and Octokit!
var owner = "scriptcs";
var repo = "scriptcs";
var milestone = "v0.10";
var labels = new Dictionary<string, string>{ { "feature", "New" }, { "bug", "Fixed" } };
var username = "adamralph";
var oAuthToken = "secret";
var client = Require<OctokitPack>().CreateWithOAuth("ScriptCs.ReleaseNotesScript", username, oAuthToken);
var issues = client.Issue.GetForRepository(owner, repo, new RepositoryIssueRequest { State = ItemState.Closed, }).Result;
anonymous
anonymous / killscc.ps1
Created March 7, 2011 03:24
Removes scc bindings from a Visual Studio solution
param([string] $folder)
$keys = 'SccProjectName', 'SccLocalPath', 'SccProvider', 'SccAuxPath'
$extensions = '.vssscc', '.vspscc'
function killScc(){
gci $folder -recurse | Where-Object { $extensions -contains $_.Extension } | foreach {
'Deleting ' + $_.FullName
$_ | Remove-Item -force
}
@stephengodbold
stephengodbold / killscc.ps1
Last active September 25, 2015 18:48 — forked from jstangroome/killscc.ps1
Removes source control bindings, and optionally backs up the original files
#requires -version 2.0
param (
[ValidateScript({$_ | Test-Path -PathType Container})]
[Parameter(Mandatory=$true)]
[string] $folder,
[switch] $backup
)
function killScc(){
gci -path $folder -i *.vssscc,*.vspscc -recurse | Remove-Item -force -verbose
@HCanber
HCanber / program.cs
Created August 31, 2011 18:56
Console app running an OWIN Hello World application on Kayak
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using Gate;
using Gate.Kayak;
using Kayak;
namespace OwinHelloWorld
@jstangroome
jstangroome / OverrideAssemblyVersion.targets
Last active September 28, 2015 17:58
An MSBuild script that allows a C# application's assembly version information to be overridden by an MSBuild property
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Example usage: msbuild someproject.csproj /p:AssemblyVersion=1.2.3.4 /p:AssemblyFileVersion=2.3.4.5 /p:AssemblyInformationVersion="Codename Frank" -->
<Target Name="OverrideAssemblyVersion"
BeforeTargets="CoreCompile">
<!-- CallTarget technique used to allow version properties to be set by another target -->
<CallTarget Targets="CoreOverrideAssemblyVersion"
Condition=" '$(AssemblyVersion)'!='' or '$(AssemblyFileVersion)'!='' or '$(AssemblyInformationalVersion)'!='' " />
</Target>
@KevM
KevM / Nuget.Config
Created January 19, 2012 23:19
Nuget configuraiton of package sources.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageSources>
<add key="myrepo" value="\\server\\share\\path" />
</packageSources>
</configuration>