| ⌘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
| aw3 s3 sync s3://bucket . | |
| for i in [pattern] | |
| bzip2 $i | |
| aw3 s3 sync . s3://bucket --dryrun --delete |
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 asyncio | |
| import urllib.parse | |
| import sys | |
| @asyncio.coroutine | |
| def count_things(url): | |
| url = urllib.parse.urlsplit(url) | |
| if url.scheme == 'https': | |
| connect = asyncio.open_connection(url.hostname, 443, ssl=True) | |
| else: |
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
| SELECT post_id, meta_value, post_date, post_modified, post_title, post_name, guid, post_mime_type | |
| FROM `wp_postmeta` | |
| INNER JOIN `wp_posts` | |
| ON `wp_postmeta` .`post_id`=`wp_posts`.`ID` | |
| WHERE `post_type`='attachment' and `meta_key`= '_wp_attachment_image_alt' | |
| ORDER BY `wp_posts`.`post_modified` ASC |
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
| $the_query = new WP_Query( 'page_id=305' ); | |
| while ( $the_query->have_posts() ) : | |
| $the_query->the_post(); | |
| the_content(); | |
| endwhile; | |
| wp_reset_postdata(); |
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 requests | |
| from lxml import etree | |
| from subprocess import call | |
| req = requests.get('http://pyvideo.org/category/50/pycon-us-2014/rss') | |
| xml_tree = etree.fromstring(req.content) |
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
| find ./ -type f -exec dos2unix {} \; |
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
| Options +FollowSymlinks | |
| RewriteEngine on | |
| # No intersticial for direct reference and self-reference | |
| RewriteCond %{HTTP_REFERER} !^$ | |
| RewriteCond %{HTTP_REFERER} !^http(s)?://box.leebyron.com/.*$ [NC] | |
| # Add a line item for every website you don't need an intersticial for | |
| # I've added my own website, gmail and facebook | |
| RewriteCond %{HTTP_REFERER} !^http(s)?://([^\.]*.)?leebyron.com/.*$ [NC] | |
| RewriteCond %{HTTP_REFERER} !^http(s)?://mail.google.com/.*$ [NC] |
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/env python | |
| #sample.py | |
| #Given a secuencia of integer numbers through stdin | |
| #returns its sum through stdout | |
| #@author Daniel Chimeno <[email protected]> | |
| import sys | |
| import re | |
| num=0 |