Skip to content

Instantly share code, notes, and snippets.

View patpohler's full-sized avatar

Patrick Pohler patpohler

View GitHub Profile
@patpohler
patpohler / Big List of Real Estate APIs.md
Last active December 21, 2024 00:36
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

@patpohler
patpohler / build.sh
Last active August 29, 2015 14:14
build.sh
#!/bin/sh
zip -r zips/pdf_press_5site.zip LICENSE-5-SITES.txt README.md docs system themes --exclude=*.DS_Store*
zip -r zips/pdf_press_.zip LICENSE.txt README.md docs system themes --exclude=*.DS_Store*
@patpohler
patpohler / gist:90eb13022c99887c25e7
Created January 20, 2015 04:06
rets_rabbit_search.html
{exp:rets_rabbit:search results_path="search/results"}
<p>Please search for MLS # or Address. Using both may not yield any results.</p>
<label for="rets:MLSNumber">Search by MLS number</label> <input type="text" id="rets:MLSNumber" class="mls" name="rets:MLSNumber"><br>
<label for="rets:City">City</label> <input type="text" id="rets:City" class="address" name="rets:City"><br>
<label for="rets:ListPrice">Price $</label>
<select name="rets:ListPrice">
<option value="" selected="selected">Any</option>
<option value="100000-">Less than $100,000</option>
<option value="100000-150000">$100,000 - $150,000</option>
<option value="150000-200000">$150,000 - $2000,000</option>
@patpohler
patpohler / post_child.php
Created August 3, 2014 21:01
Model class inheriting from Base_model class. See Medium article for details:
<?php if(!defined('EXT')) exit("Invalid file request");
/**
* Post Model Class
*
* @package ci_model_example
* @author Patrick Pohler ppohler@anecka.com
* @copyright Copyright (c) 2014, Patrick Pohler
* @link http://www.anecka.com/rets_press
* @license MIT
<?php if(!defined('EXT')) exit("Invalid file request");
/**
* Base Model Class
*
* @package ci_example
* @author Patrick Pohler ppohler@anecka.com
* @copyright Copyright (c) 2014, Patrick Pohler
* @link http://www.anecka.com/rets_press
* @license MIT
<?php if(!defined('EXT')) exit("Invalid file request");
/**
* Post Model Class
*
* @package ci_model_example
* @author Patrick Pohler ppohler@anecka.com
* @copyright Copyright (c) 2014, Patrick Pohler
* @link http://www.anecka.com/rets_press
* @license MIT
@patpohler
patpohler / gist:7885310
Created December 10, 2013 03:27
Block bad traffic
#Block hotlinking
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mydomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|css)$ - [NC,F,L]
#Block comment spammers, bad bots and some proxies
RewriteCond %{REMOTE_HOST} 24.117.121.113 [OR]
RewriteCond %{REMOTE_HOST} ^211.138.198.* [OR]
RewriteCond %{REMOTE_HOST} 216.246.60.183 [OR]
RewriteCond %{REMOTE_HOST} 203.94.229.227 [OR]
@patpohler
patpohler / gist:2552751
Created April 29, 2012 19:07
HACK! Modification to mod.search.php to support "category='not ...'" in ExpressionEngine's advance search (start at line 1014). USE AT YOUR OWN RISK!
/** ----------------------------------------------
/** Limit query to a specific category
/** ----------------------------------------------*/
// Check for different sets of category IDs, checking the parameters
// first, then the $_POST
$exclude_cat = false;
if (isset($this->_meta['category']) AND $this->_meta['category'] != '' AND ! is_array($this->_meta['category']))
{
@patpohler
patpohler / form_template.html
Created March 21, 2012 14:46
Use ajaxSubmit to post to more than one channel in ExpressionEngine (EECMS) with Safecracker
<!-- first form -->
{exp:safecracker id="form1" json="yes" channel="channel1" include_jquery="no"
return="safecracker/ENTRY_ID"
safecracker_head="no"}
Title: <input type="text" name="title" value="{title}" />
{/exp:safecracker}
<!-- second form -->