Skip to content

Instantly share code, notes, and snippets.

View bmulholland's full-sized avatar

Brendan Mulholland bmulholland

View GitHub Profile
@bmulholland
bmulholland / python_webdriver_addcookie_debug.py
Created June 18, 2012 22:20
Python Webdriver add_cookie Requires Secure=False
========================================================================================= test session starts =========================================================================================
platform darwin -- Python 2.7.1 -- pytest-2.2.3 -- /usr/bin/python
collected 4 items
scripts/checkout_test.py:58: CheckoutTest.test_add_product
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /.../modules/pages/account/login_page.py(130)login()
-> self.driver.add_cookie({"name": "session", "value": sessionid, "path": "/", "secure": False})
(Pdb) c
// NOTE: This is all inherited code and I'd like to change as little as possible right now
// Parent class info
@interface OptionViewController : UITableViewController
// This is called when the right bar button is touched
- (void)nextStep
{
OptionPage* nextStep = [self nextOptionPage];
AppDelegate* appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@bmulholland
bmulholland / gist:3941325
Created October 23, 2012 20:28
iOS6 Keyboard Weirdness
// AppDelegate.m
//
// AppDelegate.m
// Test
//
// Created by Brendan Mulholland on 2012-10-23.
// Copyright (c) 2012 Brendan Mulholland. All rights reserved.
//
//
// ViewController.m
// Test
//
// Created by Brendan Mulholland on 2012-10-23.
// Copyright (c) 2012 Brendan Mulholland. All rights reserved.
//
#import "ViewController.h"
#import "AppDelegate.h"
//
// AppDelegate.m
// Test
//
// Created by Brendan Mulholland on 2012-10-23.
// Copyright (c) 2012 Brendan Mulholland. All rights reserved.
//
#import "AppDelegate.h"
//
// ViewController.m
// Test
//
// Created by Brendan Mulholland on 2012-10-23.
// Copyright (c) 2012 Brendan Mulholland. All rights reserved.
//
#import "ViewController.h"
#import "AppDelegate.h"
//
// ViewController.m
// Test
//
// Created by Brendan Mulholland on 2012-10-23.
// Copyright (c) 2012 Brendan Mulholland. All rights reserved.
//
#import "ViewController.h"
#import "AppDelegate.h"
//
// ViewController.m
// Test
//
// Created by Brendan Mulholland on 2012-10-23.
// Copyright (c) 2012 Brendan Mulholland. All rights reserved.
//
#import "ViewController.h"
#import "AppDelegate.h"
//
// ViewController.m
// Test
//
// Created by Brendan Mulholland on 2012-10-23.
// Copyright (c) 2012 Brendan Mulholland. All rights reserved.
//
#import "ViewController.h"
#import "AppDelegate.h"
@bmulholland
bmulholland / gist:1c28662f5f8f42242744
Created March 13, 2015 00:09
undefined method [] for nil:nilclass
# class 1
class Filter < ActiveRecord::Base
has_many :filter_texts, class_name: "Filter::Text"
def initialize
self.filter_texts
end
end
# class 2