This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" AutoEventWireup="true" %> | |
<%@ Import Namespace="System.Threading" %> | |
<script runat="server"> | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
uint viewIndex = 0; | |
uint.TryParse(Request.QueryString["view"], out viewIndex); | |
views.ActiveViewIndex = (int)(viewIndex < views.Views.Count ? viewIndex : 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" AutoEventWireup="true" %> | |
<%@ Import Namespace="System.Threading" %> | |
<script runat="server"> | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
uint viewIndex = 0; | |
uint.TryParse(Request.QueryString["view"], out viewIndex); | |
views.ActiveViewIndex = (int)(viewIndex < views.Views.Count ? viewIndex : 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clist -l -r -y | % { "cinst " + $_.SubString(0,$_.IndexOf("|")) + " /y" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
choco feature enable -n allowGlobalConfirmation | |
choco install 7zip /y | |
choco install 7zip.install /y | |
choco install ARMClient /y | |
choco install audacity /y | |
choco install audacity-lame /y | |
choco install autohotkey /y | |
choco install autohotkey.install /y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this automates the steps found here: http://docs.nuget.org/docs/workflows/migrating-to-automatic-package-restore | |
#yes, you could code golf this to about 6 characters if you wanted to | |
$find= @' | |
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> | |
'@ | |
foreach ($f in Get-ChildItem -Recurse -Path ".\" -Filter *.csproj | sort-object) | |
{ | |
$text = Get-Content $f.FullName -Raw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_url($atts) { | |
$pageURL = 'http'; | |
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} | |
$pageURL .= "://"; | |
if ($_SERVER["SERVER_PORT"] != "80") { | |
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; | |
} else { | |
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; | |
} | |
return $pageURL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-AppxPackage | Remove-AppxPackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Strike.IE; | |
using System; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.IO; | |
using System.Linq; | |
namespace TrainingKitPackager | |
{ | |
class Program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get-childitem . -include *.sln -recurse | foreach ($_) { nuget restore $_.FullName -verbosity detailed} | |
get-childitem . -include *.png -recurse | foreach ($_) { pngout "$_"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
md.PrepareImage = delegate(MarkdownDeep.HtmlTag tag, bool TitledImage) | |
{ | |
//Compress PNG | |
string relPath = tag.attributes["src"].Replace('/', '\\').Replace("?raw=true", ""); | |
string path = Path.Combine(file.DirectoryName, relPath); | |
Console.WriteLine("\tProcessing image: {0}", path); | |
System.Drawing.Bitmap img = (Bitmap)Bitmap.FromFile(path); | |
var quant = new nQuant.WuQuantizer(); | |
var ms = new MemoryStream(); |