Six Secret Easter Eggs in GitHub

Lee Reilly - Mar 12 '21 - - Dev Community

GitHub has quite a few Easter eggs hidden deep in the code. This post highlights a few of them - well, 6 to be exact!

Did you know: The phrase "Easter egg" was first coined in 1979 by Steve Wright, Director of Software Development at Atari. If you saw the movie Ready Player One, you'll know exactly what I'm talking about. Here's the scene where they uncover the world's first Easter egg in the classic game 'Adventure':

1. Easy as pi

I don't think there's a language that doesn't have the value for pi in it's standard/math library. But if Google is down, and you forget your high school math, you can always point your browser to a https://github.com/π.

There you'll get an ASCII art representation of Pi correct to 336 decimal places! Handy huh?

    3.141592653589793238462643383279
    5028841971693993751058209749445923
  07816406286208998628034825342117067
  9821    48086         5132
  823      06647        09384
46        09550        58223
17        25359        4081
          2848         1117
          4502         8410
          2701         9385
          21105        55964
          46229        48954
          9303         81964
          4288         10975
        66593         34461
        284756         48233
        78678          31652        71
      2019091         456485       66
      9234603           48610454326648
    2133936            0726024914127
    3724587             00660631558
    817488               152092096

    Via https://github.com/Legend-of-iPhoenix/ascii-pi
Enter fullscreen mode Exit fullscreen mode

I believe you'll also get other representations to π by adding file extensions like .json or jpeg. Mmmm... pie.

GitHub Pi(e) Easter Egg

2. Octocats in the system

Speaking of ASCII art, did you know there's an API endpoint for Mona, GitHub's Octocat mascot? Curl or visit https://api.github.com/octocat in a browser:

curl https://api.github.com/octocat

               MMM.           .MMM
               MMMMMMMMMMMMMMMMMMM
               MMMMMMMMMMMMMMMMMMM      ____________________________
              MMMMMMMMMMMMMMMMMMMMM    |                            |
             MMMMMMMMMMMMMMMMMMMMMMM   | Keep it logically awesome. |
            MMMMMMMMMMMMMMMMMMMMMMMM   |_   ________________________|
            MMMM::- -:::::::- -::MMMM    |/
             MM~:~ 00~:::::~ 00~:~MM
        .. MMMMM::.00:::+:::.00::MMMMM ..
              .MM::::: ._. :::::MM.
                 MMMM;:::::;MMMM
          -MM        MMMMMMM
          ^  M+     MMMMMMMMM
              MMMMMMM MM MM MM
                   MM MM MM MM
                   MM MM MM MM
                .~~MM~MM~MM~MM~~.
             ~~~~MM:~MM~~~MM~:MM~~~~
            ~~~~~~==~==~~~==~==~~~~~~
             ~~~~~~==~==~==~==~~~~~~
                 :~==~==~==~==~~
Enter fullscreen mode Exit fullscreen mode

That speech bubble contains a little bit of GitHub Zen that my buddy @benbalter explains in this blog post.

🚨 WARNING: Be careful if you curl ASCII art (or anything for that matter) off of the internet. Turns out that some ASCII art is executable! 🤯

3. Everything zen

After a long day staring at a dark terminal, GitHub CLI users can take a deep breath, and take a walk through their repository's roguelike garden with gh repo garden. You can even navigate with vi keys!

GitHub CLI animation showing gh repo garden

Each flower is represented by the first letter of the committer's GitHub username, and the color of each flower is the first 6 characters of the commit's SHA interpreted as a hex code.

Eg. commit b6b3d26ee50fc6540e1796d8bdc563d22da44ba5 would be #b6b3d2 (a nice lilac color). Thistle do nicely 👌

4. Spruced-up user profiles

It's not exactly a secret secret, but you you can customize your user profile by adding a special repo named after your username:

GitHub README Profile Easter Egg

With a little a bit of Markdown and an image or two, it's a great way to tell people about yourself, show what you're working on, etc.

If you're looking for some inspiration, check out this post featuring ten standout profile READMEs.

5. Spooktacular contributions

Once every year your contributions graph will look even more spooktacular as those lovely shades of green turn... halloweeny (is that a word?).

Halloween GitHub Contribution Graph Easter Egg

6. Viewing your contributions... 80s style

If you haven't stumbled upon it yet, GitHub Skyline is a cool little visualization of your contributions for a given year. Look at mine from 2020 for example. You can download those Skylines as .stl files to print, purchase physical copies of them, and/or explore them in virtual reality.

Keanu's reaction to virtual reality Skylines

To activate the Easter egg, enter the Konami Code once a Skyline has loaded and you'll be transported back even further in time...

B A

Kudos to @carlesnunez for discovering it:

End of line

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .