Skip to content

Instantly share code, notes, and snippets.

View shaunluttin's full-sized avatar

Shaun Luttin shaunluttin

View GitHub Profile
@shaunluttin
shaunluttin / Index.cshtml
Last active June 18, 2018 16:01
Inner HTML vs Attribute
<code-sample>
<ul>
<li>list item 1</li>
<li>list item 2</li>
<li>list item 3</li>
</ul>
<p>a paragraph</p>
</code-sample>
@shaunluttin
shaunluttin / Permutations01.cs
Created January 1, 2018 01:26
An implementation of a GetPermutations algorithm.
using System;
public class Program
{
public static void Main()
{
var p = new Program();
var perms = p.GetPermutations(new int[] {1,2,3,4});
foreach(var perm in perms)
{
@shaunluttin
shaunluttin / csproj-static-only
Created June 1, 2015 21:03
csproj inheritance to only deploy static files.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<TheParentProj Include="$(ParentProj)" />
</ItemGroup>
<!-- This is the entry point for this msbuild project. -->
<Target Name="ContentFiles">
@shaunluttin
shaunluttin / deploy-static
Created June 1, 2015 21:01
deploy.cmd - Copy Content to the temporary path.
:: 2. Copy only Content files (generally static) without a build.
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\StaticContentOnly.csproj" /p:ParentProj="%DEPLOYME NT_SOURCE%\MyWebApp\MyWebApp.csproj" /p:_PackageTempDir="%DEPLOYMENT_TEMP%" /p:VisualStudioVersion=14.0
@shaunluttin
shaunluttin / deploy-build
Last active August 29, 2015 14:22
deploy.cmd - Build to the temporary path
:: 2. Build to the temporary path
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\MyWebApp\MyWebApp.csproj" /nologo /verbosity:m /t: Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="%DEPLOYMENT_TEMP%";AutoParameterizati onWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="%DEPLOYMENT_SOURCE%\.\\" %SCM_BUIL D_ARGS%
) ELSE (
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\MyWebApp\MyWebApp.csproj" /nologo /verbosity:m /t: Build /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="%DEPLOY MENT_SOURCE%\.\\" %SCM_BUILD_ARGS%
)
@shaunluttin
shaunluttin / PowerShell Console
Last active January 2, 2016 16:09
How to navigate the PowerShell console.
- [spacebar], continue --more--
- [q], quit the --more--
- [ctrl+c], cancel a long print
- [right click], copy highlighted text & paste it at a cursor location
- [tab], tab completion for commands
- [shift+tab], go backward through commands
- [up arrow], show last command
@shaunluttin
shaunluttin / ChocolateyPackage
Last active January 2, 2016 15:49
Rebuild the BigFont development computer using a chocolatey.org script via the http://boxstarter.org/WebLauncher. See also http://hanselman.com/tools. Alternatively, install Chocolatey, then open PowerShell to run individual commands.
choco install 7zip -y
choco install anyvideoconverter -y
choco install jivkok.autohotkey -y
choco install autoruns -y
choco install avastfreeantivirus -y
choco install conemu -y
choco install f.lux -y
choco install fiddler -y
choco install filezilla -y
choco install FoxitReader -y