Skip to content

Instantly share code, notes, and snippets.

View glyzinie's full-sized avatar
🐈‍⬛
今日も一日がんばるぞい!٩( ‘ω’ )و

Wis glyzinie

🐈‍⬛
今日も一日がんばるぞい!٩( ‘ω’ )و
View GitHub Profile
#include <M5Unified.h>
// NMEA文受信用バッファサイズ
#define NMEA_BUFFER_SIZE 128
// 定数化:ヘッダー部分のトークン数
#define GSV_HEADER_SKIP 3 // GSV文:$GPGSV,総メッセージ数,メッセージ番号,視認衛星数 のスキップ
#define GSA_HEADER_SKIP 2 // GSA文:$GPGSA,モード,固定状態 のスキップ
#define GSA_USED_COUNT 12 // GSA文:使用中衛星番号の項目数
// Run this with [Bun](https://bun.sh)
const CF_IP_PREFIX = "2606:4700::";
const ipv4 = Bun.argv[2]?.split(".").map(Number);
if (
!ipv4 ||
ipv4.length !== 4 ||
ipv4.some((n) => Number.isNaN(n) || n < 0 || n > 255)
) {
console.log("Usage: bun run index.ts <ipv4>");
process.exit(1);
{
"group": {
"group": "AWS S3",
"action": {
"status": 1
}
},
"rules": [
{
"PK": "s3.us-east-2.amazonaws.com",
! NEC Portable Internetwork Core Operating System Software
! IX Series IX3315 (magellan-sec) Software, Version 10.9.11, RELEASE SOFTWARE
! Compiled Dec 15-Fri-2023 13:25:17 JST #2
! Last updated May 20-Mon-2024 03:25:54 JST
!
service ssl-protocol tls1.2-and-later
!
hostname HomeLab
timezone +09 00
import { Hono } from 'hono';
import { InteractionType, InteractionResponseType } from 'discord-api-types/v9';
// Function to convert a hex string to binary format
function hex2bin(hex: string): Uint8Array {
const buf = new Uint8Array(Math.ceil(hex.length / 2));
for (let i = 0; i < buf.length; i++) {
buf[i] = parseInt(hex.substr(i * 2, 2), 16);
}
return buf;