A very small link app for exposing links.
You're developing a webapp locally, on your laptop, perhaps with Elnode but it could be anything.
You want to test a media query intended to make the site work better on a mobile. But your mobile doesn't know what your laptop's address is.
Now you're stuck.
Linky is a stupid little link store. You run it on the Internet at a known address, say: http://linky.elnode.org
Then you can post a link to your app running on your laptop's local IP address and port.
Then you can browse to the same linky site on your mobile and find the link.
Linky has a simple basic authentication and registration system, so your links are separate from other people's links.
It's not intended to be secure though, presumably only people on your LAN can see the app that is linked to on linky.
You can register with a simple HTTP call:
curl -d "username=tony&password=secret" http://linky.elnode.org/register/
this will return a redirect to the login page.
Login is just form/cookie auth:
curl -c ~/.cookies -d "username=tony&password=secret" http://linky.elnode.org/login/
Will login and store the cookie in ~/.cookies. You can then issue further curl's:
curl -b ~/.cookies http://linky.elnode.org/
POSTing a link is easy too:
curl -b ~/.cookies \ -d "a=http://10.1.1.203:8066&n=a+little+app" \ http://linky.elnode.org
Would return a redirect to /
If you use elnode there's linky-client included here. It provides an M-x command for POSTing a link to a running elnode server to linky.
linky-client needs the ip command and GNU sed.
If you want a more sophisticated solution check out http://localtunnel.me/ which is a reverse proxy to a well known site on the Internet.
The trouble with this solution is that your mobile requires a connection to the Internet for the whole session, instead of just the initial discovery.
Another solution to this is to use an authentication based url shortener, something like http://goo.gl. Just paste your site into the shortener, if you're loggedin to the same account on your mobile you can retrieve it.
This is basically the same as Linky. The difference is that you have to be logged in to Google and it's therefore harder to curl the address into it.
The real solution for this is for mobile browsers to support MDNS natively, then you could set up MDNS resolution for your laptop and your mobile could just find it. There are probably security issues with that though.