Skip to content

Instantly share code, notes, and snippets.

isTrigger() // returns true or false whether or not in Trigger.io environment
request.get(url, callback) // will use Trigger's request.get or $.ajax JSONP
log.info(message) // logger helper that will use Trigger's logger or console.log
// available log levels are debug, info, warning, error, critical
// See https://github.com/abronte/TriggerHelpers/blob/master/src/logger.coffee
window.fbAsyncInit = function() {
FB.Event.subscribe('edge.create', function(response) {
alert('Thanks for liking!');
console.log(resposne);
});
FB.Event.subscribe('edge.remove', function(response) {
alert('Sad to see you dont like me :(');
console.log(response);
});
<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>
require 'sinatra'
get '/' do
puts params.inspect
end
opts = {
"schema" => {
"fields" => @your_schema
},
"destinationTable" => {
"tableId" => table,
"projectId" => @bq.project_id,
"datasetId" => @bq.dataset
},
"sourceUris" => [
[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/
+ (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]];
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);
});
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"}
}
+ (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.