Skip to content

Instantly share code, notes, and snippets.

@erick-thompson
erick-thompson / AN
Created April 16, 2019 01:51
Test content
This is test content
#!/bin/bash
# ---------------------------------------------------------------------
# TeamCity build agent bootstrap script
# ---------------------------------------------------------------------
# Parameters:
#
# $1 required: TeamCity Server URL
# $2 required: TeamCity Agent installation path
# $3 required: Authorization token. Must be "-1" if no auto registration required
# $4 optional: Agent account
# Boxstarter options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
# Basic setup
Update-ExecutionPolicy Unrestricted
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
# Enable-RemoteDesktop
# Disable-InternetExplorerESC
@erick-thompson
erick-thompson / DevConfig
Created February 13, 2014 17:25
BoxStarter
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst console2
cinst fiddler4
cinst git.install
cinst notepadplusplus.install
cinst 7zip.install
cinst GoogleChrome
cinst javaruntime
@erick-thompson
erick-thompson / TcpPortLimitedTaskScheduler
Created October 7, 2012 23:42
Task scheduler for TPL that ensures that the ephemeral port limit isn't reached. (http://datatoknowledge.com/2012/10/07/when-azure-storage-runs-too-fast/)
public class TcpPortLimitedTaskScheduler : TaskScheduler
{
[ThreadStatic]
private static bool _CurrentThreadIsProcessingItems;
private readonly LinkedList<Task> _Tasks = new LinkedList<Task>();
private int _DelegatesQueuedOrRunning = 0;
public const int TcpConnectionLimit = 4000;