Sunday, June 1, 2014

Hack for LA Hackathon Day 2 Bike++

http://www.mulinblog.com/google-maps-tutorial-part-4-about-kmlkmz-geographic-files/
What is KML/KMZ and how to open it?

KML stands for Keyhole Markup Language, which is a file format used to display geographic data in an Earth browser such as Google Earth, Google Maps, and Google Maps for mobile.

while true; do say "15 minutes has just gone by Get back to work"; sleep 900; done

https://productforums.google.com/forum/#!topic/earth/K8R8lsv-3CI

Download converter http://sourceforge.net/projects/kmlcsv/postdownload?source=dlp
move file to app
unzip in terminal
  $ cp app/5-31-2014\ 07-47.kmz testroute1.zip
  $ unzip testroute1.zip
go to converter click on the kml file for ppoints

Converter:
http://www.utilities-online.info/xmltojson/#.U4tr4XWx1ys

Change the doc.kml to doc.xml

Hannah's work:
https://gist.github.com/hannahhoward/67119ad9e434ec52eef0


using the gist
To Create User from Terminal:
curl -X POST -H "Content-Type:application/json" -d '{ "user": { "first_name": "Jen", "last_name": "Diamond", "email": "thejendiamond@gmail.com", "password": "ilikebikes", "password_confirmation": "ilikebikes"}}' http://bikeplusplus.techgirlwonder.com/user/ > jen_user.txt

curl -X POST -H "Content-Type:application/json" -d '{"email": "thejendiamond@gmail.com", "password": "ilikebikes"}' http://bikeplusplus.techgirlwonder.com/token >jen_token.txt

curl -X PUT -H "Content-Type:application/json" -H "Authorization: Bearer 499cfd12c1dbb9cdf2d959e964c4945b" -d '{ "user": { "first_name": "Jen", "last_name": "Diamond", "email": "thejendiamond@gmail.com", "password": "ilikebikes", "password_confirmation": "ilikebikes"}}' http://bikeplusplus.techgirlwonder.com/user/ >jen_user.txt

curl -X GET -H "Authorization: Bearer 499cfd12c1dbb9cdf2d959e964c4945b" http://bikeplusplus.techgirlwonder.com/user/

convert xml to json to get our route
http://www.utilities-online.info/xmltojson/#.U4tr4XWx1ys

SET REQUEST HEADERS
http://httpkit.com/resources/HTTP-from-the-Command-Line/#set-request-headers




No comments:

Post a Comment