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

Shirtbot It's a slack bot that makes shirts
Posted: August 01, 2021
I feel stuck in the the engineering for engineers trap If you aren't an engineer please read this and reach out, I'd love to chat
Posted: June 20, 2021
Unwritten Coding Standards: Function Ordering A standard for how you should order functions in files to increase the consistency of your code bases
Posted: May 15, 2021
Designing a guitar with hot-swappable pickups I made a custom guitar with hot-swappable pickups
Posted: May 02, 2021
How to design a motherboard for your electronics project - Part 2 Designing a motherboard for your project is a great second step when developing an electronics project. This is the guide I wish existed when I got started doing this.
Posted: April 25, 2021