Skip to content

Instantly share code, notes, and snippets.

View mikelietz's full-sized avatar

mikelietz mikelietz

  • Columbus, Ohio
View GitHub Profile
@mikelietz
mikelietz / SampleScraper.js
Created April 11, 2017 15:02 — forked from shiondev/SampleScraper.js
SampleScraper
// This is sample code for building a web scraper.
//
// For this sample, we use
// http://www.citysearch.com/profile/10192700/lockhart_tx/black_s_barbecue.html
// as a sample listing we want to scrape.
//
// For the full crawler, we will assume the crawl
// starts from http://www.houzz.com/professionals/
var EightyApp = function() {
@mikelietz
mikelietz / gist:5509273
Last active December 16, 2015 22:48 — forked from somefool/gist:5508897
<?php
class BlahBlah extends Plugin
{
/**
* Add an author rewrite rule
* @param Array $rules Current rewrite rules
**/
// Format the date field, leaving invalid dates alone
if (strtotime($candidate->dob)) {
$candidate->dob = date("d/m/Y", strtotime($candidate->dob));
} else if (isnull($candidate->dob)) {
$candidate->dob = "MM/DD/YYYY";
}