Skip to content

Instantly share code, notes, and snippets.

@KarthiPnsmy
KarthiPnsmy / rfid_reader_octoblu.ino
Created August 25, 2015 07:43
RFID Reader + Octoblu
#include <Bridge.h>
#include <YunClient.h>
#include <SoftwareSerial.h>
//static const char uuid[] = "ef462118-69f4-4ed9-ba12-20ce4f8ee8f9";
//static const char token[] = "6631d217cfc81157752dfc151820bb04debaab20";
static const char uuid[] = "b04c9213-79db-44a4-a3bf-3838e9df3274";
static const char token[] = "4cc7e83ec5003e657e6234a5b1cb78ad5bb91035";
{
"node": "130694f0-2f91-11e5-871a-65da57e1c56b",
"name": "Debug",
"msgType": "input",
"msg": {
"devices": "*",
"topic": "device-status",
"payload": {
"online": false
},
#include <Bridge.h>
#include <YunClient.h>
#include "tentacle-build.h"
#include <SoftwareSerial.h>
#define server "tentacle.octoblu.com"
#define port 80
@KarthiPnsmy
KarthiPnsmy / app.js
Created October 18, 2013 17:18
listing
var win = Ti.UI.createWindow({
backgroundColor : "#ccc"
});
var jsonData = {
"restaurants" : [{
"id" : 1,
"title" : "Patel Brother",
"image_url" : "appicon.png",
"address" : "8800 Sawmil road, Texas",
@KarthiPnsmy
KarthiPnsmy / tiStudio_log.log
Created May 10, 2013 05:20
tiStudio_log.log
This file has been truncated, but you can view the full file.
!SESSION 2012-11-09 09:36:16.563 -----------------------------------------------
eclipse.buildId=2.1.2.201208301612
java.version=1.6.0_29
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_US
Framework arguments: -keyring /Users/admin/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86 -keyring /Users/admin/.eclipse_keyring -consoleLog -showlocation
This is a continuation of log file /Users/admin/Documents/Titanium Studio Workspace/.metadata/.bak_1.log
Created Time: 2012-11-09 17:49:26.407
@KarthiPnsmy
KarthiPnsmy / app.js
Created February 27, 2013 16:18
keyboard bounce issue
var platform = Ti.Platform.osname;
var winObj = {
height: Ti.UI.FILL,
width: Ti.UI.FILL,
navBarHidden : true,
exitOnClose : false
};
if(platform == "android"){
@KarthiPnsmy
KarthiPnsmy / ACS Social-Integrations-Part-2.js
Created September 23, 2012 08:04
ACS Social Integrations Part 2
Titanium.Facebook.addEventListener('login', function(e) {
if (e.success) {
Cloud.SocialIntegrations.externalAccountLogin({
type : 'facebook',
token : Ti.Facebook.accessToken
}, function(e) {
if (e.success) {
var user = e.users[0];
Ti.API.info('User = ' + JSON.stringify(user));
Ti.App.Properties.setString('currentUserId', user.id);
@KarthiPnsmy
KarthiPnsmy / ACS-Social-Integrations.js
Created September 23, 2012 07:54
ACS Social Integrations Part 1
var Cloud = require('ti.cloud');
Titanium.Facebook.appid = "285243484913611";//Production
Titanium.Facebook.permissions = ['publish_stream', 'read_stream'];
var win = Ti.UI.createWindow({
title : "ACS Social Integrations"
});
var fbSignupBtn = Ti.UI.createButton({
title : "Login with Facebook",
@KarthiPnsmy
KarthiPnsmy / app.js
Created June 11, 2012 12:58
Appcelerator Cloud Push Notification in Android
Titanium.UI.setBackgroundColor('#000');
var win = Ti.UI.createWindow({
backgroundColor:'#ccc',
title:'Android Cloud Push Notification'
})
var CloudPush = require('ti.cloudpush');
CloudPush.debug = true;
@KarthiPnsmy
KarthiPnsmy / app.js
Created June 2, 2012 19:36
Appcelerator Cloud Service Custom Object and Query
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var Cloud = require('ti.cloud');
Cloud.debug = true;
var win = Ti.UI.createWindow({
title:"ACS Custom Object Example",
backgroundColor:'#ccc'
})