git.ioでは、https://git.io/foo
などのような短縮URLを作成できます。以下の様なコマンドでURLとfoo
の部分に来る文字列を指定します。
$ curl -i http://git.io -F "url=https://github.com/syui" -F "code=syui"
これでhttp://git.io/syui
にアクセスすると、https://github.com/syui
に飛ばされるようになります。
参考
$ curl -i http://git.io -F "url=https://github.com/..."
HTTP/1.1 201 Created
Location: http://git.io/abc123
$ curl -i http://git.io/abc123
HTTP/1.1 302 Found
Location: https://github.com/...
$ curl -i http://git.io -F "url=https://github.com/technoweenie" \
-F "code=t"
HTTP/1.1 201 Created
Location: http://git.io/t