Skip to content

Instantly share code, notes, and snippets.

View germanviscuso's full-sized avatar
🏠
Working from home

German Viscuso germanviscuso

🏠
Working from home
View GitHub Profile
@germanviscuso
germanviscuso / ledctrl.cc
Last active August 29, 2015 14:05
AllJoyn ledctrl.cc - Control the led of the remote device running thin client (AJ_LedService)
/* ledctrl - Control the led of the remote device.*/
/******************************************************************************
* Copyright (c) 2013, 2014, AllSeen Alliance. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
@germanviscuso
germanviscuso / autothread
Last active August 29, 2015 14:10
Quickly launch Java background task (works on Android)
(new Thread(new Runnable() {
public void run()
{
//CODE HERE RUNS IN BACKGROUND
}
})).start();
using Db4objects.Db4o;
using Db4objects.Db4o.Linq;
using System.Collections.Generic;
using System.Configuration;
public class Db4oSession : IDisposable {
private IObjectContainer db;
public Db4oSession(IObjectContainer container) {
db = container;
using Db4objects.Db4o;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Web;
public class DB4OServer {
IObjectServer _server;
public DB4OServer() {
using Db4objects.Db4o;
using System.Linq;
using Db4objects.Db4o.Linq;
using System.Web;
using System.IO;
using System;
using System.Collections.Generic;
namespace NoSQL {
using Norm;
using Norm.Responses;
using Norm.Collections;
using Norm.Linq;
public class MongoSession {
private Mongo _server;
MongoQueryProvider _provider;
public MongoSession() {
@germanviscuso
germanviscuso / NdefConverter.java
Created January 11, 2012 16:09
NFC utility classes for Android
package android.stickynotes;
import android.nfc.NdefRecord;
public interface NdefConverter {
public NdefRecord asNdef();
}
function update_trackers(params, context, done) {
// Available params are:
// params.thingID
// params.vendorThingID
// params.uri
// params.userID
// params.groupID
// params.values
// params.expected
using UnityEngine;
using System;
using System.Collections.Generic;
/// <summary>
/// A console that displays the contents of Unity's debug log.
/// </summary>
/// <remarks>
/// Developed by Matthew Miner (www.matthewminer.com)
/// Forked by Joseph Cassano (jplc.ca) from Console to ConsoleInGame so the console can work from other scripts.
@germanviscuso
germanviscuso / alljoyn_kii_peer
Last active January 27, 2016 08:17
Chat example host and client for nodejs. Logs incoming messages on Kii Cloud.
var alljoyn = require('alljoyn');
require("node-jquery-xhr");
kii = require("./KiiSDK").create();
// process command line arguments
if(process.argv.length != 7){
console.log("Usage: node peer.js [host|client] kiiappid kiiappkey username password");
console.log("Create an app at developer.kii.com (US based) to get the app id and key");
console.log("Username and password will be created if they are not registered on Kii Cloud");
process.exit(1);