To chmod only files or directories recursively, do the following: For files: find . -type f -exec chmod 644 {} ; For directories find . -type d -exec chmod 755 {};
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 […]
Make Google Charts Responsive
To make google charts responsive to browser resizing and mobile devises, set the width option to 100%: var options = {width: “100%”} Then, redraw the chart every time the page is resized: $(window).resize(function(){ drawChart(); });
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.
Install FFMPEG on Ubuntu
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 […]