Skip to content

Instantly share code, notes, and snippets.

View musaprg's full-sized avatar
🐱
meow meow

Kotaro Inoue musaprg

🐱
meow meow
View GitHub Profile
@musaprg
musaprg / karabiner.json
Created April 9, 2025 04:41
Karabiner Elements Config to switch key locale
{
"profiles": [
{
"devices": [
{
"disable_built_in_keyboard_if_exists": true,
"identifiers": {
"is_keyboard": true,
"product_id": 256,
"vendor_id": 2131
@fumiya-kume
fumiya-kume / .cursorrules
Created January 11, 2025 14:26
.cursorrules in 2025/01/11
# .cursorrules
# Development Steps for CLI Application in Go
## 1. Overall Design
- Define the purpose and scope of the CLI application.
- Identify the target audience and their needs.
- Outline the main features and functionalities.
- Create a high-level architecture diagram.
- **Improve Specifications/Features:**
@thesamesam
thesamesam / xz-backdoor.md
Last active April 29, 2025 14:00
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

package main
import (
"flag"
"fmt"
"math/rand"
"net"
"net/http"
"net/rpc"
"strings"
@siketyan
siketyan / flets-transix-vyos-dhcpv6pd.conf
Created December 22, 2022 08:03
VyOS configuration for FLET'S network w/ a Transix tunnel and DHCPv6-PD client
interfaces {
ethernet eth0 {
hw-id [REDACTED]
}
ethernet eth1 {
dhcpv6-options {
duid 00:03:00:01:[REDACTED]
pd 0 {
interface eth2 {
address 1
@greymd
greymd / sudo新一.md
Last active April 30, 2025 05:47
sudo新一

 オレは高校生シェル芸人 sudo 新一。幼馴染で同級生の more 利蘭と遊園地に遊びに行って、黒ずくめの男の怪しげな rm -rf / 現場を目撃した。端末をみるのに夢中になっていた俺は、背後から近づいてきたもう1人の --no-preserve-root オプションに気づかなかった。 俺はその男に毒薬を飲まされ、目が覚めたら・・・ OS のプリインストールから除かれてしまっていた!

sudo がまだ $PATH に残っていると奴らにバレたら、また命を狙われ、他のコマンドにも危害が及ぶ』

 上田博士の助言で正体を隠すことにした俺は、 which に名前を聞かれて、とっさに『gnuplot』と名乗り、奴らの情報をつかむために、父親がシェル芸人をやっている蘭の $HOME に転がり込んだ。ところが、このおっちゃん・・・とんだヘボシェル芸人で、見かねた俺はおっちゃんになりかわり、持ち前の権限昇格能力で、次々と難タスクを解決してきた。おかげで、おっちゃんは今や世間に名を知られた名エンジニア、俺はといえばシェル芸 bot のおもちゃに逆戻り。クラスメートの convertojichattextimg にお絵かきコマンドと誤解され少年ワンライナーお絵かき団を結成させられる始末。

 ではここで、博士が作ってくれたメカを紹介しよう。最初は時計型麻酔 kill 。ふたについた照準器にあわせてエンターを押せば、麻酔シグナルが飛び出し、プロセスを瞬時に sleep させることができる。 次に、蝶ネクタイ型 banner 。裏についているダイヤルを調整すれば、ありとあらゆる大きさのメッセージを標準出力できる。必殺のアイテムなら fork 力増強シューズ。電気と磁力で足を刺激し、 :(){ :|:& };: でプロセステーブ

@gfx
gfx / 001-wifi-routers-v2.md
Last active September 27, 2024 16:23
Wi-Fiルーターおすすめ by 妻

概要

  • ネットーワーク機器のマーケ担当をしてる妻から聞いた、Wi-Fiルータのオススメ(「同僚のメーカー担当ごとに己の”最強”を選んでもらった」とのこと)です
  • 「ルーターにはWi-Fiルータだけじゃなく他にもいろいろあるんだよ!これはWi-Fiルータのことね」と言われたのでタイトルを変えました
  • 「AXほにゃらら」は規格(AX = Wi-Fi 6)+速度の参考値とのことです
  • もともとの文脈: 家庭内の雑談をツイートしたところ( https://twitter.com/__gfx__/status/1464084908091920387 )知人が反応したので妻に「ルータのおすすめ教えてと知人がいってるのでなんか教えて」といって教えてもらったのが元です
  • 下にあるv1.md が最初のやつ(2021/11/26)で、このv2.md がホッテントリ入りしたあとの改訂版(2021/11/27)です

追記(2022/05/24):

  • TP-Linkはちょいちょいやらかしがあります

GoでISUCONを戦う話

mercari.go #4 https://mercari.connpass.com/event/105640/

自己紹介

  • catatsuyというIDで各種SNS活動しています
    • かたついって呼ばれています
  • メルカリのSREチームで主にGoを書いています
  • 前職はピクシブでpixivのHTTPS化・PHP7.1化・HTTP/2化や、広告サーバーの新機能追加など色々やっていました
@musaprg
musaprg / install.sh
Last active August 11, 2018 16:37
環境構築(Mac) #deprecated go to musaprg/dotfiles https://github.com/musaprg/dotfiles
#!/bin/sh
DOTFILESDIR=`readlink -f .`
# Move all dotfiles here (before all intstructions begin)
ln -snfv ${DOTFILESDIR}/.vimrc $HOME/.vimrc
ln -snfv ${DOTFILESDIR}/.vim $HOME/.vim
# For macOS El Capitan or later version users
# You need to disable SIP security option.
@8q
8q / yakudo.py
Created June 25, 2018 15:08
mis1yakudo
import numpy as np
import cv2
orig = cv2.imread('src.png').astype(np.float32)
width, height, _ = orig.shape
center_x, center_y = width/4, height/2
blur, iterations = 0.008, 20
map_x1 = np.fromfunction(lambda y, x: x, (width, height), dtype=np.float32)
map_y1 = np.fromfunction(lambda y, x: y, (width, height), dtype=np.float32)