This article will describe how to program the ESP8266 IoT board to make HTTP Post requests to

Parts List

Breakout Board $0.22

ESP8266 Chip $2.59

USB FTDI Programmer $1.99

Total price: $4.80 and if you already have a USB FTDI board it’s only $2.81.

I’ll let that sink in for a moment.  For $2.89 you can connect to your Wifi and communicate to a server on the internet.  The ESP8266 that I bought from TaydaElectronics has 8 GPIO pins available for interacting with the physical world.  In this example we will not be using the GPIO.  Instead we will periodically send a message to that the device is alive.  Below you will see images of all the parts.

ESP8266 ESP-12 Buy it here.

ESP8266 Breakout Board Buy here.

USB FTDI Adapter Buy here.

Connecting the ESP8266 to the FTDI adapter for programming.

After you have soldered the ESP8266 to the breakout board and installed the pin headers you are ready to program the micro controller.


Solder a female jumper wire to the 3V3 point on the FTDI connector.  Connect this to the VCC pin on the breakout board (lower left pin).
Solder a female jumper wire to the RTS point on the FTDI connector.  Connect this to the REST pin on the breakout board (top left pin).

Next, connect the rest of the pins from the FTDI header to the ESP8266.

DTR from the FTDI connects to GPI00.
GND connects to GND.
RXD on the FTDI connects to TXD on the Breakout Board (BB).
TXD on the FTDI connects to RXD on the BB.

This configuration is called the Programming Configuration.  When in this configuration your device will be detected by the Arduino IDE and can be programmed.


In the Arduino IDE select the ESP8266 board from the Tools | Board menu.  Also, after you connect the USB FTDI adapter to your computer you should then have a port named /dev/cu.SLAB_USBtoUART select that port.  If you do not have the ESP8266 board please go to the Board Manager in the Arduino IDE and download the board definition.

Open the Ardunio IDE INO file below or cut and paste the following code into the IDE.


Be sure to change the your-ssid, and your-password with the appropriate values for your wifi network.  Also, the your-thing-name will be the device name that you are posting data to on

When you compile and upload this to your device you can then unhook the REST and GPI00 pins then power cycle your ESP8266 by removing the GND and reattaching it.  Within about four seconds the url for your device should start showing data:


Configuring ReactJS from scratch

Walthrough of creating a ReactJS application from scratch with every step documented. This should be good enough for someone that is a total beginner.

The code for this post is located on github.

Techology Stack

Please download and install NodeJS and Webstorm to follow this tutorial webpack and react-materialized will be installed later.

Setup directory

I am going to create my project in the ~/Projects/bbq/bbqweb directory.

Create the folder & change into it.

Initialize the directory with npm.

Press return for each question. When complete you should have a package.json file in your directory.

Install react, babel, and webpack.

Install webpack

Install react

Check your setup

List your directory and you should now have a package.json file and a node_modules directory. If you list the contents of the node_modules directory you will find a bunch of directoies for all the components you just installed with those two npm i commands.

Create the .babelrc config file.

Create the following file in your new project directory with your favorite text editor. Make sure it is properly named. Windows users will need to make sure there is not a .txt file extension on the end after saving.

Create the index.html file.

This is the file that serves up the application to the browser and is the first resource loaded by the web browser. The file is basically only going to point to your webpack bundle.


This HTML file will not do anything yet. We still need to configure webpack and create the ReactJS index file. Don’t worry that there is no src/public/bundle.js file. We are going to get that created next.

Create the webpack.config.js

Babel is used to transpile the code we write for ReactJS into a more supported form of JavaScript. This lets us write modern code that would not be directly supported by all browsers. This file configures babel to understand ReactJS.

Configure npm to run and build your application

Edit your package.json file and edit the scripts section to look like mine below. You are adding the dev and build scripts to this file to make things a little easier.

Create the ReactJS entry point to your application index.jsx

Edit the new file named src/app/index.jsx, paste in the code below, and save it.

To run the application type npm run dev in the project root folder.  This will start a mini web server.  Just point your web browser to http://localhost:3000 and you should see your web application.

This post pertains to React Native v0.12.0-rc.

I am attempting to port my iOS app in react-native to Android. I am experiencing a bunch of issues surrounding colors and default styles. I am getting TypeError: expected dynamic type ‘string’, but had type ‘int64’.

Attached the debugger to the processes and I am seeing calls to the following code in CatalystStylesDiffMap.class:

Examining the values I see the color property is an int64.

As it turns out the Android project and the node-module for react-native were out of sync and this caused lots of problem with regard to style color properties.

It looks like my application (even when initing a fresh app) was importing java libraries for 0.11 dependencies:

I verified my installed version of react-native

init’ed a new project and looked at the build.gradle file to see it is 0.11+.

Checked the node_modules/react-native/Libraries/StyleSheet to see 0.11 files (0.12+ has a new processColor.js file in it as seen by recent commits.)

So to make this work I changed the build.gradle to 0.12+, and ran npm i react-native@0.12.0-rc to force the correct android libraries and the correct react-native module. Now the app works.

Is this my machine or npm cache that is horked up or is it an npm install problem with the 0.12.0-rc? I also noticed that none of the files in the $PROJECTDIR$/android folder get updated when doing an npm i or npm update which leaves the native app setting behind in version.

There are lots of tools that compare two PostgreSQL databases.  Most are command line and the precious few that are UI based either cost too much money (from an independent developer’s perspective).  So like any persistent developer I decided to write my own and learn about Electron along the way.

I open sourced the tool so anyone can use it for free.  My intent is to provide the schema compare functionality for free forever.

The shell container for the application is my first foray into Electron which uses io.js and Chrome browser to power the desktop application.  The UI is presented as HTML and the HTML side of things is using AngularJS and Bootstrap to make the nifty UI. It’s a pretty cool concept and supports Linux / Mac OS X / Windows.  I will provide binaries as well in the near future.

Here is a link to the homepage.

And here is the link to the Github project site, please feel free to submit pull requests!

screen-01 screen-02 screen-03


As of the latest version of pm2 there is a slight bug in the process that writes the startup script to your /etc/init.d directory.  Out of the box the on reboot (or by executing the script as root) you will see the following error:

The fix is simple.  By fixing one line of code in the shell script your pm2 will now startup correctly.

Note the export PM2_HOME line is incorrect.  The PM2_HOME should actually point to the home directory of the USER you told pm2 to run under.  So change that line to the following:

Note that myPm2User should be replaced with whatever user account you want to run pm2 under.

Now when you reboot you will see success:




I screamed at the computer today while looking for examples of how to properly use the whereArgs argument of the SQLiteDatabase.delete() function.  I am pretty sure I puked a little when I read this horrible advice on Stack Overflow:

I am having flashbacks to 1996 when this first became an issue for developers (yikes, showing my age).

The correct way to do this is to use the whereClause and whereArgs arguments to prevent SQL Injection.

Here is the documentation for the method (although it is lacking good guidance).

So correct code would look like this:


There are a few links on Stack Overflow about this topic but the solutions seem old (link, link).  I figured out how to do this correctly in the latest version of AngularJS (v1.4.0 as of writing this).

Then add the interceptor to the pipeline like this in your function.

As a side note, I left my session injection code in there.  I use this to insert a sessionid header into every request.  You can remove that part and rename this interceptor from sessionInjector to unauthorizedToLoginInterceptor if you wish.