⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains hidden or 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
def usage(): | |
""" Script Usage """ | |
print "Usage: python main.py OPTIONS INPUT_FILE [OUTPUT_FILE] " | |
print "OPTIONS:" | |
print " --help, --usage, -h: Show this help message" | |
print " --meta=, -m: Meta File" | |
print "ARGS:" | |
print " INPUT_FILE: input file name or path" | |
print " OUTPUT_FILE: output file path" | |
print "" |
This file contains hidden or 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
#!/usr/bin/python | |
# Abhinay Omkar | |
from urllib2 import urlopen | |
import simplejson as json | |
from lxml import etree | |
root = etree.fromstring(urlopen("http://www.thehindu.com/?service=rss").read()) | |
items = root[0].findall('item') | |
output = [] |
This file contains hidden or 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
# Compress file | |
zip compressed.zip file_name.txt | |
# Compress Folder | |
zip -r compressed.zip folder_name/ | |
# Uncompress zipped file to current directory | |
unzip compressed.zip | |
# Uncompress zipped to current directory to specific location |
This file contains hidden or 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
# Top 20 most used commands in your ZSH shell | |
cat ~/.zsh_history | cut -d ';' -f 2- | awk {'print $1'} | sort | uniq -c | sort -r | head -20 |
This file contains hidden or 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
World War Z - Isolated System by Muse | |
Inception - Time by Hans Zimmer | |
Man of Steel - Ideal of Hope by Hans Zimmer | |
X-Men: First Class - First Class by Henry Jackman | |
Bourne Ultimatum - Extreme Ways by Mobi | |
Tron: Legacy - The Son of Flynn by Daft Punk | |
Tron: Legacy - Flynn Lives by Daft Punk |
This file contains hidden or 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
window.location.param = function(key) { | |
var value; | |
window.location.search.slice(1).split('&').map(function(e) { | |
e = decodeURIComponent(e); | |
if (e.indexOf(key + '=') === 0) { | |
value = e.slice(key.length + 1); | |
return false; | |
} | |
}); | |
return value; |
This file contains hidden or 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 logging | |
# prints log to stdout and also saves to specified log file | |
logger = logging.getLogger('my_logfile') | |
fh = logging.FileHandler('my_logfile.log') | |
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
fh.setFormatter(formatter) | |
ch = logging.StreamHandler() | |
ch.setFormatter(formatter) | |
logger.addHandler(fh) |
This file contains hidden or 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
/* | |
url: facebook.com | |
*/ | |
body, #contentCol, .fbTimelineScrubber { | |
background: #fff; | |
} | |
.fbChatSidebar { | |
display: none ; |
This file contains hidden or 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
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { |