This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Jake Craige | |
" place this file in your home dir | |
" must install vundle in ~/.vim/bundle/ first. | |
" Then open up vim and type :BundleInstall | |
" and you should be good to go! | |
" Setup {{{ | |
set nocompatible | |
filetype off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function commercial_backstretch_setup() { | |
if($('.node-type-commercial-development').length > 0) { | |
var image = $('#content .field-image img').attr('src'); | |
$('body').backstretch(image); | |
var height = $(window).scrollTop() - $('#testimonial_wrapper').offset().top | |
if(height > $('#content').height()) { | |
$('#content').height(height * -1); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module StringHelpers | |
refine String do | |
def blank? | |
self.to_s.strip == "" | |
end | |
def question? | |
self.end_with? "?" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Phrase | |
def initialize(string) | |
@words = string.downcase.scan(/\w+/) | |
end | |
def word_count | |
@words.inject({}) do |results, word| | |
results.merge!({ word => 1 }) { |_, old, _| old + 1 } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Jake Craige | |
" Setup {{{ | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
set rtp+=~/Development/dotfiles/powerline/powerline/bindings/vim/ | |
call vundle#rc() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Airship | |
# name and alert key | |
SupportedDevices = { ios: "aps", android: "android" } | |
def initialize(application_key: 'application-key', | |
application_secret: 'application-secret', | |
mester_secret: 'master-secret', | |
logger: Rails.logger, | |
request_timeout: 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function watermarkIt(myArray, color) { | |
for(var i=0; i<myArray.length; i++) { | |
$(myArray[i][0]).watermark(myArray[i][1], {color: color}); | |
} | |
} | |
// How to Use | |
watermarkIt( [ | |
['#edit-submitted-full-name', 'Full Name'], | |
['#edit-submitted-email-address', 'Email Address'] ], '#000'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def autocomplete | |
render :json => autocomplete_for_column(params[:column_name]) | |
end | |
def autocomplete_for_column(column_name) | |
#zipcode and mls num doesnt work | |
valid_names = %w(agentlist_fullname officelist_officename officesell_officename schooldistrict) | |
if valid_names.include? column_name | |
Property.select(column_name).where("#{column_name} LIKE ?", "%#{params[:q]}%").uniq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def autocomplete | |
render :json => autocomplete_for_column(params[:column_name]) | |
end | |
def autocomplete_for_column(column_name) | |
#zipcode and mls num doesnt work | |
valid_names = %w(agentlist_fullname officelist_officename officesell_officename schooldistrict) | |
if valid_names.include? column_name | |
Property.select(column_name).where("#{column_name} LIKE ?", "%#{params[:q]}%").uniq |
OlderNewer