Code samples

Here is an ordered list with what to expect:

  1. HTML sample
  2. SCSS sample
  3. JavaScript sample
  4. Ruby sample

Code on!

<html style="font-size: 100%">
  <!-- This is a comment -->
  <head>
    <title>Mixed HTML Example</title>
    <style type="text/css">
      h1 {font-family: sans; color: #000;}
      div {background: white !important;}
      body {
        max-width: 50em;
        margin: 1em 2em 1em 5em;
      }
    </style>
  </head>
  <body>
    <h1>Mixed HTML samples</h1>
    <script>
      function jsFunc(arg1, arg2) {
        if (arg1 && arg2) document.body.innerHTML = "example";
      }
    </script>
  </body>
</html>

You can add some comments between your code blocks.

$variable: #333;

$blue: #3bbfce;
$margin: 16px;

.content-navigation {
  #nested {
    background-color: black;
  }
  border-color: $blue;
  color: darken($blue, 9%);
}

@mixin table-base {
  th {
    text-align: center;
    font-weight: bold;
  }
  td, th {padding: 2px}
}

This looks nice.

function compare(option1, option2) {
  if(option1 === option2) {
    return "No difference";
  }

  else if(option1 === "Something") {
    if(option2 === "Nothing") {
        return "I guess that's fine";
    }
    else {
        return "Oh well...";
    }
  }

  else if(option1 === "Something else") {
      if(choice2 === "Still nothing") {
          return "I see your point";
      }
      else {
          return "I guess that does it";
      }
  }
}

Just saying.

Gem::Specification.new do |s|
  s.name     = 'Testing'
  s.version  = '0.1.0'
  s.license  = 'MIT'
  s.summary  = 'Some description'
  s.author   = 'Protesilaos Stavrou'
  s.email    = 'public@protesilaos.com'
  s.homepage = 'https://github.com/protesilaos/GIT-REPO'
  s.files    = `git ls-files -z`.split("\x0").grep(%r{^_(sass|includes|layouts)/})
end