To use the CKeditor without the top and bottom toolbars, do the following: config.removePlugins = "toolbar,elementspath" config.resize_enabled = false   This will remove both the capability to resize the dialog and remove the grey toolbar at the bottom, as well as the entire top toolbar, without the need for CSS modifications. If you’re using the rails plugin – these options can be passed in when creating the cktext_area object, for [...]
Read More
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
Indexing PDF documents using sunspot / solr seemed like a difficult task initially. There are a number of tutorials dealing with this topic but they seemed overly complicated. In the end, I decided the simplest way to go about providing search functionality for indexed PDF documents was to 1) parse the documents locally 2) input the raw PDF text into an ActiveRecord Object. 3) index the associated raw text field [...]
Read More
If you’re running into the following error when attempting to install “Package Control’ for Sublime Text: urllib.error.URLError: Then you’ll need to install manually. The instructions suggest that you “Browse Packages”, then navigate to the “installed packages” directory. However, if you’re like me, the “Installed Packages” directory is not up the directory tree, it is down. Simply download the Package Control zip manually and put it in the ~/.config/sublime-text-3/Installed Packages directory [...]
Read More
If you’ve recently built a system with a broadcom wireless configuration with Ubuntu and noticed your wireless networks are nowhere to be found, then you’ll need to update your drivers (specifically adding wl). This page will probably help: http://www.broadcom.com/docs/linux_sta/README.txt It is a pain, but once it is configured it generally works.
Read More
If you run into the following error when installing FFmpeg on Ubuntu Package ffmpeg is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package ‘ffmpeg’ has no installation candidate You can do the following to install FFmpeg instead: sudo add-apt-repository ppa:jon-severinsson/ffmpeg sudo apt-get update sudo apt-get install ffmpeg The PPA [...]
Read More