We've all been there, one of your friends asked you for some link and you couldn't resist the urge to send them a rick roll, however nowadays Rickrolling is becoming increasingly harder, as some people can recognize the link nearly instantly and text messaging apps show previews of the video. We, as programmers, need to make information about creating unrecognizable rick rolls more widespread and contribute our part to the community 🫡.

Showcase

(if the video glitches, refresh the page or view it in a new tab or download it)

Prerequisites

  • Have a Github account. If you don't have one, go ahead and set it up.

Step by step guide

  1. Ok, you're logged in and see the home page of github.com. The first thing you need to do is click on your profile logo in the top right corner ("1" in the picture) of the page and click on select "Your repositories" in the pop-up menu ("2" in the picture).
     picture of
  2. Now, on this page should be a green button that has "New" written on it ("3" in the picture). Go ahead and click on it.
     picture of
  3. Now, you're creating a repository. Make sure that your settings are identical to the ones shown below. Especially the part where you make your repository "Public", otherwise it won't work (without Pro/Enterprise account). In the textbox repository name, write the name that you want your link to have. For example, I have "link-name", that means that my final link would look like this: https://tdiblik.github.io/link-name. This link is composed of: https://YOUR_USERNAME.github.io/REPOSITORY_NAME. After you're done with it you can go ahead and click on the "Create repository" button.
     picture of
  4. After that you'll be redirected to another page, this page home page of your repository. Here, you need to click on "creating a new file"
     picture of
  5. That should redirect you to another page, where you need to make sure that you input the following information into the circled sections. To the first circled section, write: _config.yml. And to the second circled section, write: theme: jekyll-theme-cayman. After you've done that, continue by clicking the "Commit changes" button and then confirm it inside the pop-up.
     picture of
     picture of
  6. Once you've confirmed the commit, you will be once again redirected to the repository home page. From here, you want to create another new file called index.html, insert the following code into it, and commit it (following pictures as instructions).
    <!DOCTYPE html>
    <meta charset="utf-8" />
    <title>Oh no no no :D</title>
    <meta
      http-equiv="refresh"
      content="0; URL=https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    />
     picture of
     picture of
     picture of
  7. Right now, we need to activate the github pages page and we're all done. You can do that by going into Settings -> Pages -> Branch, then select master or main (depending on your settings) and click on "Save".
     picture of
  8. All you need to do is wait for a minute and then try your link. You can either construct it yourself following the pattern https://YOUR_USERNAME.github.io/REPOSITORY_NAME, or you can see it in the same "Pages" settings page.
     picture of

And that's it! If you're interested in learning how it works or want to use a different video instead of rick roll, you can read about it in the next blog post.

I hope you enjoyed this article/blog post!

If you have any questions, problems or want to start a discussion, don't hesitate and write me an email!

Disclaimer: The opinions, views and values expressed in this post are solely my own and do not reflect the opinions, views and values of my current or past employer, any open source groups I am or have been involved with, or any other groups/organizations I am or have been associated with.