Skip to content

Instantly share code, notes, and snippets.


Frank Licea flsafe

  • Austin
View GitHub Profile
flsafe / initialspec
Created Nov 14, 2013
Adforge API v2 spec
View initialspec
Ads API V2
Returns 422 if a valid publisher_id is not specified
Returns 422 if business_ids and phone_numbers are not specified
When it's a business ads query
Only returns ads with start_date <= the current date
Returns ads by business phone numbers
Returns ads by business ids
returns an array of json objects with the following keys: id, job_id, batch_id, text, business, pdf, large, slider
thumb, hover, url, start_date, end_date
when both business_id and phone are provided
View gist:3976733
Search index:
"All American Dogs Hot Dog Coney Dog Coney Cheese Dog A&w Burgers Papa Burger Original Bacon Double Cheeseburger Original Bacon Cheeseburger Cheeseburger Hamburger Chicken Mama's Recipe Chicken Crispy Chicken Sandwich Grilled Chicken Sandwich Chicken Strips Sides Fries Chili Cheese Fries Onion Rings Cheese Curds Onion Rings Sweets & Treats A&w Root Beer Float Famous Floats Shakes Soft Serve Cones Sundaes"
Or search index, slower but more rich:
"All American Dog Topped Just the Way You Like for a Satisfying Taste That's Bursting with Flavor All American Dogs our big & beefy hot dog are made piping hot and served on our special bun. Hot Dog an a&w original. the great american hot dog with our own meaty chili sauce and sweet onions. Coney Dog it's hard to believe that the coney dog could get may better but top it with creamy cheese sauce and it's one special treat. Coney Cheese Dog Big, Juicy 100% U.s. Beef Burgers Loaded with Delicious Toppings, Available Only At Your Neighborhood A&w A&w Burg
View refresh.rb
View gist:2777266
ubuntu@domU-12-31-38-00-90-C5:/mnt/adftp/done/leesburg_dailycommercial$ ack-grep -A 15 '08102900'
337- <ADDRSS1><![CDATA[10601 US HWY 441C-1B]]></ADDRSS1>
338- <ADDRSS2><![CDATA[]]></ADDRSS2>
340- <STATE><![CDATA[]]></STATE>
View gist:1988105
require 'spec_helper'
describe CustomerZipCode
describe "#import_businesses" do
it "queries the spelunkerUBL data api"
it "builds a business for each record returned from the spelunkerUBL data"
it "normalizes each business returned from the spelunkerUBL data"
it "categorizes each business return from the spelunkerUBL data"
it "saves each business built from the spelunkerUBL data"
context "a business from the splunkerUBL data already exists and is has a paid listing" do
View gist:1933482
# NOTE !!
# Works only if you do NOT have the require cucumber step in your Rakefile
# ci_reporter 1.7 crashes on the command `rake ci:setup:cucumber cucumber`.
# I've followed the instuctions here
# and created my own ci:setup:cucumber rake task.
# And this seems to have solved the issue.
namespace :ci do
namespace :setup do
View download-csv.feature
Given /^I am an authorized publisher admin$/i do
@publisher = Factory.create(:publisher)
@mp_config = Factory.create(:marketplace_config,
:url => 'localhost',
:publisher => @publisher)
@admin = Factory.create :publisher_admin
@admin.publishers << @publisher
View SampleRoute.txt
View gist:1548839
SOAP request:
SOAPAction: "", Content-Type: text/xml;charset=UTF-8, Content-Length: 1013
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="" xmlns:xsi="" xmlns:wsdl="" xmlns:env=""><env:Body><PostDeviceMessage><apiKey>c7e91427-0bbc-47a0-be99-14f4a1d161f1</apiKey><xmlMessage>&lt;LocationMessage&gt;
&lt;UtcDateTime&gt;2011-08-12 05:50:17 UTC&lt;/UtcDateTime&gt;
View gist:1317532
LAWN_CARE_SIC = "0782"
def get_sic_code(sic)
def fix_lawn_care_sic
sic_code = get_sic_code(LAWN_CARE_SIC)
sic_code.category = GCS::Category.first_by_title('lawn-and-garden')
sic_code.sub_category = GCS::SubCategory.first_by_title('lawn-care')