from Hacker News

Uber CLI

by luisrudge on 2/23/17, 10:20 PM with 56 comments

  • by Animats on 2/24/17, 5:35 AM

    If you're going to draw lines with characters, use the line drawing characters. We have Unicode now.

    I have a program which takes text files with ASCII line art and automatically turns them into text files with UNICODE line art.[1] I wrote this for some very old documents, but it's still useful.

         ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
         ┃          Source Port          ┃       Destination Port        ┃
         ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
         ┃                        Sequence Number                        ┃
         ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
         ┃                    Acknowledgment Number                      ┃
         ┣━━━━━━━┳━━━━━━━━━━━┳━┳━┳━┳━┳━┳━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
         ┃  Data ┃           ┃U┃A┃P┃R┃S┃F┃                               ┃
         ┃ Offset┃ Reserved  ┃R┃C┃S┃S┃Y┃I┃            Window             ┃
         ┃       ┃           ┃G┃K┃H┃T┃N┃N┃                               ┃
         ┣━━━━━━━┻━━━━━━━━━━━┻━┻━┻━┻━┻━┻━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
         ┃           Checksum            ┃         Urgent Pointer        ┃
         ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┫
         ┃                    Options                    ┃    Padding    ┃
         ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┫
         ┃                             data                              ┃
         ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
      
    
    [1] https://github.com/John-Nagle/pasv/blob/master/src/Util/picf...
  • by mritun on 2/23/17, 11:29 PM

    That argument to UberClient() looks like an API token. Did you mean to leave it in there for the world to use?

    https://github.com/jaebradley/uber-cli/blob/master/src/servi...

  • by chx on 2/24/17, 11:10 AM

    Do tell me, why are you still using Uber? What needs to happen? Let's see: Weakening the rule of law by deliberately ignoring taxi legislation, that's not enough. Rebuilding indentured servitude via subprime mortgaged cars where the payment comes out of the drivers' wages, that's not enough. Launching self driving cars going again against regulations and putting cyclists in deadly danger, that's not enough. Treating women like shit, that's not enough. Stealing Google tech brazenly, that's not enough.

    Tell me, what would be enough?

    Sources for subprime loans: http://valleywag.gawker.com/uber-and-its-shady-partners-are-... https://www.bloomberg.com/news/articles/2016-05-31/inside-ub... https://twitter.com/shashashasha/status/688734478181732352 Self driving shit: https://www.theguardian.com/technology/2016/dec/19/uber-self... the rest is either obvious or recent enough not to need a source.

  • by WillySchu on 2/24/17, 2:21 AM

    Using this, a command that will get your public IP, geo locate it, and then get an uber pickup time for those coordinates.

    dig +short myip.opendns.com @resolver1.opendns.com | xargs -I {} echo "ipinfo.io/"{} | xargs curl | grep loc | cut -d: -f2 | sed "s/,$//" | xargs uber time

  • by randomsofr on 2/23/17, 11:00 PM

    I thought everyone already deleted that app...
  • by jaytaylor on 2/24/17, 1:41 AM

    I'd be more interested in this except for Lyft instead of uber.

    Like many others, I'm done with the tire fire that is uber.

  • by mahyarm on 2/24/17, 1:25 AM

    Is there a way for this to grab your current location, so you don't have to type your address?
  • by arikrak on 2/24/17, 1:17 AM

    Google maps makes it easy to see the estimated prices of Uber and other services.
  • by aduffy on 2/24/17, 3:00 AM

    Great, just another thing I need to delete