Skip to content

Instantly share code, notes, and snippets.

View paulgureghian's full-sized avatar
😊
Available for Hire / Looking for New Opportunities.

Paul Armen Gureghian paulgureghian

😊
Available for Hire / Looking for New Opportunities.
View GitHub Profile
@paulgureghian
paulgureghian / watson-sense-hat.js
Created August 23, 2017 17:23 — forked from gopal-amlekar/watson-sense-hat.js
Short code to interpret commands and parse it to sense hat
// screen on command to turn on the entire display to Red. Otherwise it stays green.
// Extend the function to interpret more commands as required.
// Sense hat commands are described in the info for sense hat node.
if (msg.payload === 'screen on'){
msg.payload = '*,*,red';
}
else{
msg.payload = '*,*,green';
}
@paulgureghian
paulgureghian / LocalBroadcastExampleActivity.java
Created June 28, 2016 00:42 — forked from Antarix/LocalBroadcastExampleActivity.java
Simple Example of using LocalBroadcastManager in Android
import android.app.Activity;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.IBinder;
import android.support.v4.content.LocalBroadcastManager;