This file contains hidden or 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
#https://github.com/aspnet/Tooling/blob/AspNetVMs/docs/create-asp-net-vm-with-webdeploy.md | |
# Install IIS (with Management Console) | |
Install-WindowsFeature -name Web-Server -IncludeManagementTools | |
# Install ASP.NET 4.6 | |
Install-WindowsFeature Web-Asp-Net45 | |
# Install Web Management Service | |
Install-WindowsFeature -Name Web-Mgmt-Service |
This file contains hidden or 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
# Usage: powershell ExportSchema.ps1 "SERVERNAME" "DATABASE" "C:\<YourOutputPath>" | |
# Start Script | |
Set-ExecutionPolicy RemoteSigned | |
# Set-ExecutionPolicy -ExecutionPolicy:Unrestricted -Scope:LocalMachine | |
function GenerateDBScript([string]$serverName, [string]$dbname, [string]$scriptpath) | |
{ | |
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null |
This file contains hidden or 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
USE [master]; | |
DECLARE @kill varchar(8000) = ''; | |
SELECT @kill = @kill + 'kill ' + CONVERT(varchar(5), session_id) + ';' | |
FROM sys.dm_exec_sessions | |
WHERE database_id = db_id('LSST') | |
SELECT @kill | |
EXEC(@kill); |
This file contains hidden or 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 script installs IIS and the features required to | |
# run West Wind Web Connection. | |
# | |
# * Make sure you run this script from a Powershel Admin Prompt! | |
# * Make sure Powershell Execution Policy is bypassed to run these scripts: | |
# * YOU MAY HAVE TO RUN THIS COMMAND PRIOR TO RUNNING THIS SCRIPT! | |
Set-ExecutionPolicy Bypass -Scope Process | |
# To list all Windows Features: dism /online /Get-Features | |
# Get-WindowsOptionalFeature -Online |
This file contains hidden or 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
<div class="MainContainer"> | |
<div class="ParallaxContainer"> | |
<h1> | |
Aloha! | |
</h1> | |
</div> | |
<div class="ContentContainer"> | |
<div class="Content"> |
This file contains hidden or 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
html, body { | |
font-family: Open Sans; | |
font-size: 18px; | |
line-height: 28px; | |
scroll-behavior: smooth; | |
} | |
h1 { | |
letter-spacing: -15px; | |
font-family: Open Sans; |
This file contains hidden or 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
Write-Output 'Hello World' | |
$env:computername | |
## Function to fingerprint commands executed during the execution of this runbook | |
Function Invoke-Fingerprint { | |
param ( $cmd ) | |
Write-Output '---------------------------' | |
Write-Output $cmd | |
Invoke-Expression $cmd | |
} |
This file contains hidden or 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
param( | |
[string]$tenantId="", | |
[string]$file="Azure-Classic-VMs.csv" | |
) | |
if ($tenantId -eq "") { | |
Write-Host "No tenant specified." | |
Add-AzureAccount | |
} else { | |
add-azureaccount -Tenant $tenantId |
This file contains hidden or 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
Install-Module AzureAutomationAuthoringToolkit -Scope CurrentUser | |
Import-Module AzureAutomationAuthoringToolKit |
This file contains hidden or 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
//https://www.youtube.com/watch?v=dY6jR52fFWo | |
using System.CodeDom.Compiler; | |
using Microsoft.CSharp; | |
public class CompilerTest { | |
public object RunCode (string userCode) { | |
CSharpCodeProvider provider = new CSharpCodeProvider (); | |
CompilerResults results = provider.CompileAssemblyFromSource (new CompileParameters (), userCode); | |
System.Type classType = results.CompiledAssembly.GetType("MyClass"); | |
System.Reflection.MethodInfo method = classType.GetMethod("MyMethod"); |