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 does not support all the features of runas.exe, but is a first stab | |
| Function Start-UserProcess { | |
| param([Parameter(Mandatory=$true)][string]$Username, [switch]$SaveCredentials, [Parameter(Mandatory=$true)][string]$Program, [string[]]$ArgumentList) | |
| $program = & { | |
| if ($ArgumentList) { | |
| ((& { $Program; $ArgumentList }) | foreach { "\`"$_\`"" }) -join " " | |
| } else { | |
| "`"$Program`""; | |
| } |
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
| <!DOCTYPE html> | |
| <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Showdown and Highlight JS</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.5/styles/default.min.css" /> | |
| <style> | |
| xmp.hide { | |
| display: none; |
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="front-content"> | |
| {{Front}} | |
| </div> | |
| <script> | |
| function addStylesheet(src, callback) { | |
| var s = document.createElement('link'); | |
| s.rel = 'stylesheet'; | |
| s.href = src; | |
| s.onload = callback; | |
| document.head.appendChild(s); |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" | |
| xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
| targetNamespace="https://tahirhassan.blogspot.com/VisualStudio/2005/CodeSnippets" | |
| xmlns="https://tahirhassan.blogspot.com/VisualStudio/2005/CodeSnippets"> | |
| <xs:element name="CodeSnippets" xmlns="https://tahirhassan.blogspot.com/VisualStudio/2005/CodeSnippets"> | |
| <xs:annotation> | |
| <xs:documentation><!-- _locID_text="CodeSnippets" _locComment="" -->Groups CodeSnippet elements. The CodeSnippets element is the root element of the code snippet XML schema.</xs:documentation> | |
| </xs:annotation> | |
| <xs:complexType> |
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
| # source: https://paregov.net/blog/19-powershell/24-xslt-processor-with-powershell | |
| function Invoke-XslTransform { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory = $true)][string]$StylesheetUri | |
| , [Parameter(Mandatory = $true)][string]$InputUri | |
| , [string]$Destination | |
| , [switch]$PassThru | |
| , [switch]$Overwrite |
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
| <?xml version="1.0"?> | |
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="https://tahirhassan.blogspot.com/VisualStudio/2005/CodeSnippets" xmlns:vs="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet" version="1.0"> | |
| <xsl:template match="/"> | |
| <vs:CodeSnippets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
| <xsl:for-each select="/t:CodeSnippets/t:CodeSnippet/t:Header/t:Shortcut"> | |
| <vs:CodeSnippet Format="1.0.0"> | |
| <xsl:variable name="shortcut" select="."/> | |
| <xsl:for-each select=".."> | |
| <xsl:element name="vs:{local-name()}"> | |
| <xsl:apply-templates select="@*|node()[not(self::t:Shortcut)]"/> |
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() | |
| $projectPath = "C:\_code\Clock\Clock"; | |
| $debugDir = "$projectPath\bin\Debug"; | |
| $releaseDir = "$projectPath\bin\Release"; | |
| $debugClockExe = Get-Item $debugDir\Clock.exe; | |
| $releaseClockExe = Get-Item $releaseDir\Clock.exe; | |
| if ($releaseClockExe.LastWriteTime -gt $debugClockExe.LastWriteTime) { |
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() | |
| $ErrorActionPreference = 'Stop'; | |
| Start-Process -Verb runAs -ArgumentList '-NoExit','cd',(Get-Item .).FullName powershell |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenPowerShellHere] | |
| @="Open PowerShell here" | |
| "Icon"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" | |
| [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenPowerShellHere\command] | |
| @="powershell.exe -NoExit -Command Set-Location -LiteralPath '%V'" | |
| [HKEY_CLASSES_ROOT\Directory\shell\OpenPowerShellHere] |
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
| using Microsoft.SharePoint.Client; | |
| using System; | |
| using System.Collections.Concurrent; | |
| using System.Net.Http; | |
| using System.Text; | |
| using System.Text.Json; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using System.Diagnostics; |
OlderNewer