This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Implementation of ISynchronizeInvoke for Unity3D game engine. | |
| Can be used to invoke anything on main Unity thread. | |
| ISynchronizeInvoke is used extensively in .NET forms, it's is elegant and quite useful in Unity as well. | |
| I implemented it so i can use it with System.IO.FileSystemWatcher.SynchronizingObject. | |
| help from: http://www.codeproject.com/Articles/12082/A-DelegateQueue-Class | |
| example usage: https://gist.github.com/aeroson/90bf21be3fdc4829e631 | |
| license: WTFPL (http://www.wtfpl.net/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="stylesheet" href="/css/instagram.css" type="text/css" /> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script> | |
| <div class="instagram"></div> | |
| <div class="load-more btn">Gimme more photos...</div> | |
| <div class="error">Oops, there was an error getting the photos...</div> | |
| <script src="/js/instagram.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Will pull images from a tag. | |
| I'm using this to make a photobook of my brother in law's wedding, | |
| but you might find it helpful for any number of other things. | |
| """ | |
| from instagram.client import InstagramAPI | |
| from pprint import pprint | |
| import urlparse | |
| import urllib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Yahoo Finance stock historical data, prices and details retrieval function written in Javascript, jQuery and YQL | |
| v2013-08-05 | |
| (c) 2013 by Fincluster ltd - http://fincluster.com <dev@fincluster.com> | |
| */ | |
| (function($) { | |
| function getStock(opts, type, complete) { | |
| var defs = { | |
| desc: false, | |
| baseURL: 'http://query.yahooapis.com/v1/public/yql?q=', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function calculateDistance(rssi) { | |
| var txPower = -59 //hard coded power value. Usually ranges between -59 to -65 | |
| if (rssi == 0) { | |
| return -1.0; | |
| } | |
| var ratio = rssi*1.0/txPower; | |
| if (ratio < 1.0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| var socket = io('http://localhost/client'); | |
| var linearScale = d3.scale.linear() | |
| .domain([0, 20]) | |
| .range([20, 1000]); | |
| socket.on('connected', function(msg) { | |
| console.log('connected to server'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var express = require('express'); | |
| var app = require('express')(); | |
| var http = require('http').Server(app); | |
| var io = require('socket.io')(http); | |
| var scanner = io.of('/scanner'); | |
| scanner.on('connection', function(socket) { | |
| console.log('Scanner Connected'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var noble = require('noble'); | |
| //replace localhost with your server's IP; | |
| var socket = require('socket.io-client')('http://localhost/scanner'); | |
| //replace with your hardware address | |
| var addressToTrack = '7c669d9b2dda'; | |
| socket.on('connect', function(){ | |
| console.log('connected to server'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| noble.startScanning(); | |
| noble.on(‘discover’, function(peripheral) { | |
| var macAddress = peripheral.uuid; | |
| var rss = peripheral.rssi; | |
| var localName = advertisement.localName; | |
| console.log('found device: ', macAdress, ' ', localName, ' ', rss); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using WebSocketSharp; | |
| using System.Collections; | |
| public class AI : MonoBehaviour { | |
| private WebSocket ws_; | |
| public string docomoAPIkey = ""; | |
| public string oreSay = ""; |