Coder Social home page Coder Social logo

ipqr's Introduction

ipqr

Show your current IP address as a QR code in the terminal

This makes it easy to test a local site on mobile -- because typing IP addresses on mobile sucks

ipqr demo

Download

Mac

Using homebrew:

brew install jordwest/tools/ipqr

Alternatively, download the latest darwin_amd64.tar.gz package from the Releases page

Windows

Download the latest windows_amd64.zip or windows_386.zip from the Releases page.

Linux (including Raspberry Pi!)

Download the latest linux_*.tar.gz package from the Releases page.

For x86/x86_64 processors, use linux_386.tar.gz or linux_amd64.tar.gz.

For Raspberry Pi, use linux_arm.tar.gz. Note that although a 64-bit binary is available, the default OS on the Raspberry Pi 3 (which has a 64-bit processor) is still 32-bit.

Installation from source

To get started, make sure you have go installed, then:

$ go get github.com/jordwest/ipqr
$ ipqr

Usage

$ ipqr

That's it.

Examples

Display help

$ ipqr --help
Usage of ipqr:
  -h, --host string       Override host. This will default to the autodetected IP of this device
  -n, --interface int     The number of the interface to display. Use --list to find the interface number (default -1)
  -l, --list              Show a complete list of detected network addresses. By default we'll try to auto detect
  -a, --path string       Specify a path at the end of the URL
  -p, --port int          The port number to append to the end of the host, if any (default -1)
  -r, --protocol string   The protocol to prepend (default "http")
  -v, --version           Show the version number and exit

Use a specific port and path

$ ipqr --port 8080 --path /blog
en0: 192.168.1.226 ==> http://192.168.1.226:8080/blog

Display local interfaces as a list

$ ipqr --list
0: lo0 ::1
1: lo0 127.0.0.1
2: lo0 fe80::1
3: en0 fe80::8a23:9ff:fa4c:48c3
4: en0 192.168.1.226

Select a specific interface number

$ ipqr -n 1
lo0: 127.0.0.1 ==> http://127.0.0.1

Customize the host (skips IP detection)

$ ipqr --host google.com --path /search?q=github+ipqr
http://google.com/search?q=github+ipqr

Credits

This tool makes use of some great open source projects:

ipqr's People

Contributors

jordwest avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

benjaminsalascr

ipqr's Issues

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.