Skip to content

Instantly share code, notes, and snippets.

@eshea
eshea / gist:9913049
Last active August 29, 2015 13:57
DSG Locker API
@eshea
eshea / gist:9763284
Created March 25, 2014 14:45
DSG Product API

The DSG Product API returns only products and skus that are marked as active "A" in the product feed. To override this behavior all APIs support sending an "unfiltered=true" parameter that will return all results.

Search

  • Search by PID(s) Supports the JSONP callback parameter
http://api.dsg.com/api/v1/products/search?pids=<pid1,pid2,pid3>
@eshea
eshea / gist:3137267
Created July 18, 2012 16:21
Client iOS Map Center
if (supportsMaps_)
{
BOOL initialized = NO;
CLLocationDegrees minLat = -1000.0f;
CLLocationDegrees maxLat = 1000.0f;
CLLocationDegrees minLong = -1000.0f;
CLLocationDegrees maxLong = 1000.0f;
// We support maps, loop over houses to find the region to fit
for (Household *household in [self households])
@eshea
eshea / dashboards.rb
Created July 8, 2012 22:39 — forked from webmat/dashboards.rb
First draft of an active_admin-based view for Delayed::Job
ActiveAdmin::Dashboards.build do
# Add this section in your dashboard...
section "Background Jobs" do
now = Time.now.getgm
ul do
li do
jobs = Delayed::Job.where('failed_at is not null').count(:id)
link_to "#{jobs} failing jobs", admin_jobs_path(q: {failed_at_is_not_null: true}), style: 'color: red'
end
@eshea
eshea / BuildUniversalLibrary.sh
Created June 26, 2012 20:37 — forked from cspickert/BuildUniversalLibrary.sh
Build fat static library (device + simulator) using Xcode and SDK 4+
#!/bin/sh
# Version 2.0 (updated for Xcode 4, with some fixes)
# Changes:
#    - Works with xcode 4, even when running xcode 3 projects (Workarounds for apple bugs)
#    - Faster / better: only runs lipo once, instead of once per recursion
#    - Added some debugging statemetns that can be switched on/off by changing the DEBUG_THIS_SCRIPT variable to "true"
#    - Fixed some typos
#
# Purpose: