Skip to content

Instantly share code, notes, and snippets.

@mzyy94
mzyy94 / 2_5G_switch.md
Last active June 23, 2023 05:07
network-switch

中華10G/2.5Gスイッチを基幹に導入した

引っ越しをして宅内ネットワーク環境を整備する機運になったので配線を引き回した。

ネットワーク設計

ネットワーク構成は次のように設計した。

@mzyy94
mzyy94 / code.py
Created November 26, 2022 02:45
Adafruit Neo Trinkey
import time
import board
import neopixel
import touchio
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
from rainbowio import colorwheel
pixels = neopixel.NeoPixel(board.NEOPIXEL, 4)
@mzyy94
mzyy94 / Cargo.toml
Created March 7, 2022 11:12
Check wgpu Vulkan limits on Raspberry Pi 4
[package]
name = "check-adapter-limit"
version = "0.1.0"
edition = "2021"
[dependencies]
wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "0ac9ce002656565ccd05b889f5856f4e2c38fa73" }
async-std = { version = "1.10.0", features = ["attributes"] }
[[bin]]
@mzyy94
mzyy94 / main.cpp
Created January 24, 2022 11:26
Write display data
#include <stdio.h>
#include "esp_err.h"
#include "esp_log.h"
#include "esp_vfs_fat.h"
#include "driver/sdspi_host.h"
#include "driver/spi_common.h"
#include "sdmmc_cmd.h"
#include "M5Unified.h"
static const char *TAG = "main";
@mzyy94
mzyy94 / uBlacklist.txt
Created November 30, 2021 11:53
Block GitHub copy sites
*://github-wiki-see.page/*
*://githubhelp.com/*
@mzyy94
mzyy94 / dial.py
Last active August 2, 2021 19:42
Discover DIAL device and request DIAL REST API
#!/usr/bin/env python3
from urllib.request import *
import xml.etree.ElementTree as ET
headers = {'Origin': 'package:dial.py'}
class Dial:
appUrl = ''
appName = ''
@mzyy94
mzyy94 / m1patch.sh
Last active June 30, 2021 23:12
Patch Apple Silicon support to .pkg installer file
#!/bin/zsh
if [ $# -lt 2 ]; then
echo "Usage: $0 <input.pkg> <output.pkg>"
exit 1
fi
if [ ! -e $1 ]; then
echo "File $1 not found."
exit 1
@mzyy94
mzyy94 / createpatchedboot.sh
Created September 10, 2020 18:35
./createpatchedboot.sh "JOYING FIRMWARE.zip" magisk_patched.img ./output/
#!/bin/sh
UPDATE_FILE="${1}"
PATCHED_BOOT="${2}"
OUTPUT_DIR="${3:-./out}"
CWD=$(cd $(dirname $0) && pwd)
OUTPUT_DIR="$CWD/$OUTPUT_DIR/"
OTA_PACKAGE="6521_1.zip"