Skip to content

Instantly share code, notes, and snippets.

View Hirunagrad's full-sized avatar
🏠
Working from home

Hiruna Gayashan Hirunagrad

🏠
Working from home
  • kaduwela,colombo
View GitHub Profile
package paint.canvas;
import paint.model.DrawType;
import paint.model.PaintInfo;
import javax.swing.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.io.Serializable;
@Hirunagrad
Hirunagrad / c-get_eth_mac.c
Created October 21, 2020 06:08 — forked from evanslai/c-get_eth_mac.c
C: How to get MAC address of your machine using a C program
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <linux/if.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
int main()
{
struct ifreq s;