Skip to content

Instantly share code, notes, and snippets.

def latitude
token = 'latisquare.kenneth.io'
secret = ''
consumer = OAuth::Consumer.new(token,secret, {
:site => "https://www.google.com",
:scheme => :header,
:http_method => :post,
:request_token_path => "/accounts/OAuthGetRequestToken",
require 'rubygems'
require 'sinatra'
require 'oauth2'
require 'json'
def new_client
OAuth2::Client.new('CLIENT ID', 'CLIENT SECRET', :site => 'https://github.com',
:authorize_path => '/login/oauth/authorize', :access_token_path => '/login/oauth/access_token')
end
html {
}
.image-block {
vertical-align: top;
margin: 0px;
}
html {
}
.image-block {
vertical-align: top;
margin: 0px;
html {
}
.image-block {
vertical-align: top;
margin: 0px;
html {
}
.image-block {
vertical-align: top;
margin: 0px;
html {
}
.image-block {
vertical-align: top;
margin: 0px;
html {
}
.image-block {
vertical-align: top;
margin: 0px;
@auchenberg
auchenberg / gist:3076540
Created July 9, 2012 13:22
Podio global search
# encoding: UTF-8
require 'podio'
Podio.client = Podio::Client.new({:api_key => 'app key', :api_secret => 'app secret'})
Podio.client.authenticate_with_credentials('user email', 'user password')
results = Podio::Search.globally('70-cd-60-f8-41-a2')
results_item = Podio::Search.globall('auchenberg')
@auchenberg
auchenberg / gist:3081969
Created July 10, 2012 08:11
Podio.js search example
// Initialize and specify client id and secret
var Podio = require('podiojs');
var podio = new Podio();
podio.client.client_id = 'sample';
podio.client.client_secret = 'gCb4aq1RAWvPgHqxTwiDtvNGa59S7i5FvGHFZeq4rnr9YUxHVqwdpz91SJlwsppH';
podio.on('error', function(request, response, body) {
console.log('There was a problem with a request to ' + request.path+'. Error was "'+body.error_description+'" ('+body.error+')');
});