Skip to content

Instantly share code, notes, and snippets.

View daryllxd's full-sized avatar

Daryll Santos daryllxd

View GitHub Profile
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
def generate_tokens(code)
data = {
client_id: client_id,
client_secret: client_secret,
redirect_uri: callback_url,
code: code
}
response = connection.post do |request|
request.url '/login/oauth/access_token'
class Proxy
attr_accessor :messages
def initialize(target_object)
@object = target_object
@messages = []
end
def method_missing(method_name, *args, &block)
@messages.push method_name
@object.send(method_name, *args, &block)
end