Share your repls and programming experiences

← Back to all posts
Linkless: A link shortner
h
CodeLongAndPros (1465)

Have you ever wanted to shorten a link, but didn't have a web browser ready?

Well, I am happy to introduce:

Linkless

You get more link, for less work.

Right now, there is no web interface, just a D cli, right here.

It supports three modes:

  • Add mode (default)
  • Dereference mode
  • Delete mode

Add mode

Invoke with ./linkless
You pass these two arguments:
name and url.
Name is the shortened name.

So if we run linkless goog https://google.com, https://Lesslink.codelongandpros.repl.co/goog points to https://google.com

However, you should always use --as. Else, anyone can delete your link.

So if I want to link https://bing.com to b, as the user linus:
linkless b https://bing.com --as linus

Dereference mode

This uses the command line switch -d, or --decode.

This takes one argument, the name

So assuming the above example with google, linkless -d goog will print
goog -> https://google.com

This ignores --as

If you get something like:
badlink -> /dev/null, that means that there is no url for that name.

Delete mode

This uses the flag --delete.

To delete a link without a user system:

linkless --delete goog.

Right now, this will print Server resonded with error -1 (unknown reason).
All this means is access denied (better messages coming soon)

To delete a link made by a user, use --as.

So to delete goog, we have to say we are Linus:

linkless --delete goog --as linus

If you are creating a link and it's slow, try running the btw repl (I forgot my uptimerobot password oof).

Anyways, fun linking!

Commentshotnewtop
[deleted]

How long did it take u to type all this? My fingers would be dead by this point

[deleted]

ave you ever wanted to shorten a link, but didn't have a web browser ready?

Well, I am happy to introduce:

Linkless

You get more link, for less work.

Right now, there is no web interface, just a D cli, right here.

It supports three modes:

Add mode (default)
Dereference mode
Delete mode
Add mode

Invoke with ./linkless
You pass these two arguments:
name and url.
Name is the shortened name.

So if we run linkless goog https://google.com, https://Lesslink.codelongandpros.repl.co/goog points to https://google.com

However, you should always use --as. Else, anyone can delete your link.

So if I want to link https://bing.com to b, as the user linus:
linkless b https://bing.com --as linus

Dereference mode

This uses the command line switch -d, or --decode.

This takes one argument, the name

So assuming the above example with google, linkless -d goog will print
goog -> https://google.com

This ignores --as

If you get something like:
badlink -> /dev/null, that means that there is no url for that name.

Delete mode

This uses the flag --delete.

To delete a link without a user system:

linkless --delete goog.

Right now, this will print Server resonded with error -1 (unknown reason).
All this means is access denied (better messages coming soon)

To delete a link made by a user, use --as.

So to delete goog, we have to say we are Linus:

linkless --delete goog --as linus

If you are creating a link and it's slow, try running the btw repl (I forgot my uptimerobot password oof).

Anyways, fun [email protected]

[deleted]
[deleted]

Hey everyone how reads this write in the comments ur typing speed :[email protected]

[deleted]

Mine is 70 wpm @CodeLongAndPros

[deleted]

Well that depends how old r u if ur in ur teens ur hand are like lightning but if ur like in ur 40s ur hand are kinda slow and if ur a little kid ur useing one finger most of the [email protected]

[deleted]

Wait r u a [email protected]

[deleted]

The guy in the picture is bald 😂@CodeLongAndPros

[deleted]

Oof r u the guy in the picture or is that Mr.Howie😂😂😂@CodeLongAndPros

firefish (780)

GitHub is better than GitLab

firefish (780)

@CodeLongAndPros We did discuss this under that ANCIENT issue on Night, didn't we?

RahulChoubey1 (60)

What's with the /add?

CodeLongAndPros (1465)

@RahulChoubey1 That's how you'll add a link to the shortener...
But you should use the D client.

HahaYes (1250)

whoa this is so cool

HahaYes (1250)

@CodeLongAndPros I saw btw so I assume arch

CodeLongAndPros (1465)

@HahaYes Ok so
There's a repl.it db entry with some json
{name:, url, owner,)
And then some api routes to get it.

CodeLongAndPros (1465)

@HahaYes Run the given repl https://repl.it/@CodeLongAndPros/linkless-d#main.d

it should give a bash shell.

Type ./linkless btw https://archlinux.org --as hahayes or something like that.

HahaYes (1250)

@CodeLongAndPros oh wow thats really cool. Can I fork it?

CodeLongAndPros (1465)

@HahaYes But yeah. The client's just what I made.

firefish (780)

@HahaYes Also, stop imposing ASCII Art easter eggs on every man and his dog's language