- OS : Ubuntu 14.04.1 LTS Desktop 64-bit (http://www.ubuntu.com/download/alternative-downloads#external)
- Python Distribution : Anaconda Python (https://store.continuum.io/cshop/anaconda/)
- Hardware : Lenovo Thinkpad L440
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 php | |
| <?php | |
| //usage: php envato-screenshots-downloader.php /path/to/save/screenshots http://url/to/screenshots/page | |
| set_time_limit(0); | |
| $dir = $argv[1]; | |
| $source = $argv[2]; | |
| print_r($argv); | |
| mkdir ($dir); | |
| $src = file_get_contents($source); | |
| $pattern = '/src="(https:\/\/0.s3[a-zA-Z0-9_\-\.\/%]+)"/i'; |
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
| #!/bin/bash | |
| ############################################### | |
| # To use: | |
| # chmod +x install-redis.sh | |
| # ./install-redis.sh | |
| ############################################### | |
| version=3.2.0 | |
| echo "*****************************************" | |
| echo " 1. Prerequisites: Install updates, set time zones, install GCC and make" |
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 | |
| from ftplib import FTP | |
| from time import sleep | |
| import os | |
| my_dirs = [] # global | |
| my_files = [] # global | |
| curdir = '' # global |
This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.
If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.
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 sys | |
| from PIL import Image | |
| from PIL.ExifTags import TAGS, GPSTAGS | |
| def get_exif_data(image): | |
| """Returns a dictionary from the exif data of an PIL Image item. Also converts the GPS Tags""" | |
| exif_data = {} | |
| info = image._getexif() | |
| if info: |
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 sys | |
| import tornado.ioloop | |
| import psycopg2 | |
| import psycopg2.extensions | |
| io_loop = tornado.ioloop.IOLoop.instance() | |
| conn = psycopg2.connect('dbname=mytest user=lbolla password=secret') | |
| conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT) | |
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
| . | |
| ├── deploy.py | |
| ├── project | |
| │ ├── application.py | |
| │ ├── apps | |
| │ │ ├── articles | |
| │ │ │ ├── forms.py | |
| │ │ │ ├── __init__.py | |
| │ │ │ ├── models.py | |
| │ │ │ └── views.py |
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
| # coding: utf8 | |
| languages = [ | |
| ('aa', 'Afar'), | |
| ('ab', 'Abkhazian'), | |
| ('af', 'Afrikaans'), | |
| ('ak', 'Akan'), | |
| ('sq', 'Albanian'), | |
| ('am', 'Amharic'), | |
| ('ar', 'Arabic'), |

