このメモは、私(@ymmt2005)が長年にわたってソフトウェアプロダクト開発に関わってきて 2022年現在こうしたほうが良いと考えているベストプラクティスです。
科学的な分析等に基づくわけではない経験則であるため、今後も随時見直すことがありますし、 ここに書いてあることが常に正しいわけでもあらゆるソフトウェア開発に適するわけでもありません。
しかしながら、実務経験が豊富で、モダンな技術スタックに明るいエンジニアの経験則は一定の 役に立つのではないかと考えて記します。
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <fcntl.h> | |
| #include <sys/mman.h> | 
| """ | |
| 12ビットの符号付き整数の16進数(1桁+2桁が別の変数) -> 10 | |
| data1: 4bit | |
| data2: 12bit | |
| total: 16bit | |
| """ | |
| # data1: 0xF, data2: 0xFF | |
| def convert_two_complement_hex_to_dec(data1, data2): | 
| DUMP_FILE = "CANDUMP.log" | |
| can_id_array = [] | |
| with open(DUMP_FILE, 'r') as f: | |
| while True: | |
| data = f.readline() | |
| if not data: | |
| break | 
| python | |
| # GDB dashboard - Modular visual interface for GDB in Python. | |
| # | |
| # https://github.com/cyrus-and/gdb-dashboard | |
| # License ---------------------------------------------------------------------- | |
| # Copyright (c) 2015-2022 Andrea Cardaci <[email protected]> | |
| # | 
| using System; | |
| using System.IO; | |
| using System.IO.MemoryMappedFiles; | |
| using System.Runtime.InteropServices; | |
| public class HelloWorld | |
| { | |
| static public void Main () | |
| { | |
| string MappedMemoryFileName = "/tmp/mmf"; | 
| import glob | |
| import subprocess | |
| dir = "/path/to/dir" | |
| files = glob.glob(dir + "*") | |
| files.sort() | |
| for file in files: | |
| r = subprocess.run(["xxd", file], stdout=subprocess.PIPE) | |
| with open("output.txt", "a") as f: | 
| from java.awt import Color | |
| from ghidra.util.task import ConsoleTaskMonitor | |
| from ghidra.program.model.block import BasicBlockModel | |
| from docking.options.editor import GhidraColorChooser | |
| """ | |
| Ghidra script to colorize all basic blocks identified by the input file. | |
| Prompts for a file to use as input. This script will attempt to sanity check | |
| that a basic block actually does start at each provided address. | 
apt install -y python3-pip can-utils socat openocd
pip3 install python-can pyserial
| #!/bin/sh | |
| # | |
| # Retrial VMWare Fusion another 30 days | |
| # | |
| set -eu | |
| sudo rm -rf /Library/Preferences/VMware\ Fusion/license-fusion-* | |
| echo "Done! please restart VMware Fusion.app." |