Skip to content

Instantly share code, notes, and snippets.

@minagi-yu
minagi-yu / 74hc100.csv
Last active February 24, 2024 05:35
74HCシリーズ百選
Device Description
00 Quadruple 2-Input NAND Gates
02 Quadruple 2-Input NOR Gates
03 Quadruple 2-Input NAND Gates with Open-Drain Outputs
04 Hex Inverters
05 Hex Inverters with Open-Drain Outputs
08 Quadruple 2-Input AND Gates
10 Triple 3-Input NAND Gates
11 Triple 3-Input AND Gates
14 Hex Inverters with Schmitt-Trigger Inputs
@minagi-yu
minagi-yu / NanoPi-NEO2.conf
Created January 5, 2023 12:32
FreeBSD13.1 release.sh configuration for NanoPi NEO2
#!/bin/sh
#
# $FreeBSD$
#
SRCBRANCH="releng/13.1"
EMBEDDED_TARGET_ARCH="aarch64"
EMBEDDED_TARGET="arm64"
EMBEDDEDBUILD=1
EMBEDDEDPORTS="sysutils/u-boot-nanopi-neo2"
@minagi-yu
minagi-yu / z-snap.sh
Last active July 9, 2022 07:57
Shell script to take periodically ZFS snapshot
#!/bin/sh
# crontab
# ---
# */5 * * * * z-snap.sh minutely
# 1 * * * * z-snap.sh hourly
# 2 3 * * * z-snap.sh daily
# 3 4 * * 0 z-snap.sh weekly
# 4 5 1 * * z-snap.sh monthly
void swap(void *src, void *dst, size_t size)
{
char tmp;
char *sp = (char *)src;
char *dp = (char *)dst;
do {
tmp = *sp;
*sp++ = *dp;
*dp++ = tmp;
@minagi-yu
minagi-yu / LICENSE
Created December 13, 2019 13:20
組み込みソフト用のライセンス
Copyright <YEAR> <COPYRIGHT HOLDER>
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following condition is met:
1. Redistributions of source code must retain the above copyright notice, this condition and the following disclaimer.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@minagi-yu
minagi-yu / .clang-format
Last active December 8, 2019 09:51
お気に入りのCスタイルのclang-format設定ファイル。K&R風。
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true