Skip to content

Instantly share code, notes, and snippets.

View guitarrapc's full-sized avatar
:octocat:

Ikiru Yoshizaki guitarrapc

:octocat:
View GitHub Profile
@guitarrapc
guitarrapc / README.md
Last active January 25, 2024 02:15
Docker Dekstop for Windows. http://127.0.0.1:2375/info response for Docker Engine backend with Hyper-V or WSL2.

tl;dr;

http://127.0.0.1:2375/info response for Docker Engine backend with Hyper-V or WSL2.

Environment

Windows 11 Pro 22H2

$ wsl --version
@guitarrapc
guitarrapc / SSLPerfectForwardSecrecyTLS12.ps1
Created May 22, 2015 03:22
DSC Configuration for SSL PerfectForwardSecrecyTLS12 with https://weakdh.org/sysadmin.html issue. Use GraniResource within configuration https://github.com/guitarrapc/DSCResources/tree/master/Custom
configuration SSLPerfectForwardSecrecyTLS12
{
Import-DscResource -ModuleName GraniResource
#region Protcol Configuration
# Disable Multi-Protocol Unified Hello
Registry "DisableServerMultiProtocolUnifiedHello"
{
Key = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Server"
@guitarrapc
guitarrapc / Datadog.md
Created December 8, 2023 02:47
Datadog Metrics and Logging Structure

メトリクス

flowchart LR

subgraph ContainerA
    Application["App"]
end
subgraph ContainerB
    DatadogAgent["ddagent"]
end
@guitarrapc
guitarrapc / ProjectVersion.txt
Last active November 27, 2023 11:36
Extract UnityVersion from ProjectVErsion.txt
m_EditorVersion: 2021.3.17f1
m_EditorVersionWithRevision: 2021.3.17f1 (3e8111cac19d)
@guitarrapc
guitarrapc / Bicep 設計.md
Last active October 31, 2023 05:04
Azure Bicep を IaC として使うことを考える

tl;dr;

  • Bicep を用いて、コードとリソースの一致を保証することは ARM Template の現在の性質ではできない。Microsoft は Deployment Stacks と呼ばれる仕組みで改善を検討している。
  • Bicep は、Complete modeを使うとコードとリソースが一致することがある程度保障できる。IaCとして使うなら Complete 一択。(それでもずれる)
  • Completeでは、最後に適用したBiepデプロイでリソースが決定されるので、Bicep スコープは狭く維持する。このため、ResourceGroup を target scopeにするのがいいだろう。Bicepを分ける = ResourceGroupをライフサイクルで分けることになる。

Bicep と ARM Template

bicep は、ARM Template の DSLでARM Templateに変換される。あくまでDSLなので、デプロイを含めた仕様、制約はARM Template に準じる

@guitarrapc
guitarrapc / RegexMatchSample.cs
Created October 4, 2023 07:49
Regex match example with some Unity Headless log.
void Main()
{
var messages = new[] {
"Invalid VFX Particle System. It is skipped.",
"WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?",
"WARNING: Shader Did you use #pragma only_renderers and omit this platform?",
"ERROR: Shader Sniper/InvisibleShadowCasterUniversalRP shader is not supported on this GPU (none of subshaders/fallbacks are suitable)",
"ERROR: Shader Hidden/Universal Render Pipeline/Foobar shader is not supported on this GPU (none of subshaders/fallbacks are suitable)",
"WARNING: Shader Unsupported: 'SineVFX/FooEffects/SG/DissolveParticleFlip' - All subshaders removed",
};
#!/bin/bash
curl -L -O https://downloads.redisinsight.redislabs.com/latest/redisinsight-linux64
chmod +x redisinsight-linux64
./redisinsight-linux64
@guitarrapc
guitarrapc / ClassSingleton-DO.ps1
Last active September 16, 2023 02:33
Singleton for PowerShell class
function Main() {
$item = [Singleton]::Instance
$item -eq $null #false
$item.SingletonTarget # Singleton object GUID will return
$item.SingletonTarget # Same object
$item2 = [Singleton]::Instance # same instance
$item -eq $item2 # true
}
<#
.SYNOPSIS
Update all dotnet tools installed on the system.
See https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools for dotnet-tools.
.EXAMPLE
# Update Project's dotnet tools
Update-DotnetTools
# Update Global dotnet tools
Update-DotnetTools -Global
#>
notAfter=Jan 28 12:00:00 2028 GMT
subject=C = BE, O = GlobalSign nv-sa, OU = Root CA, CN = GlobalSign Root CA
notAfter=Dec 15 08:00:00 2021 GMT
subject=OU = GlobalSign Root CA - R2, O = GlobalSign, CN = GlobalSign
notAfter=Jul 24 14:15:12 2029 GMT
subject=O = Entrust.net, OU = www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU = (c) 1999 Entrust.net Limited, CN = Entrust.net Certification Authority (2048)
notAfter=May 12 23:59:00 2025 GMT
subject=C = IE, O = Baltimore, OU = CyberTrust, CN = Baltimore CyberTrust Root
notAfter=Nov 27 20:53:42 2026 GMT