Skip to content

Instantly share code, notes, and snippets.

@mkaraki
mkaraki / gen_v6_subnet_numbers.php
Created February 13, 2023 18:15
Generate v6 subnet mask for each section per cidr
<?php
for ($cidr = 0; $cidr <= 128; $cidr++) {
$maskvalue = [];
$imaskvalue = [];
$netaddr = [];
for ($i = 0; $i < 8; $i++) {
$maskbit = $cidr - ($i * 16);
if ($maskbit < 0) $maskbit = 0;
if ($maskbit > 16) $maskbit = 16;
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git stable-diffusion-webui --depth 1
git clone https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git stable-diffusion-webui/extensions/tag-autocomplete --depth 1
git clone https://github.com/toriato/stable-diffusion-webui-daam.git stable-diffusion-webui/extensions/daam --depth 1
git clone https://github.com/aka7774/sd_images_browser.git stable-diffusion-webui/extensions/images_browser --depth 1
@mkaraki
mkaraki / halt.c
Last active May 18, 2023 01:56
Force call Segmentation fault in C
void halt(void) {
*(unsigned char*)(0) = 0;
}
int main(void) {
halt();
}
@mkaraki
mkaraki / .vimrc
Last active October 4, 2023 02:32
""" Windows Vim Settings
if &term =~ '^xterm'
" solid underscore
let &t_SI .= "\<Esc>[4 q"
" solid block
let &t_EI .= "\<Esc>[2 q"
" 1 or 0 -> blinking block
" 3 -> blinking underscore
" Recent versions of xterm (282 or above) also support

ルーティング入門

ネットワークではルーティングを使い、通信を様々な場所の機材に転送しています。

コマンドプロンプトでtracert google.comなどを実行すると、 コンピュータからgoogle.comまでの経路内に存在するルータ(ルーティングする機材)の一覧が出てきます。

本資料では、静的ルーティング(スタテックルーティング)とOSPFを使った動的ルーティングについて、 最低限実験環境で遊べるようになる程度のものを解説します。

L2接続・VLAN入門

Important

本資料は初心者向けの資料であり、本来されるべき解説と異なる・不足している箇所があります。

相互通信にルータを必要としない範囲の接続を「L2接続性がある」、「L2でつながっている」と表現したりします。

LANケーブルやWi-FiのSSIDは基本的に1つにつき1つのL2ネットワークが割り当てられています。 ハブなどで、LANケーブル内のL2ネットワークを複数のデバイスに共有可能です。

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Click Test</title>
<style>
div {
width: 10px;
height: 10px;
# ======================================================
# ESET IP address list
# Source: https://support.eset.com/en/kb332-ports-and-addresses-required-to-use-your-eset-product-with-a-third-party-firewall
# Last update: 2025-06-30
# ======================================================
# To download detection engine updates:
91.228.166.13
91.228.166.14
91.228.166.15