Web development

Insomnia REST client Installation on Ubuntu CSS Line numbers for code samples https://codepen.io/elomatreb/pen/hbgxp

 def print_hi(name)  puts "Hi, #{name}" end  print_hi('Tom') #=> prints 'Hi, Tom' to STDOUT. 

Insomnia REST client

Installation on Ubuntu

CSS Line numbers for code samples

https://codepen.io/elomatreb/pen/hbgxp

<div class="container">
    <pre>
        <span>def print_hi(name)</span>
        <span>  puts "Hi, #{name}"</span>
        <span>end</span>
        <span></span>
        <span>print_hi('Tom')</span>
        <span>#=> prints 'Hi, Tom' to STDOUT.</span>
    </pre>
</div>

:::css

@import "bourbon";

body {
  background-color: #eee;
  color: #555;
}

pre {
  font-family: monospace;
  background-color: #fff;
  width: em(440);
  margin: 4em auto;
  padding: 0.5em;
  border-radius: .25em;
  box-shadow: .1em .1em .5em rgba(0,0,0,.45);
  line-height: 0;
  counter-reset: line;

  span {
    display: block;
    line-height: 1.5rem;

    &:before {
      counter-increment: line;
      content: counter(line);
      display: inline-block;
      border-right: 1px solid #ddd;
      padding: 0 .5em;
      margin-right: .5em;
      color: #888
    }
  }
}

Comments