This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using Castle.DynamicProxy; | |
namespace SignalInterceptor | |
{ | |
public class CallLogger : IInterceptor | |
{ | |
public void Intercept(IInvocation invocation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base explorer features | |
$Boxstarter.RebootOk = $true | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
Enable-MicrosoftUpdate | |
Update-ExecutionPolicy -Policy RemoteSigned | |
# Base updates | |
Install-WindowsUpdate -GetUpdatesFromMS -AcceptEula | |
# Installation platforms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base explorer features | |
$Boxstarter.RebootOk = $true | |
Enable-MicrosoftUpdate | |
Update-ExecutionPolicy -Policy RemoteSigned | |
# Powershell 5 / WMF | |
cinst powershell | |
# Installation platforms | |
cinst lessmsi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Detects whether a specific package is already installed | |
function Test-PackageInstalled | |
{ | |
param([Parameter(Mandatory=$true)][string] $packageName) | |
$found = Get-ChildItem -Path "$env:ChocolateyInstall\lib" -Directory -Filter "$packageName.*" | Measure-Object | Select-Object -ExpandProperty Count | |
return $found -ne 0 | |
} | |
Test-PackageInstalled nuget.commandline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Certificate for simple encryption/decryption. Doesn't have to be signed, but does need key exchange allowed. | |
makecert -sv mycertificate.pvk -n "CN=My Simple Certificate" mycertifcate.cer -sky Exchange | |
# Certificate that can sign other certificates (share this as the CA). | |
makecert -sv mysigningcert.pvk -n "CN=My Signing Certificate" -r mysigningcert.cer | |
# Certificate for SSL that's signed by a certificate authority. | |
makecert -sk mysignedcert -iv mysigningcert.pvk -n "CN=My Signed Certificate" -ic mysigningcert.cer mysignedcert.cer -sr YourUsername -ss My | |
# If you need to export/save a certificate as a PFX file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this as administrator | |
Import-Module ADSync | |
Start-ADSyncSyncCycle -PolicyType Delta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$LocalDB = "YourInstanceName" | |
& "$($env:ProgramFiles)\Microsoft SQL Server\110\Tools\Binn\sqlcmd.exe" -S "(localdb)\$LocalDB" -d "master" -Q "EXECUTE master.sys.sp_MSforeachdb 'USE [?];declare @name nvarchar(max) = DB_NAME();IF(@name NOT IN (''master'',''model'',''msdb'',''tempdb''))BEGIN USE [master];EXEC (''alter database ['' + @name + ''] set single_user with rollback immediate; DROP DATABASE '' + @name) END'" | |
& sqllocaldb p $LocalDB | |
& sqllocaldb i $LocalDB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From http://stackoverflow.com/questions/21738647/change-date-of-git-tag-or-github-release-based-on-it | |
git checkout SHA1_OF_PAST_COMMIT | |
GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag -a v0.9.33 -m"Retroactively tagging version 0.9.33" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
using System.Runtime.InteropServices; | |
namespace ToolboxIntegration | |
{ | |
class InstallApp | |
{ | |
protected const string DTE_PROG_ID = "VisualStudio.DTE.7.1"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ CodeTemplate Language="C#" TargetLanguage="C#" Description="Generates a strongly typed collection based on a generic KeyedCollection." %> | |
<%@ Property Name="Accessibility" Type="System.String" Optional="True" Default="public" Category="Options" Description="The accessibility of the collection class." %> | |
<%@ Property Name="ClassName" Type="System.String" Optional="True" Category="Context" Description="The name of the collection class." %> | |
<%@ Property Name="TargetNamespace" Type="System.String" Optional="True" Category="Namespaces" Description="The namespace of the collection class." %> | |
<%@ Property Name="KeyPropertyName" Type="System.String" Category="Context" Description="The name of the property on each collection member that returns the key value." %> | |
<%@ Property Name="KeyType" Type="System.String" Category="Context" Description="The key type of the collection." %> | |
<%@ Property Name="KeyNamespace" Type="System.String" Optional="True" Category="Namespaces" Description="The namespace of the key type." % |
OlderNewer