Skip to content

Instantly share code, notes, and snippets.

View riezebosch's full-sized avatar

Manuel Riezebosch riezebosch

View GitHub Profile
@riezebosch
riezebosch / gist:c7e5969be40ebd2614b1
Last active October 20, 2015 08:32
VS External Tools ILSpy
$ilspy = gci -Path "$env:ChocolateyInstall\lib\ILSpy*\tools\ILSpy.exe" | select -ExpandProperty FullName
pushd 'HKCU:\Software\Microsoft\VisualStudio\14.0\External Tools'
$index = [int](gp . -Name ToolNumKeys).ToolNumKeys
sp . -Name ToolNumKeys -Value $($index+1)
sp . -Name ToolTitle$index -Value "ILSpy"
sp . -Name ToolCmd$index -Value $ilspy
sp . -Name ToolArg$index -Value '"$(TargetPath)"'
popd
echo date %DATE:~4,10% > %~dp0startup.bat
echo time %TIME% >> %~dp0startup.bat
@riezebosch
riezebosch / _install.ps1
Last active January 19, 2019 16:22
BoxStarter VS2015
$myfeed = "https://myget.org/F/riezebosch"
$wu = Get-Service -Name wuauserv
$wu | Set-Service -StartupType Manual | Stop-Service
choco install DotNet4.5.1 -y
choco install KB2919442 -y
choco install KB2919355 -y
$env:visualStudio:setupFolder = "K:\VS2015"
@riezebosch
riezebosch / Install.ps1
Last active May 1, 2017 09:49
BoxStarter on Windows Server 2012 R2
# Tested on: http://care.dlservice.microsoft.com/dl/download/5/8/1/58147EF7-5E3C-4107-B7FE-F296B05F435F/9600.16415.amd64fre.winblue_refresh.130928-2229_server_serverdatacentereval_en-us.vhd
$myfeed = "https://myget.org/F/riezebosch/api/v2"
$wu = Get-Service -Name wuauserv
$wu | Set-Service -StartupType Manual
$wu | Start-Service
cinst DotNet3.5 -y --version 3.5.20140403
cinst powershell -y
$wu | Stop-Service
git config color.status.added "green normal bold"
git config color.status.untracked "red normal bold"
git config color.status.changed "red normal bold"
@riezebosch
riezebosch / ForEachComputer.ps1
Last active October 22, 2015 18:16
Alle cursist computers in cursuslokaal
function ForEach-Computer([int] $from, [int] $to, [ScriptBlock] $script) {
for ($i=$from; $i -le $to; $i++) {
$computername = "$($env:COMPUTERNAME -replace "DOCENT(?=.)", "CURSIST")$($i.ToString("00"))"
Write-Host $computername
Invoke-Command $script
}
}
# Server
$server = "$env:ProgramFiles\Octopus Deploy\Octopus\Octopus.Server.exe"
. $server create-instance --instance "OctopusServer" --config "C:\Octopus\OctopusServer.config"
. $server configure --instance "OctopusServer" --home "C:\Octopus" --storageConnectionString "Data Source=(local)\SQLEXPRESS;Initial Catalog=Octopus;Integrated Security=True" --upgradeCheck "True" --upgradeCheckWithStatistics "True" --webAuthenticationMode "UsernamePassword" --webForceSSL "False" --webListenPrefixes "http://localhost:80/" --commsListenPort "10943" --serverNodeName "VAGRANT-2012-R2"
. $server database --instance "OctopusServer" --create --grant 'NT AUTHORITY\SYSTEM'
. $server service --instance "OctopusServer" --stop
. $server admin --instance "OctopusServer" --username 'administrator' --password 'Pa$$w0rd'
. $server license --instance "OctopusServer" --licenseBase64 "PExpY2Vuc2UgU2lnbmF0dXJlPSJqUXhzbExQelM1TmhmNml4YTZucGlvZ0QyVnNsSEZPeEs4Sk1YTWRMZEtjMnluRFlrQnBmNVl6SEhtNW1MQU9CUnVva0xtV0F3bFVFR281S3l4amw5UT09Ij4NCiAgPE
@riezebosch
riezebosch / Program.cs
Last active July 27, 2017 15:02
Faster Find
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Core.Objects.DataClasses;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using Library;
@riezebosch
riezebosch / Update-AUPackages.md
Last active November 29, 2021 06:05
Update-AUPackages Report #powershell #chocolatey
@riezebosch
riezebosch / rabbitmq.cs
Created January 25, 2018 16:00
Send drops message if no queue
public class RabbitMqSpecificTests : IClassFixture<RabbitMqOptions>
{
readonly RabbitMqOptions options;
string queue = $"{nameof(RabbitMqSpecificTests)}{nameof(CommandDissapearsIfNoQueue)}";
public RabbitMqSpecificTests(RabbitMqOptions options)
{
this.options = options;
EnsureQueueDeleted();
}