Skip to content

Instantly share code, notes, and snippets.

@matsuu
matsuu / .gitignore
Last active November 25, 2024 05:36
ISUCON用.gitignore
/*
!/.gitignore
!/README.md
# etc配下は再起動のたびに変化するものとセキュリティ関連と関係がないものを除外
!/etc/
/etc/ModemManager/
/etc/NetworkManager/
/etc/PackageKit/
/etc/X11/
@matsuu
matsuu / ddl.cypher
Created October 12, 2024 02:27
KuzuDB with yellow_tripdata
INSTALL httpfs;
LOAD EXTENSION httpfs;
CREATE NODE TABLE taxi_zone (
LocationID INT32,
Borough STRING,
Zone STRING,
service_zone STRING,
PRIMARY KEY (LocationID)
);
@matsuu
matsuu / yellow_tripdata-jupysql-duckdb.ipynb
Last active September 22, 2024 09:49
yellow_tripdata-jupysql-duckdb.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@matsuu
matsuu / mermaid-architecture.md
Created September 14, 2024 09:50
mermaid architecture diagram syntax

architecture

architecture-beta

    service internet(internet)[Internet]

    group cloud(cloud)[Cloud]

 service server(server)[Server] in cloud
@matsuu
matsuu / slow_query.sql
Last active November 23, 2023 13:07
performance_schemaを使用したスロークエリー抽出
-- ORDER BYとLIMITは必要応じて適宜修正
-- VIEWを作成すると便利
SELECT
count_star AS cnt,
sum_timer_wait/1e12 AS sum,
min_timer_wait/1e12 AS min,
avg_timer_wait/1e12 AS avg,
max_timer_wait/1e12 AS max,
sum_rows_sent AS sumRows,
sum_rows_sent/count_star AS avgRows,

Keybase proof

I hereby claim:

  • I am matsuu on github.
  • I am matsuu (https://keybase.io/matsuu) on keybase.
  • I have a public key ASCp9j9XZ7JCDk_co-nV9neHXnNx_7rH5X7MRmLAoW0d1go

To claim this, I am signing this object:

@matsuu
matsuu / .tmux.conf
Last active June 20, 2023 12:19
xxh configuration
# ~/.xxh/.xxh/plugins/xxh-plugin-prerun-dotfiles/home/.tmux.conf
set-window-option -g mode-keys vi
set-window-option -g automatic-rename off
set-option -g default-terminal "screen-256color"
set-option -g pane-active-border-style fg=red
@matsuu
matsuu / isucon12q.vtt
Last active November 9, 2022 11:51
Whisper.cpp(largeモデル)を使ってISUCON12予選の動画( https://youtu.be/LtsyLbD64CU )の文字起こしをした結果
WEBVTT
00:00:00.000 --> 00:00:04.000
(タイトルを読む)
00:00:04.000 --> 00:00:12.000
サーバーデプロイ方法がわからない
00:00:12.000 --> 00:00:22.000
テンプレートのダウンロード これか
@matsuu
matsuu / config.yaml
Last active August 26, 2022 13:10
.config/zellij/config.yaml
simplified_ui: true
pane_frames: false
default_mode: locked
mouse_mode: false
#copy_command: "pbcopy"
theme: penumbra-light++
themes:
# https://github.com/nealmckee/penumbra
@matsuu
matsuu / main.rs
Created July 16, 2022 11:55
isucon11q-rust
use actix_web::{web, HttpResponse};
use chrono::DurationRound as _;
use chrono::Offset as _;
use chrono::TimeZone as _;
use chrono::{DateTime, NaiveDateTime};
use futures::StreamExt as _;
use futures::TryStreamExt as _;
use std::collections::HashMap;
use std::fs::File;