Skip to content

Instantly share code, notes, and snippets.

@kshwetabh
kshwetabh / GetRouterDHCPClientTable.py
Created May 13, 2012 22:32
A python snippet to retrieve the list of all the devices (computer, tablet, mobile, etc) connected currently with your router.
'''
Tested only with Linksys WRT54G Router. Not sure if it will work with other routers. You might need to modify the url and header according to your router.
I still need to further clean the output to retrieve the list/name of devices rather than complete HTML in the response.
'''
import urllib2
from BeautifulSoup import BeautifulSoup
url = 'http://192.168.1.1/DHCPTable.asp'
headers= {'Authorization':'Basic XXXXX-25_CHARACTER_TOKEN_GOES_HERE'}
@kshwetabh
kshwetabh / .vimrc
Created February 18, 2012 18:05
My .vimrc configuration
"
" Kumar Shwetabh's Vim Configuration
"
" Features/Plugins Used
" 1. pathogen
" 2. NERDTree.
" 3. vim-coffee-script
" 4. conque
" 5. gundo
" 6. xpt
@kshwetabh
kshwetabh / CurrentWeatherWall.py
Created January 8, 2012 20:52
Change Wallpaper based on current weather condition
import os
import pywapi
import string
'''
CurrentWeatherWall
Set you desektop wallpaper as per the current weather condition
OS: Ubuntu {I have tested on Ubuntu 11.10}
See the import statements for Python module dependencies