Skip to content

Instantly share code, notes, and snippets.

@max107
max107 / test.php
Last active December 18, 2015 11:08
<?php
/**
* Created by Studio107.
* Date: 13.06.13
* Time: 16:31
* All rights reserved.
*/
/**
<?php
use yii\helpers\Html;
use yii\widgets\Menu;
use yii\widgets\Breadcrumbs;
/**
* @var $this \yii\base\View
* @var $content string
*/
app\config\AppAsset::register($this);
@max107
max107 / Regions.json
Created September 15, 2013 14:19
Russia regions with coords. Регионы россии с координатами границ.
{
"Алтайский край": {
"0": [
[
54.469437,
85.079468
],
[
54.195824,
85.44720500000001
[
u'1-й Газетный пер.',
u'1-й Гороховский пер.',
u'1-й Громовой пер.',
u'1-й Кирпичный пер.',
u'1-й Кондукторский пер.',
u'1-й Курский пер.',
u'1-й Линейный пер.',
u'1-й Опытный пер.',
u'1-й Орловский пер.',
# coding=utf-8
def wrap(func):
def wrapped_func(*args, **kwargs):
print('hello world')
return func(*args, **kwargs)
return wrapped_func
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
port_in_redirect off;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
@max107
max107 / vhost.conf
Last active December 31, 2015 13:39
server {
access_log "/home/something/something.info/log/nginx-access.log";
error_log "/home/something/something.info/log/nginx-error.log";
listen 80;
server_name something.info www.something.info;
include drop.conf;
if ($host = 'www.something.info' ) {
uwsgi:
plugins: python
# указываем socket, при помощи которого будет происходить
# взаимодействие между nginx и uwsgi
socket: %d/../tmp/%n.sock
chdir: %d../app/
# здесь указываем путь к django-проекту
pythonpath: %d../app/
# устанавливаем переменную окружения, которая хранит имя settings файла
env: DJANGO_SETTINGS_MODULE=settings