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 Other Posts

Google Cache Javascript Shortcut Automatically takes you to the lastest google cached version of a site
Categories:  Web
Posted: June 12, 2017
I hate writing web scrapers Proposition for a better way to scrape`
Categories:  Projects, Web, Scraping
Posted: April 02, 2016
One-to-Many Relationships in CouchDB How to best create One-to-Many relationships in CouchDB
Categories:  Web, CouchDB
Posted: July 09, 2014
ReddPics Javascript Shortcut Automatically takes you from reddit to reddpics
Categories:  Web
Posted: June 03, 2014
JP Morgan Code For Good 2013 Jawbone UP data based donation page
Categories:  Python, Web
Posted: May 29, 2014