Skip to content

Instantly share code, notes, and snippets.

- (id) initWithDefaultLocationName: (NSString *) defaultLocationName defaultLatitude: (double) defaultLatitude defaultLongitude: (double) defaultLongitude preactivation: (BOOL) preactivation viewedPromotions: (NSArray *) viewedPromotions incomingEmailAddress: (NSString *) incomingEmailAddress recentMailedAddresses: (NSArray *) recentMailedAddresses comments: (NSString *) comments dateAgreedToTermsOfService: (EDAMTimestamp) dateAgreedToTermsOfService maxReferrals: (int32_t) maxReferrals referralCount: (int32_t) referralCount refererCode: (NSString *) refererCode sentEmailDate: (EDAMTimestamp) sentEmailDate sentEmailCount: (int32_t) sentEmailCount dailyEmailLimit: (int32_t) dailyEmailLimit emailOptOutDate: (EDAMTimestamp) emailOptOutDate partnerEmailOptInDate: (EDAMTimestamp) partnerEmailOptInDate preferredLanguage: (NSString *) preferredLanguage preferredCountry: (NSString *) preferredCountry clipFullPage: (BOOL) clipFullPage twitterUserName: (NSString *) twitterUserName twitterId: (NSString *) twitterId group
@emcmanus
emcmanus / hack.sh
Created April 5, 2012 01:29 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@emcmanus
emcmanus / RKObjectManager+Blocks.h
Created April 14, 2012 02:22
Block-based API Wrapper for Restkit (Requires A2DynamicDelegate)
//
// RKObjectManager+Blocks.h
//
// Created by Ed McManus for Yardsale Inc. on 3/27/12
// Learn more at https://getyardsale.com
//
// Requires A2DynamicDelegate https://github.com/pandamonia/A2DynamicDelegate
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@emcmanus
emcmanus / Chainable.rb
Created May 13, 2012 17:42
Simple paperclip processor that allows you to chain image styles.
#
# Chainable.rb
#
# Allows you to chain Paperclip styles.
# Created by Ed McManus for Yardsale Inc. on 5/12/2012
#
#
# *********************************************************************
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@emcmanus
emcmanus / gist:2894558
Created June 8, 2012 08:50
Git Status in FishFish Prompt - Fish port of __git_ps1
# Port of __git_ps1 for Fish shell (tested with FishFish)
#--------------------------------------------------------------------------------------------------
# https://github.com/bjeanes/dot-files/tree/294254ce2f064bbfc586e98107da1ed510898ffd/fish/functions
# via @bjeanes - https://github.com/bjeanes
function __git_ps1
set -l g (git rev-parse --git-dir ^/dev/null)
if [ -n "$g" ]
set -l r ""
set -l b ""
@emcmanus
emcmanus / PFObject+YSComparison.h
Last active December 12, 2015 01:59
Objective-C isEqual implementation for Parse objects (PFObject, PFFile, and PFRelation)
//
// PFObject+YSComparison.h
//
// Created by Ed McManus for Yardsale Inc. on 2/1/13
// Learn more at https://getyardsale.com
//
// Requires BlocksKit https://github.com/pandamonia/BlocksKit
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@emcmanus
emcmanus / gist:5630504
Created May 22, 2013 20:08
Clean whitespace from objective-c source.
find . -name "*.[hm]" -type f -print0 | xargs -0 sed -i '' -E "s/[[:space:]]*\$//"
@emcmanus
emcmanus / gist:6065901
Created July 23, 2013 20:31
Parse.Promise Edge Cases
try
Parse.Promise.as().then( ->
Parse.Promise.as 1, 2, 3
).then((a, b, c) ->
# a, b, and c all have values
console.error "1. a: #{a}, b: #{b}, c: #{c}"
)
# Can we transform Parse.Promise.error into a success?
Parse.Promise.error().then( null, (error) ->
@emcmanus
emcmanus / NSDate+TimeAgoInWords.swift
Created October 3, 2014 22:00
A Swift port of Rails' time_ago_in_words.
//
// NSDate+TimeAgoInWords.swift
//
// A Swift port of Rails' time_ago_in_words.
// Created by Ed McManus for Yardsale on 9/30/14.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
@emcmanus
emcmanus / snakeToCamelCase.js
Last active May 17, 2022 02:29 — forked from felixjung/snakeToCamelCase.js
ES6 module to recursively convert snake case keys in an object to camel case using lodash.
'use strict';
/**
* @example
* import keysToCamelCase from './snakeToCamelCase';
* keysToCamelCase({bad_key: 1}); => {badKey: 1}
* keysToCamelCase([{bad_key: 1}]); => [{badKey: 1}]
*/
function keysToCamelCase(object) {