Skip to content

Instantly share code, notes, and snippets.

#region Windows settings
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Set-TaskbarSmall
Enable-RemoteDesktop
Disable-InternetExplorerESC
#endregion
#region Windows updates
Enable-MicrosoftUpdate
Install-WindowsUpdate -AcceptEula
git checkout master
git merge develop
git push -u origin master
@batzen
batzen / ToArrayVsToList.cs
Last active August 26, 2018 09:56
[Benchmark] ToArrayVsToList
namespace ToArrayVsToList
{
using System;
using System.Linq;
using System.Collections.Generic;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
[MemoryDiagnoser]
public class ToArrayVsToList
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
// VTableFixup Directory:
// IMAGE_COR_VTABLEFIXUP[0]:
// RVA: 0x00004000
// Count: 0x0001
// Type: 0x000d
param (
[Parameter(Mandatory=$true,
Position = 0)]
[int]
$Width,
[Parameter(Mandatory=$true,
Position = 1)]
[int]
@batzen
batzen / sxstrace.ps1
Last active March 7, 2022 09:09
Short PowerShell script to start sxstrace, stop sxstrace and open the resulting trace
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Write-Warning "You do not have Administrator rights to run this script!`nPlease re-run this script as an Administrator!"
break
}
$logfile = (Join-Path $env:temp sxstrace.log)
$outfile = (Join-Path $env:temp sxstrace.txt)
Write-Output "Starting sxstrace utility..."