Skip to content

Instantly share code, notes, and snippets.

@abronte
abronte / gist:ee88ef1a45587922ceb9
Created February 11, 2015 23:53
ruby 2.0 aws-sdk-core get_object
before :: Memory 19360KB
after :: Memory 21228KB
before :: Memory 21228KB
after :: Memory 21240KB
before :: Memory 21240KB
after :: Memory 21272KB
before :: Memory 21272KB
after :: Memory 21304KB
before :: Memory 21304KB
after :: Memory 21328KB
@abronte
abronte / gist:f8a5a237175f91404a19
Created February 11, 2015 20:08
aws-sdk-core get_object leak
before :: Memory 22064KB
after :: Memory 23860KB
before :: Memory 23860KB
after :: Memory 23884KB
before :: Memory 23884KB
after :: Memory 23896KB
before :: Memory 23896KB
after :: Memory 23924KB
before :: Memory 23924KB
after :: Memory 23940KB
+ (void)keyboard:(ForgeTask*)task {
[[NSNotificationCenter defaultCenter] addObserverForName:@"UIKeyboardCandidateCorrectionDidChangeNotification" object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) {
UIWindow *keyboardWindow = nil;
for (UIWindow *testWindow in [[UIApplication sharedApplication] windows]) {
if (![[testWindow class] isEqual:[UIWindow class]]) {
keyboardWindow = testWindow;
}
}
// Locate UIWebFormView.
colors: {
green: {bg_color: "#69B65F", stop_color: "#5F9F57", y_tick: "#63AB59", line_color: "#87C57F", dash_color: "#579241"},
red: {bg_color: "#C54B42", stop_color: "#B3453C", y_tick: "#BD4137", line_color: "#D65B51", dash_color: "#9e3c35"}
}
forge.internal.call('browser.oauth', {url: "http://stocktwits.com", matchPattern: "stocktwits.com/symbol/ibm"});
forge.internal.addEventListener('browser.gotAuthCode', function(url) {
alert("Do something with "+url);
});
+ (void)bundles:(ForgeTask*)task {
NSArray *bundles = [NSBundle allBundles];
NSEnumerator *e = [bundles objectEnumerator];
id object;
[ForgeLog i:@"Current bundles:"];
while (object = [e nextObject]) {
[ForgeLog i:[object bundleIdentifier]];
[INFO] Current bundles:
[INFO] (null)
[INFO] /Users/adam/Library/Application Support/iPhone Simulator/6.0/Applications/80EA109A-8237-47FA-97D4-51658323DE10/simulator-ios.app/ForgeCore.bundle
[INFO] file://localhost/Users/adam/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/80EA109A-8237-47FA-97D4-51658323DE10/simulator-ios.app/ForgeCore.bundle/
[INFO] io.trigger.forgee8e3d3a060e311e2acf322000a9f3c85
[INFO] /Users/adam/Library/Application Support/iPhone Simulator/6.0/Applications/80EA109A-8237-47FA-97D4-51658323DE10/simulator-ios.app
[INFO] file://localhost/Users/adam/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/80EA109A-8237-47FA-97D4-51658323DE10/simulator-ios.app/
opts = {
"schema" => {
"fields" => @your_schema
},
"destinationTable" => {
"tableId" => table,
"projectId" => @bq.project_id,
"datasetId" => @bq.dataset
},
"sourceUris" => [
require 'sinatra'
get '/' do
puts params.inspect
end
<html>
<head>
<title>Like Test</title>
</head>
<body>
<div id="fb-root"></div>
<a href="http://thefacebookdev.com/2012/12/facebook-like-button-events/">Original post</a>
<h1>Hello World</h1>
<div class="fb-like" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div>
<script>