拡張子 | 説明 |
---|---|
.key |
秘密鍵や公開鍵を含むファイル。鍵はPEMかDER形式で保存されている。.pem や.der を使うこともある。 |
.pem |
PEM形式の証明書や秘密/公開鍵のファイル。 |
.der |
DER形式の証明書や秘密/公開鍵のファイル。 |
.csr |
証明書署名要求(CSR)ファイル。公開鍵と組織情報を含む |
.crt , .cer , .cert |
証明書ファイル。.csr を署名したもの。.pem や.der を使うこともある。 |
.pfx , .p12 |
秘密鍵 + 証明書。秘密鍵をパスワードで保護できる。Windowsでよく使われる。 |
.jks |
秘密鍵 + 証明書。Javaで使用されるキーストアファイル。 |
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
public static class ItIs | |
{ | |
public static T EquivalentTo<T>(T expected) | |
{ | |
return EquivalentTo(expected, config => config); | |
} | |
public static T EquivalentTo<T>(T expected, Func<EquivalencyAssertionOptions<T>, EquivalencyAssertionOptions<T>> config) | |
{ | |
bool Validate(T actual) |
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
function Get-VisualStudioVersion { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$True)] | |
[string]$Product | |
) | |
$products = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -format json | ConvertFrom-Json | |
$info = $products | Where-Object { $_.catalog.productLineVersion -eq $product } | Select-Object -First 1 | |
if (-not $info) { |
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
[alias] | |
st = status | |
ad = add -A | |
cm = commit | |
cmm = commit -m | |
cmf = commit --fixup | |
cman = commit --amend --no-edit | |
cmfr = "!f() { git commit --fixup \"$1\"; GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash \"$1\"^; }; f" | |
f = fetch | |
p = pull |
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
function prompt { | |
$index = Get-Random -Maximum $emojis.Count | |
return $emojis[$index] + '>' | |
} | |
$emojis = @( | |
"`u{00A9}","`u{00AE}","`u{1005}","`u{1F004}","`u{1F0CF}","`u{1F170}","`u{1F171}","`u{1F17E}","`u{1F17F}","`u{1F18E}","`u{1F191}","`u{1F192}","`u{1F193}","`u{1F194}","`u{1F195}","`u{1F196}","`u{1F197}","`u{1F198}","`u{1F199}","`u{1F19A}", | |
"`u{1F201}","`u{1F202}","`u{1F21A}","`u{1F22F}","`u{1F232}","`u{1F233}","`u{1F234}","`u{1F235}","`u{1F236}","`u{1F237}","`u{1F238}","`u{1F239}","`u{1F23A}","`u{1F250}","`u{1F251}","`u{1F300}","`u{1F301}","`u{1F302}","`u{1F303}","`u{1F304}", | |
"`u{1F305}","`u{1F306}","`u{1F307}","`u{1F308}","`u{1F309}","`u{1F30A}","`u{1F30B}","`u{1F30C}","`u{1F30D}","`u{1F30E}","`u{1F30F}","`u{1F310}","`u{1F311}","`u{1F312}","`u{1F313}","`u{1F314}","`u{1F315}","`u{1F316}","`u{1F317}","`u{1F318}", | |
"`u{1F319}","`u{1F31A}","`u{1F31B}","`u{1F31C}","`u{1F31D}","`u{1F31E}","`u{1F31F}","`u{1F320}","`u{1F321}","`u{1F324}","`u{1F325}","`u{1F326}","`u{1F327}","`u{1F328}","`u{1F |
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
$chintaiList = @( | |
'https://www.homes.co.jp/archive/b-38203506/', # キングダム相模原 | |
'https://www.homes.co.jp/archive/b-38203509/', # ビバーチェ | |
'https://www.homes.co.jp/archive/b-38201560/' # タウンハウス内堀 | |
) | |
function Write-Recuruitments($archiveUrl) { | |
$result = Invoke-WebRequest $archiveUrl | |
$heading = $result.ParsedHtml.getElementsByClassName('heading') |
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 Microsoft.CodeAnalysis; | |
using Microsoft.CodeAnalysis.CSharp; | |
var programBefore = @" | |
public class MyClass | |
{ | |
public void MyMethod() | |
{ | |
// Output | |
Console.WriteLine(""Hello, world!""); |
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
Function Join-LineNumbers { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$True, | |
ValueFromPipeline=$True)] | |
[string[]]$Lines | |
) | |
begin { | |
$private:i = 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
<# | |
.SYNOPSIS | |
PowerShell script to rename extension of files in a specified directory. | |
.EXAMPLE | |
PS> Rename-Extension -Path . -ExtensionFrom txt -ExtensionTo md -Recurse | |
.PARAMETER Path | |
Folder that contains the file to be renamed |
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
const MUTE_TEXTS = [ | |
'FOO', | |
'BAR', | |
'BAZ', | |
]; | |
const getText = (node) => [...node.childNodes] | |
.filter(n => n.nodeType === Node.TEXT_NODE) | |
.reduce((acc, n) => acc += n.nodeValue, ''); | |
const shouldMute = (node) => MUTE_TEXTS.some(text => getText(node).includes(text)); |
NewerOlder