Skip to content

Instantly share code, notes, and snippets.

View jlee42's full-sized avatar

Jeffrey Lee jlee42

View GitHub Profile
@jlee42
jlee42 / development_json.txt
Last active December 20, 2015 18:18
Rabl response
{"id":311,"name":"Sample Name"}
@jlee42
jlee42 / jasmine-20120424
Last active December 16, 2015 14:59
Jasmine: Can't find variable: jQuery
Running "jasmine" task
Testing jasmine specs via phantom
ReferenceError: Can't find variable: jQuery
CarrierWave.configure do |config|
config.fog_public = false
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'}
config.cache_dir = "#{Rails.root}/tmp/uploads"
if Rails.env.test? # Use local file system
config.enable_processing = false
config.storage = :file
else # Use Rackspace cloud files
config.storage = :fog
{
id: 1,
name: "Bullets Sports Bar",
description: "",
alias_list: [ ],
tag_list: [ ],
created_at: "2013-01-28T11:03:25-06:00",
updated_at: "2013-01-29T11:21:10-06:00",
active: true,
addresses: [
curl -H "Content-Type: application/json" -X PUT -d '{"location":{"name":"Bullets Sports Bar","addresses_attributes":[{"address_line_1":"2441 A.P. Tureaud St.", "city":"New Orleans", "postal_code":"70119", "longitude":"29.9815565", "latitude":"-90.067299", "country_code":"USA"},{"address_line_1":"123 Main Street", "city":"New Orleans", "postal_code":"70119", "longitude":"29.9815565", "latitude":"-90.067299", "country_code":"USA"}]}}' https://valentinocdx.com/api/v1/json/AUTHENTICATION_TOKEN/locations/create_or_update
if([attendanceIdentifierData length] > 0) {
NSString *activityTypeID = [[NSUserDefaults standardUserDefaults]
valueForKey:@"activity_type_id"];
NSString *deviceUUID = [[NSUserDefaults standardUserDefaults]
valueForKey:@"application_uuid"];
NSDictionary* params = [NSDictionary dictionaryWithObjectsAndKeys:
attendanceIdentifierData, @"attendance_identifier", nil];
NSString *authenticationToken = [[NSUserDefaults standardUserDefaults]
valueForKey:@"authentication_token"];
NSString *postPath = [NSString stringWithFormat:@"/api/v2/json/%@/activity_types/%@/activities/create_or_update/%@", authenticationToken, activityTypeID, deviceUUID];
#import "TTConstants.h"
#import "TTActivitiesViewController.h"
#import "TTDetailViewController.h"
#import "TTSignInCell.h"
#import "TTActivity.h"
#import "TTUser.h"
#import "TTActivityType.h"
#import "TTCustomer.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "TTConstants.h"
#import "TTActivitiesViewController.h"
#import "TTDetailViewController.h"
#import "TTSignInCell.h"
#import "TTActivity.h"
#import "TTUser.h"
#import "TTActivityType.h"
#import "TTCustomer.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "TTActivityTypesViewController.h"
#import "TTConstants.h"
#import "TTActivityType.h"
#import "TTCustomer.h"
static void TTShowAlertWithError(NSError *error)
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:[error localizedDescription]
NSEntityDescription *activityTypeEntity = [NSEntityDescription entityForName:@"ActivityType" inManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext];
NSRelationshipDescription *customerRelationship = [activityTypeEntity relationshipsByName][@"customer"];
RKConnectionDescription *connection = [[RKConnectionDescription alloc] initWithRelationship:customerRelationship attributes:@{ @"customerID": @"customerID" }];
[activityTypeMapping addConnection:connection];