Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
## 0. Get ubuntu (current gite for 14.04 LTS). | |
## 1. Add repositories | |
echo "deb http://ppa.launchpad.net/nginx/stable/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/nginx-stable.list | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C | |
sudo apt-get update | |
## 2. Install software | |
sudo apt-get -yq install nginx mysql-server php5-mysql php5-fpm |
This file contains 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 DISTINCT n.type, n.osm_id, | |
n.tags->'name', n.tags->'name:ru', n.tags->'name:be', | |
n.tags->'description', n.tags->'description:ru', n.tags->'description:be', | |
n.tags->'operator', n.tags->'operator:ru', n.tags->'operator:be', | |
n.tags->'addr:street', n.tags->'addr:housenumber', | |
n.tags->'addr:street' = a.street AND n.tags->'addr:housenumber' = a.housenumber, | |
ct.country, ct.region, ct.subregion, ct.city, a.street, a.housenumber | |
FROM ( | |
SELECT CASE WHEN o.osm_id > 0 THEN 'w' ELSE 'r' END AS type, o.osm_id, o.tags, o.way | |
FROM osm_polygon c |
This file contains 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
from __future__ import print_function | |
class Node(object): | |
def __init__(self, data, next=None, random=None): | |
self.data = data | |
self.next = next | |
self.random = random | |
def __repr_ref(self, ref): |
This file contains 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
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb mirror://mirrors.ubuntu.com/mirrors.txt utopic main restricted universe multiverse | |
deb-src mirror://mirrors.ubuntu.com/mirrors.txt utopic main universe restricted multiverse | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb mirror://mirrors.ubuntu.com/mirrors.txt utopic-updates main restricted universe multiverse | |
deb-src mirror://mirrors.ubuntu.com/mirrors.txt utopic-updates main restricted universe multiverse |
This file contains 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 csv | |
from contextlib import contextmanager | |
import psycopg2 | |
@contextmanager | |
def cursor_context(): | |
conn = psycopg2.connect(dbname='osm', user='tbicr', password='admin', | |
host='127.0.0.1', port='5432') |
This file contains 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
<form action="" method="POST"> | |
<script | |
src="https://checkout.stripe.com/checkout.js" class="stripe-button" | |
data-key="pk_test_c4P2utKzYhQ7rec4rYhWOs9H" | |
data-amount="1" | |
data-name="Demo Site" | |
data-description="2 widgets ($20.00)" | |
data-image="/128x128.png"> | |
</script> | |
</form> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer