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
Console.WriteLine($".NET Version={Environment.Version}"); | |
Console.WriteLine($"OS={System.Runtime.InteropServices.RuntimeInformation.OSDescription}"); | |
Console.WriteLine($"Long Time Pattern={new System.Globalization.CultureInfo("en-US").DateTimeFormat.LongTimePattern}"); |
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
Show hidden characters
// This file was initially generated by Windows Terminal 1.1.2233.0 | |
// It should still be usable in newer versions, but newer versions might have additional | |
// settings, help text, or changes that you will not see unless you clear this file | |
// and let us generate a new one for you. | |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", |
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
[cmdletbinding()] | |
param( | |
[Parameter(Position=1, Mandatory = $true)] # Position = 1 allow passing without specifying -FileOrFolderPath | |
[String] $FileOrFolderPath | |
) | |
If((Test-Path -Path $FileOrFolderPath) -eq $false) { | |
Write-Warning "File or directory does not exist." | |
} | |
Else { |
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
<# | |
The sample scripts are not supported under any Microsoft standard support | |
program or service. The sample scripts are provided AS IS without warranty | |
of any kind. Microsoft further disclaims all implied warranties including, | |
without limitation, any implied warranties of merchantability or of fitness for | |
a particular purpose. The entire risk arising out of the use or performance of | |
the sample scripts and documentation remains with you. In no event shall | |
Microsoft, its authors, or anyone else involved in the creation, production, or | |
delivery of the scripts be liable for any damages whatsoever (including, | |
without limitation, damages for loss of business profits, business interruption, |
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
void Main() | |
{ | |
IamupResponder.StartListening(); | |
return; | |
} | |
/// <summary> | |
/// Listens on a socket for incoming connections and responds with "I Am Up" html. | |
/// </summary> | |
/// <remarks> | |
/// Inspired by: |
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
void Main() { | |
var cts = new CancellationTokenSource(); | |
var task = StartListener(cts.Token); | |
do { | |
Thread.Sleep(1); | |
} while (true); | |
cts.Cancel(); |
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
<Query Kind="Statements"> | |
<Connection> | |
<ID>3a5c9133-61a0-4989-b34a-b0b4b3967c7f</ID> | |
<Persist>true</Persist> | |
<Server>(localdb)\localdev</Server> | |
<Database>master</Database> | |
</Connection> | |
</Query> | |
// Example: |
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
[main 2019-02-15T22:37:18.094Z] Starting VS Code | |
[main 2019-02-15T22:37:18.095Z] from: /Users/af59986/Applications/Visual Studio Code.app/Contents/Resources/app | |
[main 2019-02-15T22:37:18.095Z] args: { _: [], | |
diff: false, | |
add: false, | |
goto: false, | |
'new-window': false, | |
'reuse-window': false, | |
wait: false, | |
version: false, |
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
[cmdletbinding()] | |
param( | |
[Parameter(Position = 1, Mandatory = $true)] | |
[String] | |
$message | |
) | |
Add-Type -AssemblyName System.Speech | |
$synth = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer | |
$synth.Speak($message) |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>ilog</Title> | |
<Shortcut>ilog</Shortcut> | |
<Description>Generates a private field to hold a Common.Logging.ILog</Description> | |
<Author>Philip Mateescu</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> |
NewerOlder