Click anywhere to close

Html Code Blocks

In an attempt to make this site look prettier I have added HTML code blocks. The library that I am using to do this is called highlight_js-rails. It was easily added to my rails project by just adding gem 'highlight_js-rails' to my Gemfile. Here is an example of it in action:

#include 
int main() {
  printf("Hello World\n");
}


This is my application.css:
/*
*= require_self
 *= require highlight_js/monokai
*/


And my application.js:

//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require highlight_js/highlight
//= require highlight_js/languages/ruby
//= require highlight_js/languages/cpp
//= require highlight_js/languages/python
//= require highlight_js/languages/javascript


Recent Posts

Why I started a Blog Writing to start conversations
Categories:  Random
Posted: June 03, 2020
Unwritten Coding Standards: Vertical Whitespace Simple vertical whitespace rules that will make any code easier to read
Categories:  Coding, mike8
Posted: May 27, 2020
Things I Like Bootstrapping our reader/writer relationship by front-loading all the things I love and would inevitably tell you about anyway
Categories:  Random
Posted: May 24, 2020
Scalability Dimensions A few words on how you should order parameters to maximize codebase consistency and scalability
Categories:  Coding
Posted: May 20, 2020
Unwritten Coding Standards: Parameter Ordering A few words on how you should order parameters to maximize codebase consistency and scalability
Categories:  Coding, mike8
Posted: May 13, 2020