This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" Kumar Shwetabh's Vim Configuration | |
" | |
" Features/Plugins Used | |
" 1. pathogen | |
" 2. NERDTree. | |
" 3. vim-coffee-script | |
" 4. conque | |
" 5. gundo | |
" 6. xpt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Opens new appointment in Outlook, Win a | |
;***************************************************************** | |
#a:: Run C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE /c ipm.appointment | |
; Opens new task in Outlook, Win t | |
;***************************************************************** | |
#t:: Run C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE /c ipm.task | |
; Launches specified search in default browser on duckduckgo.com website, ;s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Reminder script for GMail: A simple Google Apps Script to create a Google Calendar event (reminder) for any mail (with a | |
* specific label). You can then setup ("timed") triggers in Apps Script (hourly, etc) to monitor your Inbox. | |
* How to Use: | |
* 1. Log into Google Drive account and create a Google Script. | |
* 2. Copy and paste the below snippet into the gs file. | |
* 3. Make sure to update the 'reminderLabel', 'calendarName' and 'reminderDuration' as per your preference. | |
* 4. Test the script to make sure it is working properly. | |
* 5. Setup a time-driven Project Trigger (hourly, etc) to automatically run this script and create calendar events. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target name="CleanIECache"> | |
<echo>Clearing browser cache...</echo> | |
<exec executable="C:\Windows\System32\rundll32.exe"> | |
<arg value="InetCpl.cpl,"/> | |
<arg value="ClearMyTracksByProcess"/> | |
<arg value="8"/> | |
</exec> | |
</target> | |
<!-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install | |
sudo apt-get install youtube-dl | |
sudo apt-get install libavcodec-extra-53 | |
2. Download video | |
-Single video | |
youtube-dl -f 18 <URL> | |
-Batch | |
youtube-dl -a filename.txt | |
3. Check all supported video formats for a youtube video | |
youtube-dl -F <URL> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Required package/software: | |
sudo apt-get install imagemagick | |
Resize your .jpg images to a smaller size, such as 640×480 by using the following command: | |
mogrify -resize 640x480 *.jpg | |
Use the command below to create an animated gif of your jpg images | |
convert -delay 20 -loop 0 *.jpg myimage.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. A text node in Firefox allows only 4K data. So an XML Ajax response gets split up into multiple text child nodes instead of only one node. Its fine in Internet Explorer. For Firefox, to get the full data you either need to use node.normalize before you call node.firstChild or use node.textContent, both of which are Mozilla specific methods | |
2. Internet Explorer does not replace or HTML char code 160, you need to replace its Unicode equivalent \u00a0 | |
3. In Firefox a dynamically created input field inside a form (created using document.createElement) does not pass its value on form submit. | |
4. document.getElementById in Internet Explorer will return an element even if the element name matches. Mozilla only returns element if id matches. | |
5. In Internet Explorer if a select box has a value not represented by any of the options, it will display blank, Firefox displays the first option. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer