Skip to content

Instantly share code, notes, and snippets.

View jishnu7's full-sized avatar
🤷‍♂️

Jishnu Mohan jishnu7

🤷‍♂️
View GitHub Profile
@jishnu7
jishnu7 / server.py
Created May 31, 2012 06:29
Python web server
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class ServerHandler(BaseHTTPRequestHandler):
def do_GET(self):
print "GET :",self.path
# Send success response
self.send_response(200)
self.send_header('Content-type','text/html')
self.end_headers()
# Return Data
@jishnu7
jishnu7 / 3g-wifi.sh
Created September 27, 2011 15:44
share internet via WiFi
# Share ppp0 to wlan0
ifconfig wlan0 down
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iwconfig wlan0 mode Ad-Hoc