- a/o 2015-07-24 *
—
- Restart with cmd-R or cmd-D
- Erase drive / 3x if second-handk
- Reinstall MacOS
| #include <SoftwareSerial.h> | |
| // Important!! We use pin 13 for enable esp8266 | |
| #define WIFI_ENABLE_PIN 13 | |
| #define DEBUG 1 | |
| #define SSID "YOUR-WIFI-SSID" | |
| #define PASS "YOUR-WIFI-SECRET" |
| #include <PubSubClient.h> | |
| #include <ESP8266WiFi.h> | |
| const char* ssid = "................."; | |
| const char* password = "................"; | |
| char* topic = "esp8266_arduino_out"; | |
| char* server = "iot.eclipse.org"; | |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
| // Addition to jQuery to get the inner text width | |
| $.fn.textWidth = function(){ | |
| var text = $(this).html(); | |
| $(this).html('<span>'+text+'</span>'); | |
| var width = $(this).find('span:first').width(); | |
| $(this).html(text); | |
| return width; | |
| }; |
| { | |
| "name": "socket.io.1.0", | |
| "version": "1.0.0", | |
| "description": "Socket.IO 1.0 using Primus", | |
| "main": "socket.io.1.0.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "repository": { | |
| "type": "git", |
| # install git | |
| yum install git -y | |
| # get nvm | |
| git clone git://github.com/creationix/nvm.git ~/nvm | |
| # activate nvm |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://npmjs.org/install.sh | sh |
| # install git | |
| yum install git -y | |
| # get nvm | |
| git clone git://github.com/creationix/nvm.git ~/nvm | |
| # activate nvm |
| /* This method gets called if you use the parameter loopServerCommands */ | |
| /* This example sends '/join #test' to the server whenever it receives a part in #test | |
| Make sure params.loopServerCommands is set to true. | |
| Known bugs: | |
| 1) It also runs when other people part the channel (Cannot fix with current version of LightIRC) | |
| */ | |
| var channel = new Array(); | |
| var timeout; |