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
**/
@mikelietz
mikelietz / generator.php
Created June 7, 2012 15:15
filename:linenumber locale generator for Habari
<?php
$infile = "habari.pot";
$outfile = "habari.po";
$in = fopen( $infile, "r" );
$out = fopen( $outfile, "w" );
$buffer = "";
@mikelietz
mikelietz / dabblet.css
Created May 29, 2012 05:04
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@mikelietz
mikelietz / dabblet.css
Created April 9, 2012 04:30
CloudSpokes HTML
/**
* CloudSpokes HTML
* http://dabblet.com/gist/2313854
*/
* { font-family: helvetica,verdana,arial,sans;}
body {
width: 1024px;
margin: 0 auto;
@mikelietz
mikelietz / dabblet.css
Created April 5, 2012 20:29
CloudSpokes HTML
/**
* CloudSpokes HTML
* http://dabblet.com/gist/2313854
*/
* { font-family: helvetica,verdana,arial,sans;}
header {
width: 1000px;
margin-bottom: 20px;
// 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";
}
var NerdieInterface = require('nerdie_interface.js')
, nerdie = null
, prefix = null
, config = null;
function Jira_Issue(parentNerdie) {
config = (parentNerdie.config.plugins.jira_issue) ? parentNerdie.config.plugins.jira_issue : {};
this.pluginInterface = new NerdieInterface(parentNerdie, this);
nerdie = parentNerdie;
}
#!/usr/bin/env python
import argparse
from ConfigParser import ConfigParser
import os.path
import urllib2
import json
import sys
import base64
def main():
@test_connection @unit_db @cluster_db @cluster_unit_db @item_db
Scenario: Visit page to create new unit # ./builder/unit_create.feature:14
Given there is one cluster named "Cluster 1" # step_definitions/webrat_steps.rb:70
And there is one item in the mongo items collection with the uid "pat-r-c-02-01" and the stem "Amy does not like" # step_definitions/webrat_steps.rb:91
And there is one item in the mongo items collection with the uid "pat-r-c-02-03" and the stem "Who likes chicken legs?" # step_definitions/webrat_steps.rb:91
When I am on the new unit page # step_definitions/webrat_steps.rb:16
Then I should see "Add New Unit" # step_definitions/webrat_s