Skip to content

Instantly share code, notes, and snippets.

View samsymons's full-sized avatar

Sam Symons samsymons

View GitHub Profile
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
echo "Uninstalling Homebrew"
function abort {
echo "$1"
exit 1
}
duplicate symbol __ZN7cricket8GetUsbIdERKNS_6DeviceEPSs in:
/Users/samsymons/Code/Perch/iOS/4.0/Pods/opentok-ios-sdk-webrtc/Opentok.framework/Opentok(libjingle_media.iosdeviceinfo.o)
/Users/samsymons/Code/Perch/iOS/4.0/Pods/opentok-ios-sdk-webrtc/Opentok.framework/Opentok(libjingle_media.mobiledevicemanager.o)
ld: 2 duplicate symbols for architecture armv7
@samsymons
samsymons / commenting.rb
Last active August 29, 2015 13:56
Commenting with RedditKit
require 'redditkit'
client = RedditKit::Client.new 'username', 'password'
item_to_comment_on = 't3_1o72gp' # You can use a RedditKit::Link or RedditKit::Comment in place of the full name here.
client.submit_comment item_to_comment_on, 'Hello world!'
NSDictionary *properties = @{NSHTTPCookieName: @"cookie_name", NSHTTPCookieDomain: @"example.com", NSHTTPCookiePath: @"/", NSHTTPCookieValue: @"12345"};
NSHTTPCookie *sessionCookie = [NSHTTPCookie cookieWithProperties:properties];
// Set up a custom cookie storage object:
NSHTTPCookieStorage *customStorage = [[NSHTTPCookieStorage alloc] init];
[customStorage setCookie:sessionCookie];
NSLog(@"Custom cookies: %@", customStorage.cookies); // Returns nil