Skip to content

Instantly share code, notes, and snippets.

View rodleviton's full-sized avatar
⛰️

Rodney Leviton rodleviton

⛰️
View GitHub Profile
/*
* An AngularJS Service for intelligently geocoding addresses using Google's API. Makes use of
* localStorage (via the ngStorage package) to avoid unnecessary trips to the server. Queries
* Google's API synchronously to avoid `google.maps.GeocoderStatus.OVER_QUERY_LIMIT`.
*
* @author: benmj
* @author: amir.valiani
*
* Original source: https://gist.github.com/benmj/6380466
*/
@rodleviton
rodleviton / imagemagick-install-steps
Created May 26, 2014 07:37
Installing Image Magick on Ubuntu 14.04
sudo -i
cd
apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y
wget http://www.imagemagick.org/download/ImageMagick-6.8.7-7.tar.gz
tar xzvf ImageMagick-6.8.9-1.tar.gz
cd ImageMagick-6.8.9-1/
./configure --prefix=/opt/imagemagick-6.8 && make
checkinstall
@rodleviton
rodleviton / gulpfile.js
Last active August 29, 2015 14:01
Basic gulp file to get project up and running
var gulp = require('gulp'),
minifycss = require('gulp-minify-css'),
autoprefixer = require('gulp-autoprefixer'),
notify = require('gulp-notify'),
sass = require('gulp-ruby-sass'),
rename = require('gulp-rename');
gulp.task('css', function() {
return gulp.src('public/assets/sass/application.scss')
.pipe(sass({ style: 'expanded' }))
@rodleviton
rodleviton / bs3-megamenu-intelligence.js
Last active August 29, 2015 14:01
Bootstrap Mega Menu Responsive Intelligence
// Handle Mega Menu Positioning
// Requires Yamm Mega Menu Plugin for Bootstrap3 (http://geedmo.github.io/yamm3/)
$('li.dropdown > a').on('click', function () {
var screenWidth = $(window).width();
var xPos = $(this).offset().left;
var parent = $(this).parent('.dropdown');
var dropdownWidth = $('.dropdown-menu', parent).width();
if ((xPos + dropdownWidth) > screenWidth) {
@rodleviton
rodleviton / install.sh
Last active January 20, 2018 12:59 — forked from JeffreyWay/install.sh
cd /vagrant
mkdir html
sudo apt-get update
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
sudo apt-get install -y vim curl python-software-properties
sudo add-apt-repository -y ppa:ondrej/php5
sudo apt-get update
sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug
cat << EOF | sudo tee -a /etc/php5/mods-available/xdebug.ini
@rodleviton
rodleviton / gist:7076764
Created October 20, 2013 23:50
JavaScript: jQuery Extend Plugin
$.extend($.fn.pluginName, {
// Override methods here
};