Skip to content

Instantly share code, notes, and snippets.

View puhitaku's full-sized avatar
:octocat:
= 🐙 + 🐱

Takumi Sueda puhitaku

:octocat:
= 🐙 + 🐱
View GitHub Profile
@k16shikano
k16shikano / SKILL.md
Last active July 21, 2026 04:23
japanese-tech-writing/SKILL
name japanese-tech-writing
description 日本語の技術文書・書籍原稿の文章規範。整形(一文一行、引用ブロック、脚注、コラム記法)、段落と論証の構成(パラグラフライティング)、論証の厳密さ(ツッコミどころの除去)、読み手の負荷の管理、視点と語り、演出の抑制、LLM っぽい空句の禁止、冗長の排除を定める。日本語で技術書の章、草稿、記事、解説文を書くとき、または推敲・リライトするときに使用する。

日本語技術文書の文章規範

日本語で技術的な原稿(書籍の章、記事、解説文)を書く・推敲するときは、以下の規範に従う。

整形

@cemysce
cemysce / .bashrc
Last active May 5, 2026 16:49
Termux .bashrc snippet to override resolv.conf with Wi-Fi DHCP DNS config
# This is to help address this Termux/Android issue:
# https://github.com/termux/termux-packages/issues/1174
function _getAndroidAllDNS()
{
local -n dnsMapRef=$1
local -n domainMapRef=$2
# The logic here is from experimentation based on:
# https://www.reddit.com/r/termux/comments/1249mqx/use_dhcp_provided_dns_in_resolveconf/
@tomtwinkle
tomtwinkle / rsfsrom.sh
Last active February 7, 2021 09:33
Raspberry Pi rootfs ROM control function
# Raspberry Pi rootfs ROM control function
function rsfsrom() {
case $1 in
"status" )
raspi-config nonint get_overlay_now && echo "enable" || echo "disabled"
;;
"enable" )
sudo raspi-config nonint enable_overlayfs &&
echo -e "rootfs ROM is enable. system reboot required.\n> sudo systemctl reboot"
;;
@four0four
four0four / 01-zynq-uart.md
Last active March 29, 2026 19:11
Zynq BootROM Secrets - UART loader

Zynq BootROM Secrets: UART loader

Recently I acquired (md5: ADF639AFE9855EE86C8FAAD216C970D9) the Zynq bootrom, and during the reversing process uncovered some interesting secrets, one of which is an as-of-yet undocumented UART loader. As documented the Zynq bootrom will load from NOR/NAND/SPI flashes, eMMC/SDIO-based storage (unfortunately) not USB, or anything else more complex.

Not sure why Xilinx didn't document this. In my brief testing it is super unreliable if you just spit everything at once - they reset the RX/TX paths during the process, so timing is critical, but that might be the janky meter-long ftdi cable. You can change the baudrate during the process, but I was too lazy to do the math.

Here's the disassembly that made me look twice (that, and checks for the MIO boot_mode[2:0] that weren't specified in the docs :)):

ROM:0000A220 BL              uart_init
@end360
end360 / wave.magic
Created March 10, 2019 07:37
Simple wave format for binwalk I use to extract wav files from games.
# WAVE file signature
0 string RIFF WAVE File |
>4 lelong x Chunk Size: %d
>4 lelong+7 x {size:%d}
>8 string WAVE
>4 lelong+7 x {jump:%d}
@mholt
mholt / macapp.go
Last active March 6, 2026 15:42
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:

Raspberry Piにroot-roを適用する手順メモ (2018/3/26)

今回使用したイメージはRaspian Lite 2018-03-13版。 まずEtcherを使ってイメージをmicroSDへ書き込む。

イメージ書き込み後、PCからmicroSDにあるconfig.txtを編集する。

※以下の行を末尾に追加する

dtoverlay=pi3-miniuart-bt

@Mnkai
Mnkai / README.md
Last active July 11, 2026 09:52
TDP and turbo parameter modification with MSR on non-overclockable Intel CPU (such as Intel i7-8550U)

TDP and Turbo Parameter Modification with MSR on Non-Overclockable CPUs

Disclaimer

  • Modifying MSR may void your CPU's (or system board's) warranty. Proceed with caution. I am not responsible for any damage caused by this article.
  • MSR addresses vary significantly between CPUs. Check your CPU's MSR address using Intel's documentation.
  • This has only been tested on the Intel i7-8550U (Kaby Lake R).
  • This article is a translation of this article. If you can read Korean, I recommend reading that article instead.

Introduction

@nvsofts
nvsofts / lc82162.cfg
Last active November 23, 2017 10:02
OpenOCD config for SANYO LC82162 (ARM7TDMI)
source [find interface/ftdi/um232h.cfg]
transport select jtag
adapter_khz 200
source [find cpu/arm/arm7tdmi.tcl]
jtag newtap lc82162 cpu -irlen 4 -expected-id 0x3f1f0f0f
target create lc82162.cpu arm7tdmi -endian little -chain-position lc82162.cpu
reset_config trst_and_srst
@macrat
macrat / dynamic_typing_assertion.py
Last active September 9, 2017 14:06
pythonの型タイピングを使った動的なassert、の、構想。
import functools
import inspect
import typing
def istype(obj: typing.Any, typ: type) -> bool:
"""
>>> istype(1, int)
True
>>> istype('hoge', int)