Skip to content

Instantly share code, notes, and snippets.

View woakas's full-sized avatar

Gustavo Andrés Angulo woakas

View GitHub Profile
import hmac
import hashlib
import base64
key = "AWS_SECRET_KEY"
version = '\x02'
message = "SendRawEmail"
h = hmac.new(key, message, digestmod=hashlib.sha256)
p = base64.b64encode("{0}{1}".format(version, h.digest()))
@woakas
woakas / rn131.md
Last active March 7, 2016 23:12
Send data with the RN131

Send data to Ubidots using RN131

Communicate with the RN131 module through the serial port. Plug your device to your computer and open a serial terminal.

The speed must be 9,600 bauds, then enter the following commands in the serial terminal. You should type the string “$$$” before each set of commands to enter the command mode:

Command set #1:

var mraa = require('mraa');
var ubidots = require('ubidots');
var analogPin0 = new mraa.Aio(0); //setup access analog input Analog pin #0 (A0)
var client = ubidots.createClient('APIKEY');
client.auth(function() {  
var v = this.getVariable('VARIABLE_ID');  
setInterval(function() {    
@woakas
woakas / keybase.md
Last active January 12, 2016 22:25
Keybase config

Keybase proof

I hereby claim:

  • I am woakas on github.
  • I am woakas (https://keybase.io/woakas) on keybase.
  • I have a public key whose fingerprint is 1AC0 2299 9EE1 7E7B 3014 7093 F3D5 4036 886C DCFC

To claim this, I am signing this object: