This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic Vagrant config (API version 2) | |
Vagrant.configure(2) do |config| | |
config.vm.synced_folder ".", "/vagrant", type: "smb", smb_host: "10.0.2.2", disabled: false | |
config.vm.provider "qemu" do |qe, override| | |
override.ssh.username = "rocky" | |
override.ssh.password = "rocky" | |
qe.image_path = "~/Proj/RockyLinux9/qemu.qcow2" | |
qe.arch = "aarch64" | |
qe.machine = "virt,accel=hvf,highmem=on" | |
qe.cpu = "host" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# https://github.com/cgdb/cgdb/pulls | |
# https://cgdb.github.io/docs/cgdb.html | |
# http://miettal.hatenablog.com/entry/20120408/1333917572 | |
GDB=~/Work/tools/gcc-arm-none-eabi-8-2018-q4-major/bin/arm-none-eabi-gdb | |
cgdb -d $GDB -x target.gdb | |
# -- target.gdb -- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "adcc31eb.53895", | |
"type": "tab", | |
"label": "フロー 1", | |
"disabled": false, | |
"info": "" | |
}, | |
{ | |
"id": "1a1addc9.464b02", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pythonのデコレータを理解するための12Step | |
# https://qiita.com/_rdtr/items/d3bc1a8d4b7eb375c368#2-11 | |
# クロージャ | |
def outer(x): | |
def inner(): | |
print(x) | |
return inner |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XMOS/xTIMEcomposer/Community_14.3.3/bin$ diff -u xtimecomposer.org xtimecomposer | |
--- xtimecomposer.org 2018-11-29 02:30:44.964052684 +0900 | |
+++ xtimecomposer 2018-11-29 02:30:57.992111646 +0900 | |
@@ -158,7 +158,7 @@ | |
# have a go with the supplied webkit browser... | |
$vmargs .= "-vmargs"; | |
$vmargs .= " -Dorg.eclipse.swt.browser.UseWebKitGTK=True"; | |
- $ENV{LD_LIBRARY_PATH} = "$installpath/xtimecomposer_bin/swtbrowserlibs:$ENV{LD_LIBRARY_PATH}"; | |
+# $ENV{LD_LIBRARY_PATH} = "$installpath/xtimecomposer_bin/swtbrowserlibs:$ENV{LD_LIBRARY_PATH}"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stackoverflow.com/questions/14822342/typesafe-enums-in-c | |
#include <stdio.h> | |
/* type safe enum 1 */ | |
typedef enum { one, two, } num_t; | |
typedef struct { num_t num; } ts_num_t; | |
#define ONE ((ts_num_t){ one }) | |
#define TWO ((ts_num_t){ two }) | |
#if 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 'Nemuisan itsumono' build configurater for Linux. | |
# http://nemuisan.blog.bai.ne.jp/ | |
# Validated for archive Ver 20180301 | |
# | |
# created by osaboh | |
# | |
# usage: | |
# $ 7z x STM32F4xxxx_FatFs_DISP_20180301.7z |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* original */ | |
setL3GD20(); // 何を set するのか ? 他の初期化関数名では init を使用している。 | |
int getGyroZ( void ) | |
{ | |
int ret; | |
// *0.070 because you read l3gd20 manual // 重要そうな値なので名前つけて欲しい。マニュアル見るのめんどくさい。 | |
ret = ( readShiftByte(OUT_Z_H) | readByte(OUT_Z_L) ) * 0.070; // 左記の記述だとリード関数が複数必要な理由を読み手が考えてしまう。 | |
// どうしても関数を分けたいなら readByte() のラッパー関数を作る。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* bug.c */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void) | |
{ | |
int unused_val; /* 宣言してるが使ってない */ | |
int ary[] = {0, 1, 2, 3}; | |
int *p; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void) | |
{ | |
int unused_val; /* 使ってない */ | |
int ary[] = {0, 1, 2, 3}; | |
int *p; | |
p = malloc(sizeof(int) * 16); /* 代入してるが使ってない */ |
NewerOlder