If you’re running into the following error when attempting to use Carrierwave to upload a remote file url: TypeError: no implicit conversion of nil into String Then you’re probably very frustrated at the moment. I dug into the carrierwave gem to figure the issue out exactly, however I realized there was an easier (and much quicker solution). If you want to upload a remote file URL using carrierwave, use the [...]
Read More
To list unique filenames using grep, do the following: grep -irl "search-term" .   Notice the ‘l’ flag, short for –files-with-matches, defined as “Suppress normal output; instead print the name of each input file from which output would normally have been printed. The scanning will stop on the first match.” The i flag just makes the search case-insensitive, and r is recursive.
Read More
If you need a footer to stick to the bottom when there is no vertical scrollbar, do the following: $(document).ready(function() { if($("body").height() <= $(window).height()){ $(".footer-container").css("bottom", 0); $(".footer-container").css("position", "absolute"); $(".footer-container").css("width","100%"); } });   This will ensure the footer sticks to the bottom of the browser when there is no scrollbar (eliminating the weird empty space that can some times happen under the footer), while keeping the footer at the very bottom [...]
Read More