Skip to content

Instantly share code, notes, and snippets.

View sh1ma's full-sized avatar
💤
she_is_wired

Kota Amasaka sh1ma

💤
she_is_wired
View GitHub Profile
@sh1ma
sh1ma / .zshrc
Created September 20, 2025 06:08
(zsh用)fzfとghqを使って `ctrl + ]` 押下時にgitリポがfuzzy searchできるようにするやつ
function _fzf_cd_ghq() {
local root="$(ghq root)"
local repo="$(ghq list | fzf --preview="ls -AF --color=always ${root}/{1}")"
local dir="${root}/${repo}"
if [[ -z "${repo}" ]]; then
zle reset-prompt
return 0
fi
[ -n "${dir}" ] && cd "${dir}"
zle accept-line
@sh1ma
sh1ma / decode_compressed_eisa_id.py
Created May 13, 2025 09:05
32-bit compressed EISA type ID decode
def decode_eisa_id(eisa_id: int):
eisa_id = int.from_bytes(eisa_id.to_bytes(4, "little"), "big")
vendor = ""
vendor_bits = (eisa_id >> 16) & 0xFFFF
char1_val = (vendor_bits >> 10) & 0x1F
char2_val = (vendor_bits >> 5) & 0x1F
char3_val = vendor_bits & 0x1F
vendor += chr(char1_val + 0x40)
@sh1ma
sh1ma / dsdt.dsl
Created May 12, 2025 08:53
TOUGHPAD FZ-G1 ACPI DSDT Table
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20250404 (64-bit version)
* Copyright (c) 2000 - 2025 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of dsdt.dat
*
* Original Table Header:
@sh1ma
sh1ma / main.py
Created August 13, 2020 19:09
pythonでcase
import enum
class Color(enum.Enum):
BLACK = enum.auto()
WHITE = enum.auto()
color_text = "black"
@sh1ma
sh1ma / libsandbox.1.tbd
Created July 19, 2020 16:48
libsandbox.1.tbd
---
archs: [arm64]
install-name: /usr/lib/libsandbox.1.dylib
platform: ios
current-version: 1217.120.7
compatibility-version: 1
exports:
- archs: [arm64]
symbols: [
@sh1ma
sh1ma / gist:3440be2cc40e871282a768c98001aba1
Created May 18, 2020 14:45
frida-iOS-syscall-tracerで出力した結果の一部
[22531]: stat : 188
[22531]: stat : 188
[22531]: stat : 188
[22531]: stat : 188
[22531]: stat : 188
[22531]: stat : 188
[22531]: stat : 188
[22531]: stat : 188
[22531]: stat : 188
[22531]: stat : 188
@sh1ma
sh1ma / main.md
Last active December 10, 2019 21:41
KDLT(Keyword-Driven Lightning Talks)の草案

KDLT(Keyword-Driven Lightning Talks)

KDLTとは

その名の通りKeyword-Driven(キーワード駆動)で進めていくLTのことです。

定められたキーワードについてLTを行います。

プレゼンを楽しむのはもちろんのこと、プレゼン能力や特定の分野における知識量、或いは未知のキーワードについて調査する能力を競ったり量ったりするのに有用かもしれません。

Keybase proof

I hereby claim:

  • I am 4masaka on github.
  • I am 4masaka (https://keybase.io/4masaka) on keybase.
  • I have a public key ASABHZYtflgp8rsoN2iqrUEIJgAsziRFr8SSjmCqcfezZAo

To claim this, I am signing this object:

@sh1ma
sh1ma / spdyChangeHeaderMap.txt
Created May 23, 2019 06:48
spdyChangeHeaderMap
{
"ad_lass" = {
"X-LPV" = "x-lpv";
};
"ad_showcase" = {
"X-LPV" = "x-lpv";
};
"ad_stats" = {
"X-LPV" = "x-lpv";
};
mainURL /S4
registrationURL /api/v4/TalkService.do
operationsURL /P4
operations5URL /P5
normalOperationsURL /NP4
normalOperation5URL /NP5
compactMessagesURL /CA5
encryptedCompactMessagesURL /ECA5
forcePublishURL /CP4
signOutURL /F4