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
sudo apt-get update && sudo apt-get install -y git-core curl wget screen | |
screen -D -R | |
#<enter> | |
sudo mkdir /mnt/cartodb-dev | |
sudo chown ubuntu:ubuntu /mnt/cartodb-dev | |
cd /mnt |
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
''' | |
1. get stops | |
2. get lines | |
3. get runs | |
''' | |
import ptvapi | |
import pprint | |
pp = pprint.PrettyPrinter(indent=4).pprint | |
stops=[] |
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
sudo apt-get update | |
sudo apt-get install -y git-core | |
cd /mnt | |
sudo mkdir cartodb | |
sudo chown ubuntu:ubuntu cartodb | |
git clone --recursive https://github.com/CartoDB/cartodb.git | |
This file has been truncated, but you can view the full file.
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
$ bash <<EOF | |
> sudo apt-get update | |
> sudo apt-get install -y git-core | |
> cd /mnt | |
> sudo mkdir cartodb | |
> sudo chown ubuntu:ubuntu cartodb | |
> |
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
configure_osrmweb: | |
cmd.run: | |
- cwd: /usr/share/nginx/www/osrm/WebContent | |
- name: | | |
python <<EOF | |
import os, sys, re | |
os.rename('OSRM.config.js', 'OSRM.config.js.orig') | |
# In the process we convert line endings for some reason. :/ | |
with open('OSRM.config.js.orig', 'r') as fin, open('OSRM.config.js', 'w') as fout: | |
data = fin.read() |
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
#!/bin/bash | |
# First, clear out any old mapnik or node.js installs that might conflict | |
sudo apt-get purge libmapnik libmapnik-dev mapnik-utils nodejs | |
# Also clear out any old ppa's that might conflict | |
sudo rm /etc/apt/sources.list.d/*mapnik* | |
sudo rm /etc/apt/sources.list.d/*developmentseed* | |
sudo rm /etc/apt/sources.list.d/*chris-lea* | |
# add new ppa's |
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
The order in which objects are drawn depends on the following process. Each step in the process overrules steps with higher numbers. | |
1. Layers. "Higher" layers obscure "lower" ones. | |
2. Stylesheets. Stylesheets are applied from left to right. | |
3. Rules within a stylesheet. Rules are applied from top to bottom. This means two things: | |
a. objects defined by later rules will be drawn over those defined by later rules; and | |
b. attachments may be redefined by later rules. | |
4. Attachments (eg, `::glow { ... }`) within a rule are applied from top to bottom. (The order of different symbolizers within an attachment doesn't matter.) | |
5. Lastly, all else being equal, objects are drawn in the order in which they are found, such as in PostGIS. |
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
Version 1: | |
def is_evil(filename): | |
import re | |
return re.search("^/|\.\./|:|//", filename) | |
if is_evil(filename): | |
filename = path.basename(filename) | |
copyto = path.join(dataset_path, filename) |
NewerOlder