Skip to content

Instantly share code, notes, and snippets.

View aershov24's full-sized avatar
🇦🇺

Alex Ershov aershov24

🇦🇺
View GitHub Profile
@aershov24
aershov24 / Markdium-Shell.sh
Created September 23, 2020 05:52
Markdium-
Integrated Security = true;
Integrated Security = SSPI;
@aershov24
aershov24 / Markdium-text.txt
Created September 23, 2020 05:52
Markdium-
public sealed class Singleton
{
// Because Singleton's constructor is private, we must explicitly
// give the Lazy a delegate for creating the Singleton.
static readonly Lazy instanceHolder =
new Lazy(() => new Singleton());
Singleton()
{
// Explicit private constructor to prevent default public constructor.
@aershov24
aershov24 / Markdium-PostScript.ps
Created September 23, 2020 06:02
Markdium-23 PowerShell Interview Questions DevOps Engineers Must Master
ping google.com &
@aershov24
aershov24 / Markdium-powershell.ps1
Created September 23, 2020 06:02
Markdium-23 PowerShell Interview Questions DevOps Engineers Must Master
class Contact
{
# Optionally, add attributes to prevent invalid values
[ValidateNotNullOrEmpty()][string]$First
[ValidateNotNullOrEmpty()][string]$Last
[ValidateNotNullOrEmpty()][string]$Phone
# optionally, have a constructor to
# force properties to be set:
Contact($First, $Last, $Phone) {
@aershov24
aershov24 / Markdium-PostScript.ps
Created September 23, 2020 06:02
Markdium-23 PowerShell Interview Questions DevOps Engineers Must Master
$URL_Format_Error = New-Object System.FormatException "..."
Throw $URL_Format_Error
@aershov24
aershov24 / Markdium-PostScript.ps
Created September 23, 2020 06:02
Markdium-23 PowerShell Interview Questions DevOps Engineers Must Master
Start-Process -NoNewWindow ping google.com
@aershov24
aershov24 / Markdium-PostScript.ps
Created September 23, 2020 06:02
Markdium-23 PowerShell Interview Questions DevOps Engineers Must Master
$URL_Format_Error = [string]"..."
Write-Error $URL_Format_Error
return
@aershov24
aershov24 / Markdium-powershell.ps1
Created September 23, 2020 06:02
Markdium-23 PowerShell Interview Questions DevOps Engineers Must Master
[PSCustomObject]@{
PSTypeName = "Contact"
First = $First
Last = $Last
Phone = $Phone
}
@aershov24
aershov24 / Markdium-Shell.sh
Created September 23, 2020 06:02
Markdium-23 PowerShell Interview Questions DevOps Engineers Must Master
1,2,3 | %{ write-host $_ }
@aershov24
aershov24 / Markdium-powershell.ps1
Created September 23, 2020 06:02
Markdium-23 PowerShell Interview Questions DevOps Engineers Must Master
add-type @"
public struct contact {
public string First;
public string Last;
public string Phone;
}
"@