I hereby claim:
- I am endoze on github.
- I am endoze (https://keybase.io/endoze) on keybase.
- I have a public key whose fingerprint is C6B9 EBB1 F177 66B1 0C81 163A D11E 5E0A F722 4EE1
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
def open_link(link) | |
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/ then | |
system("start #{link}") | |
elsif RbConfig::CONFIG['host_os'] =~ /darwin/ then | |
system("open #{link}") | |
elsif RbConfig::CONFIG['host_os'] =~ /linux/ then | |
end | |
end | |
open_link('https://www.youtube.com/watch?v=kffacxfA7G4') |
# found at http://www.infinite-loop.dk/blog/2011/04/unittesting-asynchronous-network-access/ | |
- (BOOL)waitForCompletion:(NSTimeInterval)timeoutSecs { | |
NSDate *timeoutDate = [NSDate dateWithTimeIntervalSinceNow:timeoutSecs]; | |
do { | |
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:timeoutDate]; | |
if([timeoutDate timeIntervalSinceNow] < 0.0) | |
break; | |
} while (!done); |
$.ajax({ | |
dataType: 'jsonp', | |
jsonp: 'callback', | |
url: 'http://search.twitter.com/search.json?q=fwgangnamstyle', | |
success: function(obj) { | |
for (var i = 0; i <= obj['results'].length - 1; ++i) { | |
var user = obj['results'][i]['from_user']; | |
var tweet_text = obj['results'][i]['text']; | |
var html = "<li><a href=https://twitter.com/" + user + ">@" + user + "</a> said " + tweet_text + "</li>"; | |
console.log(obj['results'][i]); |
#import <UIKit/UIKit.h> | |
@interface Example : NSObject | |
- (void)performLongRunningTask:(SEL)taskMethod withCallback:(SEL)callbackMethod; | |
@end |
require 'oauth_util.rb' | |
require 'net/http' | |
o = OauthUtil.new | |
o.consumer_key = 'examplek9SGJUTUpocjZ5QjBJmQ9WVdrOVVFNHdSR2x1TkhFbWNHbzlNQS0tJnM9Y29uc3VtkZXJzZWNyZXQmeD0yYg--'; | |
o.consumer_secret = 'exampled88d4109c63e778dsadcdd5c1875814977'; | |
url = 'http://query.yahooapis.com/v1/yql?q=select%20*%20from%20social.updates.search%20where%20query%3D%22search%20terms%22&diagnostics=true'; |