Skip to content

Instantly share code, notes, and snippets.

View trevorsheridan's full-sized avatar
💭
Building ProperForm

Trevor Sheridan trevorsheridan

💭
Building ProperForm
View GitHub Profile
@trevorsheridan
trevorsheridan / NSDate+Additions.m
Created October 3, 2012 08:53
Strips the time from a date with respect to the user's timezone
//
// NSDate+Additions.m
//
// Created by Trevor Sheridan on 10/1/12.
// Copyright (c) 2012 Trevor Sheridan Inc. All rights reserved.
//
#import "NSDate+Additions.h"
@implementation NSDate (Additions)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Rationale Creative</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="css/bootstrap-responsive.css" rel="stylesheet">
{
"ProductId" : 646,
"OrderPayments" : [
{
"Payer" : {
"FacebookId" : "689561194"
},
"IncludeTip" : true,
"PaymentMethod" : {
"Id" : 138
@trevorsheridan
trevorsheridan / cocoa-security.m
Created August 12, 2013 19:00
CocoaSecurity Base64 encoding example
#import <CocoaSecurity/CocoaSecurity.h>
- (NSString *)encodeUsername:(NSString *)username password:(NSString *)password
{
CocoaSecurityEncoder *encoder = [[CocoaSecurityEncoder alloc] init];
NSString *pair = [NSString stringWithFormat:@"%@:%@", username, password];
return [encoder base64:[pair dataUsingEncoding:NSUTF8StringEncoding]];
}