Skip to content

Instantly share code, notes, and snippets.

View kra3's full-sized avatar
🤠
I may be slow to respond.

Arun Karunagath kra3

🤠
I may be slow to respond.
View GitHub Profile
@kra3
kra3 / internet-share.sh
Created July 1, 2012 09:30 — forked from copyninja/internet-share.sh
Enabling the internet sharing
#!/bin/zsh
# Bring up the wlan0 interface
ifconfig wlan0 up
# Put the interface in Ad-hoc mode
iwconfig wlan0 mode Ad-Hoc
# Set the essid for the access point
iwconfig wlan0 essid copyninja
@kra3
kra3 / ifconfig_sample.c
Created July 1, 2012 09:30 — forked from copyninja/ifconfig_sample.c
Just for fun - Ip getting and setting
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if_arp.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <features.h>