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 / 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 / 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",
};
@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)
<#
.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
@guitarrapc
guitarrapc / run.sh
Last active August 23, 2023 02:57
Use verdaccio contains wget to health check container.
#!/bin/bash
set -e
# run container
containerId=$(docker run -d --rm -p 4873:4873 verdaccio/verdaccio:5.24.0)
# health check should success
wget -q -O - http://localhost:4873/-/ping || exit 1
# kill container
@guitarrapc
guitarrapc / README.md
Created August 8, 2023 08:34
Install selected component of Visual Studio Installer.

WHAT IS THIS?

Install Visual Studio Installler's CMake via setup.exe.

"C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe" modify --quiet --force --norestart --productId "Microsoft.VisualStudio.Product.BuildTools" --channelId "VisualStudio.17.Release" --add "Microsoft.VisualStudio.Component.VC.CMake.Project"

Progress

@guitarrapc
guitarrapc / Install-WinGetWindowsSErver2022.ps1
Last active August 9, 2023 09:38
Download and install winget v1.5.1881 to Windows Server 2022
# download
curl.exe -sSf -L -o "$env:UserProfile/Downloads/Microsoft.UI.Xaml.2.7.x64.appx" https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.7.3/Microsoft.UI.Xaml.2.7.x64.appx
curl.exe -sSf -L -o "$env:UserProfile/Downloads/Microsoft.VCLibs.x64.14.00.Desktop.appx" https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx
curl.exe -sSf -L -o "$env:UserProfile/Downloads/winget-cli.v1.5.1881.msixbundle" https://github.com/microsoft/winget-cli/releases/download/v1.5.1881/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
curl.exe -sSf -L -o "$env:UserProfile/Downloads/winget-cli-c6bee58ade21451eb54dc52e559a314c_License1.v1.5.1881.xml" https://github.com/microsoft/winget-cli/releases/download/v1.5.1881/c6bee58ade21451eb54dc52e559a314c_License1.xml
# install
Add-AppxPackage -Path "$env:UserProfile/Downloads/Microsoft.UI.Xaml.2.7.x64.appx"
Add-AppxPackage -Path "$env:UserProfile/Downloads/Microsoft.VCLibs.x64.14.00.Desktop.appx"
Add-AppxPackage -Path "$env:UserProfile/Downloads/winget-cli.v1.5.18
@guitarrapc
guitarrapc / README.md
Last active July 31, 2023 05:20
[Markdown] An option to highlight a "Note" and "Warning" using blockquote (Beta) https://github.com/orgs/community/discussions/16925

New (2023/July/28)

> [!NOTE]  
> Highlights information that users should take into account, even when skimming.

> [!IMPORTANT]  
> Crucial information necessary for users to succeed.

> [!WARNING]  
@guitarrapc
guitarrapc / README.md
Created July 3, 2023 18:42
git clone + submodule clone with shallow-clone difference.
command clone depth submodule depth total sec
--depth + submodule --depth 1 1 125sec
--depth --single-branch + submodule depth 1 1 127sec
--depth --single-branch --recursive 1 1 109sec
--depth + submodule --depth 100 1 126sec
--depth --single-branch + submodule depth 100 1 114sec
--depth --single-branch --recursive 100 100 107sec
--depth + submodule --depth 100 100 102sec
--depth --single-branch + submodule depth 100 100 108sec