Skip to content

Instantly share code, notes, and snippets.

@developerprofiles
developerprofiles / bootstrap-windows-jenkins-slave.ps1
Created March 1, 2021 12:26 — forked from cbittencourt/bootstrap-windows-jenkins-slave.ps1
PowerShell script to setup jenkins JNLP agent as a Windows Service
param(
[string]$jenkinsMasterbaseUrl,
[string]$nodeName,
[string]$privateKey,
[string]$workspaceRootFolder
)
$ErrorActionPreference = "Stop"
Function Install-JenkinsBuildAgent {

ASP.NET Razor Syntax Reference

Code Block

@{
    int x = 123;
    string y = "because.";
}

Expression (Html Encoded)

@developerprofiles
developerprofiles / television_resolution_standards.md
Created February 26, 2021 10:48 — forked from jonlabelle/television_resolution_standards.md
Digital and analog television standards resolution reference.

Television Standards

Digital and analog television standards resolution reference.

Digital TV Standards

Standard Resolution (dots × lines) DAR (H:V) Pixels
PixelVision 120 × 90 4:3 10,800

IIS 7 Command Line Tool

AppCmd.exe IIS 7 command-line tool used to perform common IIS administrative tasks such as creating new sites, stopping/starting services, and viewing status of the site.

Usage

appcmd (command) (object-type) <identifier> </parameter1:value1 ...>

Regular Expression Cheatsheet

Anchors

^   Matches at the start of string or start of line if multi-line mode is
	enabled. Many regex implementations have multi-line mode enabled by
	default.

$ Matches at the end of string or end of line if multi-line mode is enabled.
@developerprofiles
developerprofiles / async_await_best_practices_cheatsheet.md
Created February 26, 2021 10:48 — forked from jonlabelle/async_await_best_practices_cheatsheet.md
C# Asynchronous Programming Guideline Cheat Sheet

Async Await Best Practices Cheat Sheet

Summary of Asynchronous Programming Guidelines

Name Description Exceptions
Avoid async void Prefer async Task methods over async void methods Event handlers
Async all the way Don't mix blocking and async code Console main method
Configure context Use ConfigureAwait(false) when you can Methods that require con­text

Windows to UNIX Command Cheat Sheet

Windows PowerShell has several transition aliases that allow UNIX and CMD users to use familiar command names in Windows PowerShell. The most common aliases are shown in the table below, along with the Windows PowerShell command behind the alias and the standard Windows PowerShell alias if one exists.

CMD Command UNIX Command PowerShell Command PowerShell Alias
dir ls Get-ChildItem gci
@developerprofiles
developerprofiles / ConsolePortScanner.cs
Created February 26, 2021 10:46 — forked from jonlabelle/ConsolePortScanner.cs
Simple async C# Open Port Network Scanner
using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Net.Sockets;
namespace ConsolePortScanner
{
class MainClass
@developerprofiles
developerprofiles / dotnetcheatsheet.md
Created February 26, 2021 10:46 — forked from jonlabelle/dotnetcheatsheet.md
Dotnet core Cheat Sheet
@developerprofiles
developerprofiles / Settings.StyleCop
Created February 26, 2021 10:46 — forked from jonlabelle/Settings.StyleCop
StyleCop settings
<StyleCopSettings Version="105">
<GlobalSettings>
<CollectionProperty Name="RecognizedWords">
<Value>upsert</Value>
<Value>api</Value>
<Value>deserializer</Value>
<Value>deserializing</Value>
<Value>json</Value>
<Value>json:api</Value>
</CollectionProperty>