This is the general instructions for how to get a pebble watch to talk to an ESP8266 and turn NeoPixels different colours.
Video: https://www.youtube.com/watch?v=BeIQ47WBVXs
- Pebble watch
- ESP8266 ESP-01
package main | |
import ( | |
"context" | |
"errors" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
"runtime" |
int doubler(int x) { | |
return 2 * x; | |
} |
ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib |
<!doctype html> | |
<html> | |
<head> | |
<!-- https://github.com/webrtc/adapter is used for cross-browser interop --> | |
<script type="text/javascript" src="https://unpkg.com/[email protected]/out/adapter.js"></script> | |
</head> | |
<body> | |
<video id="container" controls autoplay></video> | |
<script> | |
window.onload = function() { |
<html> | |
<head> | |
<title>API Example</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var accessToken = "<your agent's client access token>"; | |
var baseUrl = "https://api.api.ai/v1/"; |
This is the general instructions for how to get a pebble watch to talk to an ESP8266 and turn NeoPixels different colours.
Video: https://www.youtube.com/watch?v=BeIQ47WBVXs
app.filter('bytes', function() { | |
return function(bytes, precision) { | |
if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-'; | |
if (typeof precision === 'undefined') precision = 1; | |
var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'], | |
number = Math.floor(Math.log(bytes) / Math.log(1024)); | |
return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number]; | |
} | |
}); |
#! /usr/bin/env python | |
""" | |
Author: Jeremy M. Stober | |
Program: SOFTMAX.PY | |
Date: Wednesday, February 29 2012 | |
Description: Simple softmax function. | |
""" | |
import numpy as np | |
npa = np.array |
The idea is to have nginx installed and node installed. I will extend this gist to include how to install those as well, but at the moment, the following assumes you have nginx 0.7.62 and node 0.2.3 installed on a Linux distro (I used Ubuntu).
In a nutshell,
So for example, www.foo.com request comes and your css, js, and images get served thru nginx while everything else (the request for say index.html or "/") gets served through node.