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 / dns.txt
Last active November 24, 2025 17:32
Youtube Block URL list for Web and App. If you put following urls into block list, then user under control will be blocked from accessing youtube .
# https://support.google.com/a/answer/6214622?hl=en#zippy=%2Coption-dns
# CNAME to restrict.youtube.com
www.youtube.com
m.youtube.com
youtubei.googleapis.com
youtube.googleapis.com
www.youtube-nocookie.com
@itn3000
itn3000 / DeserializeJsonLines.cs
Last active October 25, 2024 05:58
Deserializing JSON Lines test
using System;
using System.IO;
using System.Text;
using System.Text.Json;
// need System.Text.Json 9.0 or later
namespace jsonserializertest
{
class Program

tl;dr

高円寺の南のほうのあたりで、ちょっとした新築共同住宅プロジェクトを立ち上げてみたいと思っています。つきましては、このプロジェクトの趣旨とノリに賛同してくださって居住してくださる方をふわっと募集します。

My New Gear...

最近、高円寺の南のほうのあたりに築古賃貸物件を買ってみました。物件概要はざっくり以下のような感じです。

  • 立地: 丸の内線東高円寺駅徒歩5分、JR中央線中野駅徒歩12分(Google調べ)
  • 地積: 110平米と120平米の間ぐらい
  • 建物: 築およそ30年の2階建て木造アパートを賃貸運用中

この建物には問題がある!

@akarpov89
akarpov89 / InterpolatedParsing.cs
Created October 1, 2021 14:58
Interpolated parsing technique
using System.Runtime.CompilerServices;
using static ParsingExtensions;
string input = "Name: Andrew; Age: 31";
string? name = null;
int age = 0;
if (input.TryParse($"Name: {Placeholder(ref name)}; Age: {Placeholder(ref age)}"))
{
@E-K
E-K / OpenHereWindowsTerminal.ps1
Last active August 1, 2020 22:07
WindowsTerminalのsettings.jsonを読み込んでOpenHereメニューを作るpowershellスクリプト
#Requires -Version 7.0
Set-StrictMode -Version Latest
function CreateSubCommand {
param (
$prof,
[bool]$admin
)
$regKeyName = $prof.guid
@ybiquitous
ybiquitous / secretlint.yml
Last active May 13, 2021 08:46
Secretlint out of the box via GitHub Actions
# https://github.com/secretlint/secretlint
name: secretlint
on:
push:
branches: ['main']
pull_request:
branches: ['**']
jobs:
@neuecc
neuecc / DiffUtil.cs
Last active January 21, 2020 19:02
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Cysharp.Reflection
{
public static class DiffUtil
@yfakariya
yfakariya / MicrosoftExtensionsDependencyInjectionDeepDive.md
Created November 4, 2019 11:47
Deep dive of Microsoft.Extensions.DependencyInjection in Japanese

Microsoft.Extensions.DependencyInjection Deep Dive

そんなに深くない気がしますが。Microsoft.Extensions.DependencyInjection の DI についてざっくりまとめた記事です。なお、長いので、Microsoft.Extensions.DependencyInjectionM.E.DI と略します。

例によって、公式ドキュメント にすべて書いてある、はずですが、ここでは少し別の観点でまとめてみます。また、ドキュメントに書いてない(と思う)内部実装についてもいくつか書いてあります。

使い方

  • IServiceCollection の拡張メソッドを使用して、フレームワークやランタイムが提供する IServiceCollection の実装に対して登録していきます。
  • IServiceCollectionServiceDescriptor というサービスについてのスペックを表すオブジェクトのコレクションである。ServiceDescriptor はサービス型をキーにして、ライフタイムと実装を持ちます。