Checking uber surge status from terminal

Because I’m too lazy to pick up the phone and wait for the uber app to load.

We are going to use uber api for this. Create an app and get your server token. In the estimates endpoint you don’t need to pass different start location and end location to get the surge multiplier. (Note that I’m using the v1 of the api. v1.2 doesn’t provide us the surge multiplier since they are showing upfront charges now). Just pass the starting location to check for surge. (Use google maps and check the url to get your lat, long).

Here’s a simple script to get what we need from the api. Don’t forget to replace YOUR_TOKEN with your actual server token from the uber developer dashboard.

Then from your terminal set an alias to the script  with your lat long values.

$ alias surge="/path/to/script/surge.php 6.9328 79.8414722"

Reload the profile to make the new alias work. In my case its;

$ source ~/.zshrc

Next time you want to check if there’s any surge you just have to type surge in your terminal.

ToDo app with HTML5 localStorage

Here‘s a simple todo app I did with html5 localstorage. It saves todo items in your browser. The app needs more features like editing the list etc. Hoping to add them soon.

Just type what you have to do in the box and hit enter to save. Can mark them as done by clicking the tick icon in the middle of the item. Yeah the icon is too small. Let me know if you have any suggestions

ToDo5 Continue reading “ToDo app with HTML5 localStorage”