#Generate cities data
wget http://download.geonames.org/export/dump/cities15000.zipunzip cities15000.zipnode geonames.js cities15000.txt
The result is json array of cities in the following format:
{
_id:
#Generate cities data
wget http://download.geonames.org/export/dump/cities15000.zipunzip cities15000.zipnode geonames.js cities15000.txtThe result is json array of cities in the following format:
{
_id:
| container_commands: | |
| 01_collectstatic: | |
| command: "django-admin.py collectstatic --noinput" | |
| 02_lesscss: | |
| command: "lesscpy -x static/css/base.less > static/css/base.css" | |
| 03_setup_apache: | |
| command: "cp enable_mod_pagespeed.conf /etc/httpd/conf.d" | |
| 04_rm_pagespeed: | |
| command: "rm -rf /pagespeed/ebextensions" | |
| 05_mkdir_pagespeed: |
| server { | |
| listen 80; | |
| server_name forum.example.com; | |
| root /var/www/example_forum/; | |
| index index.php; | |
| access_log /var/log/nginx/forum.example.access.log main; | |
| error_log /var/log/nginx/forum.example.error.log; |
| packages: | |
| yum: | |
| php55-fpm: [] | |
| files: | |
| "/opt/elasticbeanstalk/hooks/appdeploy/pre/26_phpfpm_config.sh": | |
| mode: "000755" | |
| owner: root | |
| group: root | |
| content: | |
| location / { | |
| if ($uri ~* ^/([^.\?/]+)) { | |
| set $foldername "$1"; | |
| } | |
| sub_filter "<head>" "<head><base href=\"${scheme}://${host}/${foldername}/\">"; | |
| } |
| { | |
| "Mississippi": [30.1477890014648, 34.9960556030273, -91.6550140380859, -88.0980072021484], | |
| "Oklahoma": [33.6191940307617, 37.0021362304688, -103.002571105957, -94.4312133789062], | |
| "Delaware": [38.4511260986328, 39.8394355773926, -75.7890472412109, -74.9846343994141], | |
| "Minnesota": [43.4994277954102, 49.3844909667969, -97.2392654418945, -89.4833831787109], | |
| "Illinois": [36.9701309204102, 42.5083045959473, -91.513053894043, -87.0199203491211], | |
| "Arkansas": [33.0041046142578, 36.4996032714844, -94.6178131103516, -89.6422424316406], | |
| "New Mexico": [31.3323001861572, 37.0001411437988, -109.050178527832, -103.000862121582], | |
| "Indiana": [37.7717399597168, 41.7613716125488, -88.0997085571289, -84.7845764160156], | |
| "Louisiana": [28.9210300445557, 33.019458770752, -94.0431518554688, -88.817008972168], |
| files: | |
| "/home/ec2-user/install-cluster-client.sh": | |
| mode: "000744" | |
| owner: root | |
| group: root | |
| content: | | |
| #!/bin/bash | |
| #hide old ini | |
| if [ -a /etc/php.d/50-memcached.ini ] | |
| then |
| ## API Gateway "Send Everything" Mapping Template - Ryan Green - ryang@ryang.ca | |
| ## See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html | |
| #set($allParams = $input.params()) | |
| { | |
| "body-json" : "$input.json('$')", | |
| "params" : { | |
| #foreach($type in $allParams.keySet()) | |
| #set($params = $allParams.get($type)) | |
| "$type" : { | |
| #foreach($paramName in $params.keySet()) |
| { | |
| "Records": [ | |
| { | |
| "EventSource":"aws:sns", | |
| "EventVersion":"1.0", | |
| "EventSubscriptionArn":"arn:aws:sns:us-west-2:xxxx:xxxx", | |
| "Sns": { | |
| "Type":"Notification", | |
| "MessageId":"88B1B251-2E92-4FC3-BFAA-E3BBD0BAB10A", | |
| "TopicArn":"arn:aws:sns:us-west-2:881222951025:survey-tool-ses-delivery", |