Giter Site home page Giter Site logo

citibike-texts's Introduction

Citibike Texts

Deploy

A roll-your-own application for sending scheduled SMS messages with the number of bikes in your nearest New York Citibike docks. Requires a Twilio account (a free one works fine).

Scheduling from Heroku

In order for this to be useful, you'll want to receive an SMS at set times, e.g. before you leave home/work. The easiest and free-est way to do this is using Heroku.

Using the above button, deploy the application and set your config vars.

After deployment, go to Manage App, then from the Resources tab, Heroku Scheduler. Set the Scheduler to run npm run notify at the desired time.

Running locally

Copy .env.example to .env ($ cp .env.example .env) and enter your credentials.

  • TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN - your account credentials from Twilio (sign up for a free account here if you don't already have one https://www.twilio.com/try-twilio).
  • RECIPIENT_PHONE - the number to send the SMS from as provisioned by Twilio. Format is +11235551111
  • SENDER_PHONE - the number that will receive the SMS. Ensure this is whitelisted to receive texts in your Twilio account. Format is +11235551111
  • LATITUDE and LONGITUDE - The coordinates from which to seach for bikes. Get your location using https://www.latlong.net/ or similar
  • NUM_STATIONS - How many nearest stations from whic to report availability. These will be the n nearest stations as the crow flies from the provided latitude and longitude.

To run the script: $ npm run notify. This will send a one-off text to the provided number.

citibike-texts's People

Contributors

jshakes avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

igdaloff

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.