13

I am just curious whether there is an easter egg - inside joke, hidden message (image) or secret feature - that you have found in Sitecore in various versions.

Are there any?

Easter egg -> https://en.wikipedia.org/wiki/Easter_egg_(media)

16

I have previously found 2 secret CLI commands in Sitecore JSS:

elephant-in-the-room:

> jss elephant-in-the-room
JSS CLI is running in global mode because it was not installed in the local node_modules folder.
  _.-- ,.--.
  .'   .'    /
  | @       |'..--------._
  /      \._/              '.
/  .-.-                     \
(  /    \                     \
\\      '.                  | #
  \\       \   -.           /
  :\       |    )._____.'   \
    "       |   /  \  |  \    )
            |   |./'  :__ \.-'
            '--'

Won't someone please address me?

whats-the-password:

> jss whats-the-password
JSS CLI is running in global mode because it was not installed in the local node_modules folder.
Why it's b, of course.
  • 3
    I wouldn't expect anything else from JSS team than some Easter eggs ;) – Peter Procházka Nov 13 '18 at 11:44
19

Maybe not an easter egg, but MainUtil class contains some "useful" methods like:

  1. My favorites:
/// <summary>Returns false.</summary>
/// <returns></returns>
public static bool False()
{
  return false;
}

/// <summary>
/// Returns <c>true</c>.
/// </summary>
/// <returns></returns>
public static bool True()
{
  return true;
}
  1. Method used by every single Sitecore developer:
/// <summary>Determines whether the specified string is empty.</summary>
/// <param name="s">The s.</param>
/// <returns>
///     <c>true</c> if the specified string is empty; otherwise, <c>false</c>.
/// </returns>
public static bool IsEmpty(string s)
{
  if (s != null)
    return s.Length == 0;
  return true;
}
  1. Very functional:
/// <summary>No-op</summary>
public static void Nop(params object[] obj)
{
}

/// <summary>Touch</summary>
public static void Touch(params object[] obj)
{
}
  1. The one I cannot live without:
/// <summary>
/// Method to call when doing silent catches. Causes the Resharper warning to disappear.
/// </summary>
public static void SilentCatch()
{
}
  • I think that these can be classified as Easter eggs as Easter eggs are also secret feature and these are definitely those kind of "features" :) Thanks for sharing – Peter Procházka Nov 13 '18 at 11:43
  • 1
    Interestingly, IsEmpty is basically the same as IsNullOrEmpty – Matthew FitzGerald-Chamberlain Nov 13 '18 at 16:30
  • 1
    @Geoff Whoops! I'm not sure what was going through my mind, there. You're right. – Nic Hartley Nov 13 '18 at 18:29
2

I was running some shell scripts to import data onto my website in Sitecore PowerShell ISE. And I found these.

enter image description here

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.