/usr/local/bin α

Linux-command-as-a-service

Run Linux-command as a REST-service and receive result

You just need curl or PowerShell

Max data size: 100 MB


Use
curl --data-binary @- https://localb.in
if your data contains new lines
Examples:
base64
      $ echo "Enjoy the silence" | curl -d @- https://localb.in/base64
      RW5qb3kgdGhlIHNpbGVuY2UK
base64 (decode from base64 to text)
      $ echo -n "S25vY2ssIGtub2Nr" | curl -d @- https://localb.in/base64?-d
      Knock, knock
sed
      $ echo -n "We will rack you" | curl -d @- https://localb.in/sed?'s/a/o/g'
      We will rock you
ipcalc
      $ curl https://localb.in/ipcalc?192.168.0.0/18
      Address:   192.168.0.0          11000000.10101000.00 000000.00000000
      Netmask:   255.255.192.0 = 18   11111111.11111111.11 000000.00000000
      Wildcard:  0.0.63.255           00000000.00000000.00 111111.11111111
      =>
      Network:   192.168.0.0/18       11000000.10101000.00 000000.00000000
      HostMin:   192.168.0.1          11000000.10101000.00 000000.00000001
      HostMax:   192.168.63.254       11000000.10101000.00 111111.11111110
      Broadcast: 192.168.63.255       11000000.10101000.00 111111.11111111
      Hosts/Net: 16382                 Class C, Private Internet
jq
      $ curl https://api.github.com/users/esin -s | curl -d @- https://localb.in/jq
      {
        "login": "esin",
        "id": 69767,
        "node_id": "MDQ6VXNlcjY5NzY3",
        "avatar_url": "https://avatars0.githubusercontent.com/u/69767?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/esin",
        "html_url": "https://github.com/esin",
        "followers_url": "https://api.github.com/users/esin/followers",
        "following_url": "https://api.github.com/users/esin/following{/other_user}",
        "gists_url": "https://api.github.com/users/esin/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/esin/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/esin/subscriptions",
        "organizations_url": "https://api.github.com/users/esin/orgs",
        "repos_url": "https://api.github.com/users/esin/repos",
        "events_url": "https://api.github.com/users/esin/events{/privacy}",
        "received_events_url": "https://api.github.com/users/esin/received_events",
        "type": "User",
        "site_admin": false,
        "name": "Andrey Esin",
        "company": "Sberbank",
        "blog": "andrey.es",
        "location": "Russia, Moscow",
        "email": null,
        "hireable": null,
        "bio": "Linux Administrator, DevOps Engineer and Go Developer",
        "twitter_username": "la_stik",
        "public_repos": 28,
        "public_gists": 6,
        "followers": 438,
        "following": 4601,
        "created_at": "2009-04-02T12:01:48Z",
        "updated_at": "2020-11-03T07:56:53Z"
      }

Examples:
base64
      $ echo "Enjoy the silence" | Invoke-RestMethod https://localb.in/base64
      RW5qb3kgdGhlIHNpbGVuY2UK
base64 (decode from base64 to text)
      $ echo -n "S25vY2ssIGtub2Nr" | Invoke-RestMethod https://localb.in/base64?-d
      Knock, knock
sed
      $ echo -n "We will rack you" | Invoke-RestMethod https://localb.in/sed?'s/a/o/g'
      We will rock you
ipcalc
      $ curl https://localb.in/ipcalc?192.168.0.0/18
      Address:   192.168.0.0          11000000.10101000.00 000000.00000000
      Netmask:   255.255.192.0 = 18   11111111.11111111.11 000000.00000000
      Wildcard:  0.0.63.255           00000000.00000000.00 111111.11111111
      =>
      Network:   192.168.0.0/18       11000000.10101000.00 000000.00000000
      HostMin:   192.168.0.1          11000000.10101000.00 000000.00000001
      HostMax:   192.168.63.254       11000000.10101000.00 111111.11111110
      Broadcast: 192.168.63.255       11000000.10101000.00 111111.11111111
      Hosts/Net: 16382                 Class C, Private Internet
jq
      $ curl https://api.github.com/users/esin -s | Invoke-RestMethod https://localb.in/jq
      {
        "login": "esin",
        "id": 69767,
        "node_id": "MDQ6VXNlcjY5NzY3",
        "avatar_url": "https://avatars0.githubusercontent.com/u/69767?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/esin",
        "html_url": "https://github.com/esin",
        "followers_url": "https://api.github.com/users/esin/followers",
        "following_url": "https://api.github.com/users/esin/following{/other_user}",
        "gists_url": "https://api.github.com/users/esin/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/esin/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/esin/subscriptions",
        "organizations_url": "https://api.github.com/users/esin/orgs",
        "repos_url": "https://api.github.com/users/esin/repos",
        "events_url": "https://api.github.com/users/esin/events{/privacy}",
        "received_events_url": "https://api.github.com/users/esin/received_events",
        "type": "User",
        "site_admin": false,
        "name": "Andrey Esin",
        "company": "Sberbank",
        "blog": "andrey.es",
        "location": "Russia, Moscow",
        "email": null,
        "hireable": null,
        "bio": "Linux Administrator, DevOps Engineer and Go Developer",
        "twitter_username": "la_stik",
        "public_repos": 28,
        "public_gists": 6,
        "followers": 438,
        "following": 4601,
        "created_at": "2009-04-02T12:01:48Z",
        "updated_at": "2020-11-03T07:56:53Z"
      }