This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
function Run-Step([string] $Description, [ScriptBlock]$script) | |
{ | |
Write-Host -NoNewline "Loading " $Description.PadRight(20) | |
& $script | |
Write-Host "`u{2705}" # checkmark emoji | |
} | |
[console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding | |
$stopwatch = [system.diagnostics.stopwatch]::StartNew() |
This document now exists on the official ASP.NET core docs page.
# Get a list of meetings occurring today. | |
function get-meetings() { | |
$olFolderCalendar = 9 | |
$ol = New-Object -ComObject Outlook.Application | |
$ns = $ol.GetNamespace('MAPI') | |
$Start = (Get-Date).ToShortDateString() | |
$End = (Get-Date).ToShortDateString() | |
$Filter = "[MessageClass]='IPM.Appointment' AND [Start] > '$Start' AND [End] < '$End'" | |
$appointments = $ns.GetDefaultFolder($olFolderCalendar).Items | |
$appointments.IncludeRecurrences = $true |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Security.Cryptography; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; |
param ($xml, $xsl, $output) | |
if (-not $xml -or -not $xsl -or -not $output) | |
{ | |
Write-Host "& .\Transform-Xslt.ps1 [-xml] xml-input [-xsl] xsl-input [-output] transform-output" | |
exit; | |
} | |
trap [Exception] | |
{ |
# Description: Boxstarter Script | |
# Author: Rich Turner <[email protected]> | |
# Last Updated: 2019-07-08 | |
# | |
# Run this Boxstarter by calling the following from an **ELEVATED PowerShell instance**: | |
# `set-executionpolicy Unrestricted` | |
# `. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force` | |
# `Install-BoxstarterPackage -DisableReboots -PackageName <URL-TO-RAW-GIST>` | |
#---- TEMPORARY --- |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<!-- SEO rules (from: http://www.seomoz.org/blog/what-every-seo-should-know-about-iis#chaining) --> | |
<!-- SEO | Section 1 | Whitelist --> | |
<rule name="Whitelist - Resources" stopProcessing="true"> | |
<match url="^(?:css/|scripts/|images/|install/|config/|umbraco/|umbraco_client/|base/|webresource\.axd|scriptresource\.axd|__browserLink|[^/]*/arterySignalR/.*)" /> | |
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> | |
<action type="None" /> | |
</rule> | |
<!-- SEO | Section 2 | Rewrites (chaining) --> | |
<rule name="SEO - Remove default.aspx" stopProcessing="false"> | |
<match url="(.*?)/?default\.aspx$" /> |
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrc
@"%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 |