Skip to content

Instantly share code, notes, and snippets.

@kshwetabh
kshwetabh / python_resources.md
Created November 11, 2013 18:22 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@kshwetabh
kshwetabh / css_resources.md
Created November 11, 2013 18:22 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@kshwetabh
kshwetabh / javascript_resources.md
Created November 11, 2013 18:22 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@kshwetabh
kshwetabh / 0_reuse_code.js
Created November 11, 2013 18:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kshwetabh
kshwetabh / Cross Browser Issues
Last active December 26, 2015 23:49
This gist aims to collect as many inconsistencies as possible related to the cross-browser compatibility issues. They may be related to javascript, css, DOM etc.
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.
@kshwetabh
kshwetabh / gif_creator
Created July 10, 2013 01:16
Handy tool and commands to generate gif images from jpeg files in Linux
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
@kshwetabh
kshwetabh / youtube-dl
Last active December 18, 2015 07:08
Notes on Youtube.dl tool
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>
@kshwetabh
kshwetabh / BashTheCache.xml
Last active December 15, 2015 17:29
Ant Task to clear the Internet Explorer browser cache. Add this task to your ant build file and it will make sure to clear your browser cache on each build. Might be handy if you need to build your UI code (JS/JSP, etc) to copy to deploy directory after editing the source.
<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>
<!--
@kshwetabh
kshwetabh / GMailReminder.gs
Created February 11, 2013 02:09
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... (public version of the GMailReminder gist)
/**
* 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.
*
@kshwetabh
kshwetabh / utils.ahk
Created December 21, 2012 16:05
Various AutoHotKey shortcut key combinations.
; 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