Guide to add localhost:80 to localhost:8080 forwarding.
Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.
####1. anchor file
| from PIL import Image, ImageOps | |
| import urllib2 as urllib | |
| import io | |
| fd = urllib.urlopen("http://a/b/c") | |
| image_file = io.BytesIO(fd.read()) | |
| im = Image.open(image_file) | |
| THUMB_SIZE = 150, 150 |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| # usage | |
| # clone file | |
| # change content_path variable | |
| # chmod +x blogadd | |
| # mv blogadd /usr/local/bin/blogadd |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| #Автор Михаил Якименко - macgera.name | |
| #Скрипт которой я написал в ходе изучения Python. | |
| #Этот скрипт работает в Ubuntu если установлен пакет notify-send | |
| #Так же он может работать и в Mac OS X и Windows, | |
| #но в таком случае прийдется менять строки (команды) с уведомлением. |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| # Автор Михаил Якименко - macgera.name | |
| # Подсчет процентов от продаж. И общую сумму продаж. | |
| # Подразумевается наличие некой базы. Простого текстового файла. | |
| # Базы данных мнимых подаж. |
| // tests | |
| // returns height of the screen including all toolbars | |
| // requires detection of orientation. (320px for our test) | |
| // window.orientation === 0 ? screen.height : screen.width | |
| // returns height of the visible area | |
| // it decreases if you zoom in | |
| // window.innerHeight | |
| // returns height of screen minus all toolbars |
| 'use strict'; | |
| /** | |
| * Equal Heights | |
| * | |
| * Attach this directive to the parent/wrapping element of | |
| * a bunch of elements that are columns. This directive will | |
| * calculate the height of every direct child (one level down) | |
| * then set all of them to be the height of the tallest one. | |
| * |
| { | |
| "color_scheme": "Packages/themes/Laravel.tmTheme", | |
| "default_encoding": "UTF-8", | |
| "ensure_newline_at_eof_on_save": true, | |
| "fallback_encoding": "UTF-8", | |
| "font_size": 12, | |
| "ignored_packages": | |
| [ | |
| "Vintage" | |
| ], |
| # Regular Colors | |
| \[\033[0;30m\] # Black | |
| \[\033[0;31m\] # Red | |
| \[\033[0;32m\] # Green | |
| \[\033[0;33m\] # Yellow | |
| \[\033[0;34m\] # Blue | |
| \[\033[0;35m\] # Purple | |
| \[\033[0;36m\] # Cyan | |
| \[\033[0;37m\] # White |
| [uwsgi] | |
| plugins = python27 | |
| virtualenv = /home/toor/.envs/greendog | |
| chdir = /home/toor/projects/greendog | |
| pidfile=/home/toor/projects/greendog.pid | |
| pythonpath = .. | |
| env = DJANGO_SETTINGS_MODULE=greendog.settings | |
| module=django.core.wsgi:get_wsgi_application() | |
| touch-reload = /tmp/project_greendog.txt | |
| socket=127.0.0.1:8034 |