Skip to content

Instantly share code, notes, and snippets.

💭
Busy
I may be slow to respond.

Ikiru Yoshizaki guitarrapc

View GitHub Profile
View interface_and_record.cs
void Main()
{
// Parametric Polymmorphism (Generics)
new Cat("ほげ").Name.Dump();
// Adhoc Polymmorphism (Generics + Property in C#)
GetSpecies(new Cat("ほげ")).Dump();
GetSpecies(new Dog("ほげ")).Dump();
// Mixin multiple type via Interface
@guitarrapc
guitarrapc / azure-pipelines.yml
Created Mar 13, 2019
Azure DevOps Pipeline Build for "dotnet core with Submodule"
View azure-pipelines.yml
resources:
repositories:
- repository: self
checkoutOptions:
submodules: true
pool:
vmImage: 'ubuntu-16.04'
#name: 'your pool name'
trigger:
batch: true
View pc_spec_20190308.md
hard sped note
CPU Corei7 8700 Ryzen もいい
Memory 32GB 16GBは足りない。64GB でもいい
Storage NVMe 512GB 256GB はありえない。
グラボ RTX2070 RTX2060 でも別にいいけど選ぶなら2070。モニタだけなら4K出力 + HDMI + Displayport あればok
モニタ 4K (43") 曲面がベター。人による。27" を縦にして組み合わせるのもあり。
キーボード Realforce2 昇華キートップ。HHKとかエルゴとか人による
マウス MxMaster2 MxAnywhere2s でも、トラックボードでも人による
@guitarrapc
guitarrapc / UnixtimeStamp.cs
Last active Feb 27, 2019
UnixtimeStamp and .NET DateTime converter.
View UnixtimeStamp.cs
// if you are using .NET 4.6 and higher, use `DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()`
private double GetUnixTimeStamp(DateTime date)
{
return date.ToUniversalTime().Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds;
}
// if you are using .NET 4.6 and higher, use `DateTimeOffset.FromUnixTimeMilliseconds(unixtimestamp)`
private DateTime GetDateTime(double unixtimestamp)
{
return new DateTime(1970, 1, 1).AddMilliseconds(unixtimestamp);
@guitarrapc
guitarrapc / PickNewJapaneseEra_flatten.cs
Last active Feb 27, 2019
Japan's new esa candidates. (新元号可能性のある2文字候補)
View PickNewJapaneseEra_flatten.cs
var words = @"亜哀挨愛曖悪握圧扱宛嵐安案暗以衣位囲医依委威為畏胃尉異移萎偉椅彙意違維慰遺緯域育一壱逸茨芋引印因咽姻員院淫陰飲隠韻右宇羽雨唄鬱畝浦運雲永泳英映栄営詠影鋭衛易疫益液駅悦越謁閲円延沿炎宴怨媛援園煙猿遠鉛塩演縁艶汚王凹央応往押旺欧殴桜翁奥横岡屋億憶臆虞乙俺卸音恩温穏下化火加可仮何花佳価果河苛科架夏家荷華菓貨渦過嫁暇禍靴寡歌箇稼課蚊牙瓦我画芽賀雅餓介回灰会快戒改怪拐悔海界皆械絵開階塊楷解潰壊懐諧貝外劾害崖涯街慨蓋該概骸垣柿各角拡革格核殻郭覚較隔閣確獲嚇穫学岳楽額顎掛潟括活喝渇割葛滑褐轄且株釜鎌刈干刊甘汗缶完肝官冠巻看陥乾勘患貫寒喚堪換敢棺款間閑勧寛幹感漢慣管関歓監緩憾還館環簡観韓艦鑑丸含岸岩玩眼頑顔願企伎危机気岐希忌汽奇祈季紀軌既記起飢鬼帰基寄規亀喜幾揮期棋貴棄毀旗器畿輝機騎技宜偽欺義疑儀戯擬犠議菊吉喫詰却客脚逆虐九久及弓丘旧休吸朽臼求究泣急級糾宮救球給嗅窮牛去巨居拒拠挙虚許距魚御漁凶共叫狂京享供協況峡挟狭恐恭胸脅強教郷境橋矯鏡競響驚仰暁業凝曲局極玉巾斤均近金菌勤琴筋僅禁緊錦謹襟吟銀区句苦駆具惧愚空偶遇隅串屈掘窟熊繰君訓勲薫軍郡群兄刑形系径茎係型契計恵啓掲渓経蛍敬景軽傾携継詣慶憬稽憩警鶏芸迎鯨隙劇撃激桁欠穴血決結傑潔月犬件見券肩建研県倹兼剣拳軒健険圏堅検嫌献絹遣権憲賢謙鍵繭顕験懸元幻玄言弦限原現舷減源厳己戸古呼固孤弧股虎故枯個庫湖雇誇鼓錮顧五互午呉後娯悟碁語誤護口工公勾孔功巧広甲交光向后好江考行坑孝抗攻更効幸拘肯侯厚恒洪皇紅荒郊香候校耕航貢降高康控梗黄喉慌港硬絞項溝鉱構綱酵稿興衡鋼講購乞号合拷剛傲豪克告谷刻国黒穀酷獄骨駒込頃今困昆恨根婚混痕紺魂墾懇左佐沙査砂唆差詐鎖座挫才再災妻采砕宰栽彩採済祭斎細菜最裁債催塞歳載際埼在材剤財罪崎作削昨柵索策酢搾錯咲冊札刷刹拶殺察撮擦雑皿三山参桟蚕惨産傘散算酸賛残斬暫士子支止氏仕史司四市矢旨死糸至伺志私使刺始姉枝祉肢姿思指施師恣紙脂視紫詞歯嗣試詩資飼誌雌摯賜諮示字寺次耳自似児事侍治持時滋慈辞磁餌璽鹿式識軸七叱失室疾執湿嫉漆質実芝写社車舎者射捨赦斜煮遮謝邪蛇尺借酌釈爵若弱寂手主守朱取狩首殊珠酒腫種趣寿受呪授需儒樹収囚州舟秀周宗拾秋臭修袖終羞習週就衆集愁酬醜蹴襲十汁充住柔重従渋銃獣縦叔祝宿淑粛縮塾熟出述術俊春瞬旬巡盾准殉純循順準潤遵処初所書庶暑署緒諸女如助序叙徐除小升少召匠床抄肖尚招承昇松沼昭宵将消症祥称笑唱商渉章紹訟勝掌晶焼焦硝粧詔証象傷奨照詳彰障憧衝賞償礁鐘上丈
@guitarrapc
guitarrapc / datadog_logmanagement_iis.parser
Last active Feb 21, 2019
W3CExtended log parser for IIS on Datadog Log Management Pipeline
View datadog_logmanagement_iis.parser
W3CExtended %{date("yyyy-MM-dd HH:mm:ss"):date_access} %{word:http.ident} %{word:http.hostname} %{ip:server.ip} %{word:http.method} %{notSpace:http.url:nullIf("-")} (%{data:request:keyvalue("=","/:")}) %{number:server.port} %{data:user.name:nullIf("-")} %{ip:network.client.ip} HTTP\/%{regex("\\d+\\.\\d+"):http.version} %{data:useragent:useragent(false)} (%{data:cookie:keyvalue("=","/:")})\|%{date("yyyy-MM-dd'T'HH:mm:ss.SSSZ"):cookie.date};\+(_ga=%{data:cookie.ga}) %{notSpace:http.referer} %{notSpace:http.server_name} %{number:http.status_code} %{number:http.sub_status_code} %{number:iis.win_32_status} %{number:network.bytes_written} %{number:network.bytes_read} %{number:duration:scale(1000)}
View AzNsgSourceIp.psm1
#Required -Version 6.1
#required -Module Az
using namespace Microsoft.Azure.Commands.Network.Models
using namespace System.Collections.Generic
class AzureNSGSecurityGroupDetail{
[PSNetworkSecurityGroup]$NetworkSecurityGroup
[PSSecurityRule]$NetworkSecurityRule
[string]$CurrentRuleName
[string]$NewRuleName
View tools\chocolateyInstall.ps1
$ErrorActionPreference = 'Stop'
$DisplayName = 'Adobe Acrobat Reader DC MUI'
$MUIurl = 'http://ardownload.adobe.com/pub/adobe/reader/win/AcrobatDC/1901020064/AcroRdrDC1901020064_MUI.exe'
$MUIchecksum = '81953f3cf426cbe9e6702d1af7f727c59514c012d8d90bacfb012079c7da6d23'
$MUImspURL = 'ftp://ftp.adobe.com/pub/adobe/reader/win/AcrobatDC/1901020064/AcroRdrDCUpd1901020064_MUI.msp'
$MUImspChecksum = '4e8c707c1f6f6999862876cb99143a85a1fe6053e2702471d5703ed5954faee6'
$MUIinstalled = $false
View tools\chocolateyInstall.ps1
$ErrorActionPreference = 'Stop'
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
. $toolsPath\helpers.ps1
$pp = Get-PackageParameters
Set-InstallerRegistrySettings $pp
Stop-GitSSHAgent
You can’t perform that action at this time.