Six Secret Easter Eggs in GitHub
Tags: github
Published: 2021-03-12 22:07:14

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':

{% youtube kSzRvnby7mg %}

## 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
```

I believe you'll also get other representations to π by adding file extensions like [`.json`](https://github.com/π.json) or [`jpeg`](https://github.com/π.jpeg). Mmmm... pie.

![GitHub Pi(e) Easter Egg](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ys9n9kt72gz8h8tifc73.png)

## 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~~~~
            ~~~~~~==~==~~~==~==~~~~~~
             ~~~~~~==~==~==~==~~~~~~
                 :~==~==~==~==~~
```

That speech bubble contains a little bit of GitHub Zen that my buddy [@benbalter](https://github.com/benbalter) explains in this [blog post](https://ben.balter.com/2015/08/12/the-zen-of-github/).

🚨 **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](https://github.com/xyzzy/smile)! 🤯 

## 3. Everything zen

After a long day staring at a dark terminal, [GitHub CLI](https://cli.github.com/) 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](https://res.cloudinary.com/practicaldev/image/fetch/s--iAgtlGNn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5rvtdchgfkwcxvj0mno1.gif)

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](https://www.color-hex.com/color/b6b3d2)). Thistle do nicely :ok_hand:

## 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](https://user-images.githubusercontent.com/121322/110897704-c670c180-82b2-11eb-800b-d87eb4f9ed71.gif)

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](https://dev.to/github/10-standout-github-profile-readmes-h2o).

## 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](https://user-images.githubusercontent.com/121322/107855938-587fca00-6dda-11eb-8373-9dc0fc824ce6.png)

## 6. Viewing your contributions... 80s style

If you haven't stumbled upon it yet, [GitHub Skyline](https://skyline.github.com/) is a cool little visualization of your contributions for a given year. Look at [mine from 2020](https://skyline.github.com/leereilly/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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1tossv12w5kfv50wn1q2.gif)

To activate the Easter egg, enter the [Konami Code](https://en.wikipedia.org/wiki/Konami_Code) once a Skyline has loaded and you'll be transported back even _further_ in time...

<kbd>↑</kbd> <kbd>↑</kbd> <kbd>↓</kbd> <kbd>↓</kbd> <kbd>←</kbd> <kbd>→</kbd> <kbd>←</kbd><kbd>→</kbd> <kbd>B</kbd> <kbd>A</kbd>

Kudos to [@carlesnunez](https://github.com/carlesnunez) for discovering it:

{% twitter 1362159214479761415 %}

End of line