URL shortener for manjaro friends.
curl -s https://mjr.sh/add?url=https://example.com
Which returns:
{
"url": "https://mjr.sh/C7D3",
"edit": "https://mjr.sh/C7D3/edit?url=https%3A%2F%2Fexample.com&secret=4673cab7-6d01-479c-97b2-999010fa8987",
"stats": "https://mjr.sh/C7D3/stats",
"key": "C7D3",
"timestamp": "2024-05-18 12:58:17",
"value": "https://example.com",
"secret": "4673cab7-6d01-479c-97b2-999010fa8987"
}
Store the secret if you'd like to edit the URL afterwards.
curl -s https://mjr.sh/C7D3/edit?secret=4673cab7-6d01-479c-97b2-999010fa8987&url=https%3A%2F%2Fexample.de
Which returns:
{
"url": "https://mjr.sh/C7D3",
"key": "C7D3",
"timestamp": "2024-05-18 12:59:30",
"value": "https://example.de",
"secret": "4673cab7-6d01-479c-97b2-999010fa8987"
}
curl -s https://mjr.sh/C7D3/stats
Which returns something like this
{
"key": "C7D3",
"count": 1,
"timestamp": "2024-05-17 19:34:01",
"badge": "https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fmjr.sh%2FAB34%2Fstats&query=%24.count&label=redirects"
}