Thursday, September 20, 2018

Monday, September 17, 2018

Copy / Paste terminal utility for Ubuntu

1. sudo apt-get update
2. sudo apt-get install xclip

Add an alias to the .bashrc file:

alias pbcopy='xclip -sel clip'

I am using the same command that is used on a Mac as the alias. I also have open alias to open a directory from a terminal:

alias open='xdg-open'

Wednesday, July 25, 2018

no implicit conversion of nil into String

This can happen when you have not defined the required configuration in secrets.yml. For instance, you are using http basic auth and the credentials are not defined in the config file.

Wednesday, July 18, 2018

simplehttpserver npm



npm install simplehttpserver -g
simplehttpserver .
simplehttpserver . -p 8081

Tuesday, July 17, 2018

Converting .avi file to .mp4

Install ffmpeg:

On Mac 10.10.5:


brew install ffmpeg



Thursday, July 12, 2018

Sprockets::FileNotFound: couldn't find file 'fingerprintjs2' with type 'application/javascript'

jquery_ujs Uncaught TypeError: $.ajaxPrefilter is not a function

This happened when I copied the started template from Bootstrap 4.1 version. It gives you the slim version of jQuery by default. Use the regular jQuery. https://code.jquery.com/jquery-3.3.1.min.js

In style.scss, include
@import bootstrap

Copy the bootstrap.js to vendor/assets/javascripts directory. Copy bootstrap.css to vendor/assets/css directory.