Author: anthony

CKeditor – remove top toolbar and bottom toolbar

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 4, Carrierwave, Remote file url uploading

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 […]

Grep list only unique filenames

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 […]

Fix footer to bottom if no vertical scrollbar

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 […]

Sunspot Solr – Indexing PDF documents

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 […]

Sublime Text 3 – Ubuntu – Package Control installation

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. […]

Broadcom Wireless and Ubuntu

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.