This file contains hidden or 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
| require 'rubygems' | |
| require 'anemone' | |
| #!/usr/bin/env ruby | |
| # To use the anemone gem to crawl website make sure these are installed: | |
| # 1) Redis (>= 2.0.0) | |
| # 2) MongoDB | |
| # 3) TokyoCabinet | |
| # 4) PStore | |
| # crawl website for specific info for Hazzo marketing purposes |
This file contains hidden or 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
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| # Get a Nokogiri::HTML:Document for the page we’re interested in... | |
| url = 'http://www.groupon.com/denver/deals/next-door-lounge' | |
| doc = Nokogiri::HTML(open(url)) #do |config| | |
| doc.at_css("ul#counter li.ended").text | |
| # config.noerror |
This file contains hidden or 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
| import java.util.*; | |
| import java.util.Arrays; | |
| public class HowEasy{ | |
| public int pointVal(String problemstatement){ | |
| //problemstatement is a string containing between 1 - 50 letters, numbers, spaces or periods | |
| String[] words = problemstatement.split(" "); //seperates all words from problem statement with space as seperator | |
| int totalWords = words.length; | |
This file contains hidden or 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
| jQuery(document).ready(function() | |
| { | |
| var hideDelay = 500; | |
| var userID; | |
| var hideTimer = null; | |
| // One instance that's reused to show info for the current person | |
| var container = jQuery('<div id="personPopupContainer">' | |
| + '<table width="" border="0" cellspacing="0" cellpadding="0" align="center" class="personPopupPopup">' | |
| + '<tr>' |
This file contains hidden or 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
| # only including what I helped write below | |
| .coupon_list | |
| - array_of_coupons.each do |coupon| | |
| %div | |
| - if redeemed | |
| %span.cross_out | |
| = "#" + coupon.uid | |
| %span.green | |
| = link_to (coupon.user_redeemed ? "Mark as New" : "Mark as Used"), '#', :class => 'user_redeemed', :rel => toggle_user_redeemed_coupon_path(coupon) |
This file contains hidden or 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
| require 'httparty' | |
| class Walkscore | |
| include HTTParty | |
| attr_accessor :api_key, :property | |
| def initialize(api_key, property) | |
| self.api_key = api_key | |
| self.property = property |
This file contains hidden or 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
| ps aux|grep script/rails|grep -v grep|awk '{print $2}'|xargs kill -9 |
This file contains hidden or 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
| if current_company.has_rentals? | |
| property_ids = [] | |
| @lead.rental_saved_searches.each do |rss| | |
| if rss.rental_search.send(current_company.rental_property_type) == true | |
| @lead_details[:saved_searches][:rentals] << rss | |
| end | |
| end | |
| if current_company.rentals_lead_plan.to_sym == :one | |
| @lead.favorite_rental_properties.each do |frp| | |
| if frp.rental_property_type == current_company.rental_property_type |
This file contains hidden or 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
| SELECT `companies`.* FROM `companies` INNER JOIN `company_services` | |
| ON `company_services`.`company_id` = `companies`.`id` | |
| WHERE (company_services.id is not null) AND (active = 1 AND staging = 0 AND trulia_feed = 1); |
This file contains hidden or 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 updateMapMarkerOnShowAddressChange() { | |
| // added the if statement below | |
| if($("setting_rentals_details_map_marker_box")) { | |
| var boxRadioButton = $("setting_rentals_details_map_marker_box"); | |
| var initialMapMarkerBox = boxRadioButton.checked; | |
| } | |
| var rentAddressCheckbox = $('setting_show_rental_address'); | |
| var pinRadioButton = $("setting_rentals_details_map_marker_pin"); | |
| // added the if statement below |
OlderNewer