Skip to content

Instantly share code, notes, and snippets.

View master-q's full-sized avatar
🌴
On vacation

Kiwamu Okabe master-q

🌴
On vacation
View GitHub Profile
@master-q
master-q / 00_infer_terminal.sh
Last active April 26, 2024 16:19
Infer for Linux kernel with some patches
$ mkdir ~/src
$ cd ~/src
$ git clone [email protected]:facebook/infer.git
$ cd infer
$ patch -p1 < ~/Downloads/01_infer.patch
$ ./build-infer.sh clang
$ export PATH=~/src/infer/infer/bin:$PATH
$ cd ~/src
$ git clone [email protected]:torvalds/linux.git
$ cd linux
@master-q
master-q / memo_nuttx.rd
Created September 18, 2021 11:40
NuttXお試しメモ
= NuttXお試しメモ
[2021-09-18 19:11]
<<<NuttX
<<<RTOS
== シミュレータ
https://nuttx.apache.org/docs/latest/quickstart/install.html
https://nuttx.apache.org/docs/latest/guides/simulator.html
@master-q
master-q / dot.zshrc
Last active December 21, 2019 02:09
日本のスターバックスのWiFiが一定時間で切断されるようになったので簡易監視を作った
function do_network_auto_reconnect {
while true; do
ping -c1 google.com > /dev/null
if [ "$?" != "0" ]; then
sudo /etc/init.d/network-manager restart
sleep 30;
fi
sleep 1;
done
}
@master-q
master-q / gist:192d516ea670b5b6ec6d8635b0b30953
Created November 20, 2019 05:50
Why we can't change size of malloc heap for PSoC 6?
$ vi libs/TARGET_CY8CPROTO-062-4343W/startup/TOOLCHAIN_GCC_ARM/startup_psoc6_02_cm4.S
--snip--
__StackTop:
.size __StackTop, . - __StackTop
.section .heap
.align 3
.equ Heap_Size, 0x00000100
.globl __HeapBase
.globl __HeapLimit
@master-q
master-q / memo.md
Last active November 17, 2019 07:11
Metasepiプロジェクト進捗報告 2019年11月 (日本Androidの会秋葉原支部ロボット部 第86回勉強会)
@master-q
master-q / dot.zshrc
Last active November 17, 2019 23:37
Amazon S3にPCのディレクトリをバックアップする方法
function do_aws_s3_private_backup {
du -sh $HOME/Sounds $HOME/Family
aws s3 sync --delete $HOME/Sounds s3://masterq-private/Sounds
aws s3 sync $HOME/Family s3://masterq-private/Family
}
@master-q
master-q / hats_includes_hats.txt
Last active August 7, 2019 07:25
What does hats include?
$ grep -A 2 "\#include" `find . -name "*.hats"`
./npm-utils/contrib/libats-/hwxi/jsonats/mylibies_link.hats:local #include"./DATS/jsonats.dats" in end
./npm-utils/contrib/libats-/hwxi/jsonats/mylibies_link.hats-//
./npm-utils/contrib/libats-/hwxi/jsonats/mylibies_link.hats-(* ****** ****** *)
--
./npm-utils/contrib/libats-/hwxi/fworkshop/mydepies.hats:#include
./npm-utils/contrib/libats-/hwxi/fworkshop/mydepies.hats-"$PATSHOMELOCS\
./npm-utils/contrib/libats-/hwxi/fworkshop/mydepies.hats-/atscntrb-hx-threadkit/mylibies.hats"
--
./npm-utils/contrib/libats-/hwxi/polyglot/mylibies_link.hats:#include "./DATS/filetype.dats"
@master-q
master-q / 00run.sh
Created May 27, 2019 10:12
How to inject ATS's DWARF debug info
$ gcc -g -I /home/kiwamu/src/ATS-Postiats/ccomp/runtime/ -I /home/kiwamu/src/ATS-Postiats/ main_dats.c
$ gdb a.out
(gdb) b main.dats:atspre_g0int_add_int
Breakpoint 1 at 0x120a: file /home/kiwamu/src/ATS-Postiats/prelude/CATS/integer.cats, line 157.
(gdb) run
Starting program: /home/kiwamu/src/idiomaticca/regress/noinc/arithmetic_op/a.out
Breakpoint 1, atspre_g0int_add_int (x1=1, x2=2) at /home/kiwamu/src/ATS-Postiats/prelude/CATS/integer.cats:157
157 (atstype_int x1, atstype_int x2) { return (x1 + x2) ; }
(gdb) bt
@master-q
master-q / memo.rd
Created May 27, 2019 09:10
#Vala はどうやって #DWARF を吐くのか
= ValaはどうやってDWARFを吐くのか
[2019-05-27 16:20]
<<<Vala
<<<DWARF
== 参考
"Projects/Genie/Developing - GNOME Wiki!" https://wiki.gnome.org/Projects/Genie/Developing
"Valaのデバッグ[メモ] | TIPS" http://1204lts.blogspot.com/2014/01/vala.html
@master-q
master-q / cat.c
Last active February 1, 2019 08:34
corrodeにBSDなcatをかけてみた
/* $OpenBSD: cat.c,v 1.26 2016/10/19 18:20:25 schwarze Exp $ */
/* $NetBSD: cat.c,v 1.11 1995/09/07 06:12:54 jtc Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Kevin Fall.
*