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 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
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 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 curl wget screen | |
screen -D -R | |
#<enter> | |
sudo mkdir /mnt/cartodb-dev | |
sudo chown ubuntu:ubuntu /mnt/cartodb-dev | |
cd /mnt |
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
var pois = new XMLHttpRequest(); | |
pois.open("GET","http://cycletour.org/testosrm/map.geojson",true); | |
pois.onreadystatechange = function() { | |
if (pois.readyState === 4) { // Makes sure the document is ready to parse. | |
if (pois.status === 200) { // Makes sure it's found the file. | |
geojson = JSON.parse(pois.responseText); | |
L.geoJson(geojson, { | |
onEachFeature: function (feature, layer) { | |
layer.bindPopup(feature.properties.description); |
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 install -y python-software-properties && sudo add-apt-repository ppa:keithw/mosh && sudo apt-get update && sudo apt-get install -y mosh |
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
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAuKywKeAWFTGc0j3QFxwRbg4BEYLlZksRhp3BJengRP4bDR3r60HqFlwp+XlbB/U3Fsgh/2x1Pany/RvxFytMhDKg+Vvxdzt1MLcXC5p2/zEL4KV98ODbYb+VuOPotL5+8yM4lkX5re7wyZnngB9RgfSU1rhWb4UxuSkfmeeoOVU= |
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) |
OlderNewer