Skip to content

Instantly share code, notes, and snippets.

View pandax381's full-sized avatar

YAMAMOTO Masaya pandax381

View GitHub Profile
@pandax381
pandax381 / ccr2116.config
Last active February 4, 2025 06:54
CCR2116 Config
[admin@MikroTik] > export
# 2025-02-04 04:35:47 by RouterOS 7.18beta2
# software id = ETY3-XJA9
#
# model = CCR2116-12G-4S+
# serial number = XXXXXXXXXXX
/interface bridge
add fast-forward=no frame-types=admit-only-vlan-tagged name=bridge1 protocol-mode=none vlan-filtering=yes
/interface ethernet
set [ find default-name=ether13 ] name=mng
[admin@MikroTik] > export
# 2025-02-03 20:19:44 by RouterOS 7.18beta2
# software id = ETY3-XJA9
#
# model = CCR2116-12G-4S+
# serial number = XXXXXXXXXXX
/interface bridge
add fast-forward=no frame-types=admit-only-vlan-tagged name=bridge1 protocol-mode=none vlan-filtering=yes
/interface ethernet
set [ find default-name=ether13 ] name=mng
@pandax381
pandax381 / boot.log
Created July 25, 2023 15:43
boot log of corrupt avocent mpu108e
U-Boot version:U-Boot 1.3.0-rc3 (Jul 9 2012 - 13:31:11) Polaris 1.9.16473
AVODSR
Serial Number:0520098820
EID:520601-0010AB-0000
MAC Addr 1:00:E0:86:1C:69:19
MAC Addr 2:00:E0:86:1C:69:1A
Current Firmware Version :1.14.0.19936
Alternate Firmware Version:1.14.0.19936
@pandax381
pandax381 / trueport-6.10.0-mod.patch
Last active September 5, 2023 22:38
Patch for Perle TruePort Daemon and Driver for Linux (trueport-6.10.0) with kernel 5.19.0 through 6.2.0
diff -uprN trueport-6.10.0/ptyx/ptyc.c trueport-6.10.0-mod/ptyx/ptyc.c
--- trueport-6.10.0/ptyx/ptyc.c 2020-05-28 20:56:32.000000000 +0900
+++ trueport-6.10.0-mod/ptyx/ptyc.c 2023-09-06 04:52:31.273527237 +0900
@@ -93,7 +93,11 @@ static void ptyx_ctrl_close(struct tty_s
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
+static unsigned int ptyx_ctrl_write_room(struct tty_struct *tty)
+#else
@pandax381
pandax381 / ix3315.startup-config
Last active May 4, 2025 03:41
IX3315 にフレッツ光クロス2回線(OCNバーチャルコネクトおよびv6プラス固定IP)を収容するためのコンフィグ
! NEC Portable Internetwork Core Operating System Software
! IX Series IX3315 (magellan-sec) Software, Version 10.7.18, RELEASE SOFTWARE
! Compiled Oct 25-Tue-2022 12:28:03 JST #2
! Current time Apr 26-Wed-2023 16:52:00 JST
!
timezone +09 00
!
logging buffered 819200
logging subsystem flt warn
logging subsystem mape debug
@pandax381
pandax381 / ix2215.txt
Created February 26, 2023 19:19
MAP-E Gateway for use with UniFi UDM
ip ufs-cache max-entries 20000
ip ufs-cache enable
ip route default Tunnel0.0
!
ipv6 ufs-cache enable
!
ipv6 dhcp client-profile dhcpv6-cl
information-request
option-request dns-servers
!
@pandax381
pandax381 / matrix_test.ino
Created September 16, 2020 11:00
FastLED_NeoMatrix Test
#include <M5StickC.h>
#include <Adafruit_GFX.h>
#include <FastLED.h>
#include <FastLED_NeoMatrix.h>
#define PIN 26
#define mw 18
#define mh 7
#define NUMMATRIX (mw*mh)
function FindProxyForURL(url, host){
return "SOCKS5 127.0.0.1:8080; DIRECT";
}
@pandax381
pandax381 / ipmond.c
Created May 17, 2019 09:18
Detect add/delete IP address to interface on Linux
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <linux/rtnetlink.h>
#include <linux/if.h>
@pandax381
pandax381 / tcptwreuse.py
Last active April 18, 2019 10:15
Trace reuse TCP connection in TIME_WAIT state
#!/usr/bin/python
from __future__ import print_function
from bcc import BPF
from socket import inet_ntop, ntohs, AF_INET, AF_INET6
from struct import pack
b = BPF(text="""
#include <uapi/linux/ptrace.h>
#include <net/sock.h>