Skip to content

Instantly share code, notes, and snippets.

View andrewflash's full-sized avatar

Andri Rahmadhani andrewflash

  • Ciamis, Indonesia
View GitHub Profile
@andrewflash
andrewflash / strategic_mtu_tuning.md
Created November 24, 2025 05:22
Strategic MTU Tuning Recommendations for WMN Applications
MTU Size Range Protocol Efficiency Contention/Blockage Cost Fragmentation Risk Suitable WMN Application
Very Small (<576 B) Very Low Minimal Zero Real-time control, VoIP, critical telemetry requiring guaranteed low latency.
Constrained Optimum (1300–1400 B) Medium-High Moderate Minimal (Aligned with PMTUD) Robust multi-hop backhaul, systems using VPN or cellular tunnels (e.g., 1360–1440 bytes).
Standard (1452–1500 B) High Moderate to High High (if path has tunnels/PPPoE)
@andrewflash
andrewflash / succ_prob_wsn_links.md
Created November 24, 2025 05:14
Success Probability of Links in WSN
@andrewflash
andrewflash / protocol_efficiency_mtu_802.11.md
Created November 24, 2025 05:07
Protocol Efficiency vs. MTU Size in 802.11 Networks
MTU (IP Payload) Fixed Overhead Ratio Relative Efficiency (1500B) Relative NAV Duration Optimal Environment
64 B (IoT Sensor) High (e.g., 40–50% overhead) ~50% Very Short High density, low latency, real-time control.
576 B (IPv4 Minimum) Moderate ~93% Short Moderate density, stable fallback, transactional traffic.
1500 B (Standard Ethernet) Low (e.g., 2.7% overhead) ~97% Long Low density, high throughput, high PHY rate.
2304 B (802.11 Max MSDU) Minimal ~98% Maximum Highly centralized, dedicate
@andrewflash
andrewflash / supermarket.py
Created May 4, 2023 14:28
Supermarket Simulation in Python
# Function to display greetings and show some promotional items and its price
def display_greetings(name):
print(f"Welcome to {name} supermarket! Today's promotional items are:")
print("----------------------------------------------------------")
print()
# Function to display items
def display_items(msg, items):
print(f"{msg}")
print()
@andrewflash
andrewflash / using_fork.md
Created November 22, 2018 12:04
Using Fork

Clone your repo

git clone https://github.com/YOUR-USERNAME/Spoon-Knife
@andrewflash
andrewflash / hexToAscii.c
Created July 3, 2018 05:00
Hex string to Ascii string
void hexToAscii(char *inBuff, char *outBuff)
{
while(*inBuff)
{
unsigned int ch;
int n;
if ( sscanf(inBuff, "%2x%n", &ch, &n) != 1 )
{
break;
}
@andrewflash
andrewflash / Robot.ino
Created October 3, 2016 20:02
Ad-hoc network car Arduino code
#include <EEPROM.h>
#include "PacketSerial.h"
#define STARTBYTE 0xFF
#define PACKETSIZE 254
#define MINPACKET 8
#define TCP 1
#define ADHOC 0
#define FWD 0
#define ACK 1
7755 CELL_0 00:14:bf:70:22:ee -67
7757 CELL_0 74:29:af:22:91:52 -73
7757 CELL_0 00:1a:70:a0:01:3a -73
7757 CELL_0 66:27:37:19:15:0f -74
7757 CELL_0 76:29:af:22:91:53 -74
7757 CELL_0 54:88:0e:d2:eb:08 -74
7758 CELL_0 64:27:37:19:15:0e -76
7759 CELL_0 94:a7:b7:3d:8a:e4 -77
7759 CELL_0 b2:c2:87:2a:ab:0b -78
7759 CELL_0 c8:b3:73:5d:83:f5 -78
2908 NONE 00:14:bf:70:22:ee -64
2909 NONE 54:88:0e:d2:eb:08 -77
2909 NONE fa:8f:ca:9b:8a:de -81
2909 NONE 76:29:af:22:91:53 -72
2909 NONE 00:1a:70:a0:01:3a -69
2909 NONE 42:a5:89:3e:54:09 -74
2909 NONE 66:27:37:19:15:0f -77
2909 NONE 64:27:37:19:15:0e -77
2910 NONE c4:ea:1d:6c:c9:6d -77
2910 NONE c8:b3:73:5d:83:f5 -87
@andrewflash
andrewflash / php_mailer.php
Created November 23, 2013 05:32
Using PHP Mailer to Send HTML Emails with Images
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "smtp1.example.com;smtp2.example.com";
$mail->SMTPAuth = true;
$mail->Username = 'smtpusername';
$mail->Password = 'smtppassword';
$mail->From="[email protected]";