Skip to content

Instantly share code, notes, and snippets.

altrive

Block or report user

Report or block altrive

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Pester_FailedTest_StackTrace.Tests.ps1
Import-Module Pester -MinimumVersion 4.0
Describe "テスト失敗時のスタックトレース表示確認"{
Context "通常実行"{
It "テスト01(日本語カルチャ)"{
# UIロケールが日本語となっていることを確認
[System.Threading.Thread]::CurrentThread.CurrentUICulture | Should -Be ([cultureInfo]::GetCultureInfo('ja-jp'))
# テスト失敗時の表示確認
$true | Should -Be $false
@altrive
altrive / TLSVersionCheck.md
Last active Jan 13, 2018
How to check TLS version by MessageAnalyzer
View TLSVersionCheck.md

Office 365 stop supporting TLS 1.0/1.1 at March 1st 2018.
It may required to applying windows patch and registry settings (for application targetting .NET 4.6 or prior version)

Then, it need to ensure old protocols are not used.

Confirm TLS version by Message Analyzer

Use following filter to show only SSL/TLS ClientHello traffics.

(SSL) or (TLS.records[0].fragment[0].msg_type == TLS.HandshakeType.client_hello)
@altrive
altrive / Allure.md
Last active Oct 28, 2017
Using Allure for .NET project
View Allure.md
@altrive
altrive / InstallDnSpy.ps1
Created Oct 9, 2017
dnSpy installation script by using scoop
View InstallDnSpy.ps1
#Define scoop app manifest
$manifest = [ordered] @{
homepage = 'https://github.com/0xd4d/dnSpy'
version = '4.0.0'
# TODO: Use latest build from <https://ci.appveyor.com/project/0xd4d/dnspy>
url = 'https://github.com/0xd4d/dnSpy/releases/download/v4.0.0-beta1/dnSpy.zip'
hash = '25da2e9dc426a78b75235906a166b597054f8ae1247c212520023e13b5474f62'
bin = @(
'dnSpy.exe',
'dnSpy.Console.exe'
View BuildCustomization.md
View LinqPad_Dump_by_Reflection.cs
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
View NLog.StructuredLogging
<Query Kind="Program">
<NuGetReference>Newtonsoft.Json</NuGetReference>
<NuGetReference Version="4.5.0-alpha01" Prerelease="true">NLog</NuGetReference>
<Namespace>NLog</Namespace>
<Namespace>NLog.Config</Namespace>
<Namespace>NLog.Targets</Namespace>
<Namespace>Newtonsoft.Json</Namespace>
</Query>
void Main()
@altrive
altrive / Get-EtwTraceProvider.ps1
Created Jan 6, 2016
GetTraceProviderList sample
View Get-EtwTraceProvider.ps1
#Get-EtwTraceProvider Cmdlet don't return ProviderName
#and some providers returns invalid guid? (invalid parentheses pair)
# Error at: {E02A841C-75A3-4FA7-AFC8-AE09CF9B7F23)
Get-EtwTraceProvider | foreach{ $_.guid;[Guid]::Parse($_.guid)}
@altrive
altrive / PSConnect_WatchList.md
Last active Aug 29, 2015
My PowerShell Connect Site WatchList
View PSConnect_WatchList.md

ConnectのWatchListまとめ。

Add equivalent of c# using statement to powershell (Vote:3)

https://connect.microsoft.com/PowerShell/Feedback/Details/1220115
C#と同様にusingキーワード使ったDispose構文をサポートしてほしい。

ISE hangs after using a Windows Forms dialog (Vote:7)

https://connect.microsoft.com/PowerShell/Feedback/Details/1224213
ISEでShowDialog呼んでしばらくするとISEがクラッシュする問題。一応、Dispatcher通すと問題を回避できる。

@altrive
altrive / Test-Remotely.ps1
Created May 9, 2015
Remotely PowerShell Module Tests
View Test-Remotely.ps1
function Test-Message
{
Write-Verbose "Test Message" -Verbose
}
Describe "Test-Remotely"{
It "Send local function to remote session"{
#Arrange: Send local function definition to remote session
Remotely ([ScriptBlock]::Create(${Function:Test-Message}.Ast.Extent.Text))
You can’t perform that action at this time.