Program To Flash Factory Firmware: ESP8266 Flasher
Factory Firmwares Can Be Found Here
Amazing Book to get a start
Programming can be done in two simple ways, either in Lua or through Arduino IDE, whichever you are comfortable with.
In case you want to use Lua, then this LuaLoader can be a good IDE to start with.
Else, you can use Arduino IDE by following the steps here
This repository is aimed at documenting my various codes for the esp8266.
kthxbye