Skip to content

Instantly share code, notes, and snippets.

View mbcharbonneau's full-sized avatar

Marc Charbonneau mbcharbonneau

View GitHub Profile
*.pbxproj -crlf -diff -merge
- (void)move;
{
if ( self.feeding || self.prey == nil )
return;
// Add new velocity towards prey.
double x = ( self.prey.position.x - self.position.x ) / PREDATOR_VECTOR_FRACTION;
double y = ( self.prey.position.y - self.position.y ) / PREDATOR_VECTOR_FRACTION;
curl -i -H "Accept: text/javascript" \
-F "postcard[recipients_attributes][0][email]=test@gmail.com" \
-F "postcard[recipients_attributes][0][first_name]=first" \
-F "postcard[recipients_attributes][0][last_name]=last" \
-F "postcard[recipients_attributes][1][email]=test2@gmail.com" \
-F "postcard[recipients_attributes][1][first_name]=first" \
-F "postcard[recipients_attributes][1][last_name]=last" \
-F "postcard[recipients_attributes][1][address_1]=No 1" \
-F "postcard[recipients_attributes][1][city]=Singapore" \
-F "postcard[recipients_attributes][1][country]=Singapore" \
- (void)buildMultipartFormDataPostBody
{
#if DEBUG_FORM_DATA_REQUEST
[self addToDebugBody:@"\r\n==== Building a multipart/form-data body ====\r\n"];
#endif
NSString *charset = (NSString *)CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding([self stringEncoding]));
// Set your own boundary string only if really obsessive. We don't bother to check if post data contains the boundary, since it's pretty unlikely that it does.
NSString *stringBoundary = @"0xKhTmLbOuNdArY";
@mbcharbonneau
mbcharbonneau / ELCCameraOverlayView.h
Created August 23, 2011 20:19
ELCCameraOverlayView
//
// ELCCameraOverlayView.h
// ELC Technologies
//
// Created by Marc Charbonneau on 8/19/11.
// Copyright 2011 ELC Technologies. All rights reserved.
//
#import <UIKit/UIKit.h>
2011-11-08T22:47:51+00:00 heroku[web.1]: State changed from crashed to created
2011-11-08T22:47:51+00:00 heroku[web.1]: State changed from created to starting
2011-11-08T22:47:58+00:00 heroku[web.1]: Starting process with command `thin -p 26498 -e production -R /home/heroku_rack/heroku.ru start`
2011-11-08T22:48:06+00:00 app[web.1]: /app/.bundle/gems/ruby/1.9.1/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:611:in `to_constant_name': Anonymous modules have no name to be referenced by (ArgumentError)
2011-11-08T22:48:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:417:in `qualified_name_for'
2011-11-08T22:48:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:130:in `rescue in const_missing'
2011-11-08T22:48:06+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:120:in `const_missing'
2011-11-08T22:48:06
Two Maasive Accounts:
YouthNet
Hailey
prefix file:
#if kDemographic == 1
// At-risk youth
#define kMaaSiveAppID @"cea2e822c30d19f2b217"
<__NSArrayM 0x1493b2a0>(
<NSHTTPCookie version:0 name:"GPS" value:"1" expiresDate:2014-03-07 01:13:27 +0000 created:2014-03-07 00:43:28 +0000 (4.15846e+08) sessionOnly:FALSE domain:".youtube.com" path:"/" isSecure:FALSE>,
<NSHTTPCookie version:0 name:"PREF" value:"fms2=10000&fms1=10000&fv=0.0.0" expiresDate:2016-02-27 21:56:11 +0000 created:2014-02-27 21:56:11 +0000 (4.15231e+08) sessionOnly:FALSE domain:".youtube.com" path:"/" isSecure:FALSE>,
<NSHTTPCookie version:0 name:"VISITOR_INFO1_LIVE" value:"FuywEehSdWA" expiresDate:2014-10-28 13:14:52 +0000 created:2014-02-27 01:21:53 +0000 (4.15157e+08) sessionOnly:FALSE domain:".youtube.com" path:"/" isSecure:FALSE>,
<NSHTTPCookie version:0 name:"PREF" value:"" expiresDate:1970-01-01 00:00:00 +0000 created:2014-03-05 22:56:34 +0000 (4.15753e+08) sessionOnly:FALSE domain:"s2.youtube.com" path:"/" isSecure:FALSE>,
<NSHTTPCookie version:0 name:"rack.session" value:"72b9bdfd88b535dbc6fce0456c88bd8d6197651f3c8c11d75f9e945a8cc05e0d" expiresDate:2016-03-06 01:24:44 +0000
- (void)viewDidLoad;
{
[super viewDidLoad];
self.shareButton = ({
CGRect frame = CGRectMake( self.view.width - 80.0f, self.view.bottom - 44.0f, 70.0f, 44.0f );
UIButton *button = [[UIButton alloc] initWithFrame:frame];
[button setImage:[UIImage imageNamed:@"share-button-red.png"] forState:UIControlStateNormal];
- (BOOL)isEqual:(id)object;
{
if ( object == self ) {
return YES;
}
if ( object == nil || ![object isKindOfClass:[self class]] ) {
return NO;
}