Skip to content

Instantly share code, notes, and snippets.

@matsuu
matsuu / .gitignore
Created September 23, 2023 10:03
ISUCON用.gitignore
/*
!/.gitignore
!/README.md
# etc配下は再起動のたびに変化するものとセキュリティ関連と関係がないものを除外
!/etc/
/etc/ModemManager/
/etc/NetworkManager/
/etc/PackageKit/
/etc/X11/

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 / 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;
#!/usr/bin/env bash
function sshrc() {
local SSHHOME=${SSHHOME:=~}
if [ -f $SSHHOME/.sshrc ]; then
local files=.sshrc
if [ -d $SSHHOME/.sshrc.d ]; then
files="$files .sshrc.d"
fi
SIZE=$(tar cfz - -h -C $SSHHOME $files | wc -c)
--- src/main.rs.orig 2022-06-14 21:26:10.771842719 +0900
+++ src/main.rs 2022-06-14 21:28:46.817699137 +0900
@@ -5,7 +5,12 @@
use chrono::{DateTime, NaiveDateTime};
use futures::StreamExt as _;
use futures::TryStreamExt as _;
-use std::collections::{HashMap, HashSet};
+use std::collections::HashMap;
+
+use std::fs::File;
@matsuu
matsuu / Dockerfile
Last active June 26, 2022 00:44
aarch64用AppImageを作成するためのパッチ
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN \
apt update && \
apt upgrade -y && \
apt install -y automake cmake curl g++ gettext git libtool-bin make pkg-config unzip && \
git clone -b stable --single-branch --depth 1 https://github.com/neovim/neovim.git
#set-window-option -g utf8 on
set-window-option -g mode-keys vi
set-window-option -g automatic-rename off
set-window-option -g allow-rename off
#set-window-option -g aggressive-resize on
set-window-option -g window-status-current-format '#[bg=colour2,fg=colour255]#{?client_prefix,#[bg=colour3],} #I #W '
set-option -g escape-time 50
set-option -g focus-events on
set-option -g status-right "#h | %Y-%m-%d %H:%M:%S#[default]"
@matsuu
matsuu / kayac-isucon-2022.sh
Created May 19, 2022 12:09
カヤック社内ISUCONとほぼ同じ環境を構築するためのシェルスクリプト
#!/bin/sh
#
# カヤック社内ISUCONと同じ環境を構築するための簡易シェルスクリプト
#
# * Ubuntu 20.04(focal)を用意してください
# * systemdが動作する環境が必要です
# * WSL2環境の場合は [Distrod](https://github.com/nullpo-head/wsl-distrod) がオススメです
#
set -exu