Skip to content

Instantly share code, notes, and snippets.

aetos aetos382

Block or report user

Report or block aetos382

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 Remove-Aliases-For-PowerShell51.ps1
$aliasesToRemove = @(
'ac', 'chdir', 'clc', 'clhy', 'cli', 'clp', 'clv', 'cnsn', 'cpi', 'cpp',
'curl', 'cvpa', 'dbp', 'dnsn', 'ebp', 'epal', 'epcsv', 'erase', 'etsn',
'exsn', 'fc', 'fhx', 'foreach', 'gal', 'gbp', 'gc', 'gcm', 'gcs', 'gdr',
'ghy', 'gi', 'gjb', 'gl', 'gmo', 'gp', 'gps', 'gpv', 'group', 'gsn',
'gsv', 'gu', 'gv', 'h', 'ihy', 'ii', 'ipal', 'ipcsv', 'ipmo', 'irm',
'iwr', 'measure', 'mi', 'mp', 'nal', 'ndr', 'ni', 'nmo', 'nsn', 'nv',
'oh', 'r', 'rbp', 'rcjb', 'rcsn', 'rdr', 'ri', 'rjb', 'rmo', 'rni', 'rnp',
'rp', 'rsn', 'rv', 'rvpa', 'sajb', 'sal', 'saps', 'sasv', 'sc', 'sbp',
'si', 'sl', 'sls', 'sp', 'spjb', 'spps', 'spsv', 'sv', 'type', 'wget',
View vs-market-place-api.ps1
$url = 'https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery'
$headers = @{
'Content-Type' = 'application/json; charset=utf-8'
'Accept' = 'application/json; charset=utf-8; api-version=3.2-preview.1'
'User-Agent' = 'VSIDE-16.0.28803.352'
}
$body = @{
flags = 262
View ConsoleApp1.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<DotNetCliToolReference Include="Swashbuckle.AspNetCore.Cli" Version="5.0.0-rc2" />
</ItemGroup>
View console-info.txt
特記事項のないものに関しては、コンソールに表示されたものと、ファイルにリダイレクトしたものは同じ。
View InstalledModule.format.ps1xml
<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
<ViewDefinitions>
<View>
<Name>InstalledModulesGroupedTableView</Name>
<ViewSelectedBy>
<TypeName>System.Management.Automation.PSObject#InstalledModuleInfo</TypeName>
</ViewSelectedBy>
<GroupBy>
View CustomProperty.cs
using System;
using System.Management.Automation;
namespace MyTypeAdapter
{
internal class CustomProperty :
PSAdaptedProperty
{
public CustomProperty(
string name,
View BindLambda.cs
private static void Main()
{
Expression<Func<Hoge, Hoge>> expression = x => new Hoge(x.i + 9)
{
a = new[] { 8, 9, x.i * 2 }
};
expression.Dump();
var rewrited = Bind(expression, new Hoge(10));
View MakeAccessor.cs
void Main()
{
var instance = new First {
Second = new Second {
Third = new Third {
Value = 100
}
}
};
View GetAttributeInstanceCreator.cs
static Func<CustomAttributeData, TAttribute> GetAttributeInstanceCreator<TAttribute>(
CustomAttributeData customAttributeData)
{
var customAttributeDataParameter = Expression.Parameter(typeof(CustomAttributeData));
var constructorArgumentsExpression = Expression.Property(
customAttributeDataParameter,
nameof(CustomAttributeData.ConstructorArguments));
var listOfConstructorArgumentIndexer = (PropertyInfo)typeof(IList<CustomAttributeTypedArgument>).GetDefaultMembers()[0];
View WMF.md
Components \ Versions 2.0 3.0 4.0 5.0 5.1
PowerShell
PowerShell ISE
PowerShell DSC
WMI
WinRM
Management OData IIS Extensions
Server Manager CIM Provider
Just Enough Administration
You can’t perform that action at this time.