Skip to content

Instantly share code, notes, and snippets.

default:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
ActionMailer::Base.smtp_settings = {
:address => 'smtp.sendgrid.net',
:port => '587',
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => 'heroku.com'
}
ActionMailer::Base.delivery_method = :smtp
production:
delivery_method: :smtp
smtp_settings:
address: "smtp.sendgrid.net"
port: 587
authentication: :plain
domain: "heroku.com"
user_name: <%= ENV['SENDGRID_USERNAME'] %>
password: <%= ENV['SENDGRID_PASSWORD'] %>
production:
delivery_method: :smtp
smtp_settings:
address: "smtp.sendgrid.net"
port: 587
authentication: :plain
domain: "heroku.com"
user_name: my_email@gmail.com
password: my_password
ABRecordRef ABRecordCreateCopy (ABRecordRef record)
{
ABRecordRef people[1] = {record};
CFArrayRef peopleArray = CFArrayCreate(NULL, people, 1, &kCFTypeArrayCallBacks);
CFDataRef vCardData = ABPersonCreateVCardRepresentationWithPeople(peopleArray);
ABRecordRef source = ABPersonCopySource(record);
ABRecordRef duplicatedPerson = ABPersonCreatePeopleInSourceWithVCardRepresentation(source, vCardData);
ABRecordRef returnedPerson = CFArrayGetValueAtIndex(duplicatedPerson, 0);
CFRelease(source);
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if(tableView.editing == YES){
[self performSegueWithIdentifier:@"showEditTitleView" sender:self];
}
else {
[self performSegueWithIdentifier:@"showDetailView" sender:self];
}
}
//
// NSColor+CGColor.m
//
// http://stackoverflow.com/questions/11950173/conditional-categories-in-mountain-lion
//
#import <objc/runtime.h>
static CGColorRef _NSColor_CGColor_(Class self, SEL cmd) {
const NSInteger numberOfComponents = [(id)self numberOfComponents];
if (aColor respondToSelector:@selector(CGColor)]) {
[aColor CGColor];
}
else {
[aColor CGColorFromCategory];
}
//
// NSColor+CGColor.h
//
// Created by Michael Sanders on 11/19/10.
//
#import <AppKit/AppKit.h>
@interface NSColor (CGColor)
/*
* jQuery UI Slider Access
* By: Trent Richardson [http://trentrichardson.com]
* Version 0.2
* Last Modified: 12/12/2011
*
* Copyright 2011 Trent Richardson
* Dual licensed under the MIT and GPL licenses.
* http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt