The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
| class Fixnum | |
| def seconds | |
| self | |
| end | |
| def minutes | |
| self * 60 | |
| end | |
| def hours |
| ( ( <argument-list> ) <expression> | <block> ) | |
| var identity = (( x ) { | |
| x; // with tail calls | |
| }); | |
| var f = (( a, b, c ) { | |
| // a, b, c | |
| }); |
| // A response to jashkenas's fine proposal for minimalist JavaScript classes. | |
| // Harmony always stipulated classes as sugar, so indeed we are keeping current | |
| // JavaScript prototype semantics, and classes would only add a syntactic form | |
| // that can desugar to ES5. This is mostly the same assumption that Jeremy | |
| // chose, but I've stipulated ES5 and used a few accepted ES.next extensions. | |
| // Where I part company is on reusing the object literal. It is not the syntax | |
| // most classy programmers expect, coming from other languages. It has annoying | |
| // and alien overhead, namely colons and commas. For JS community members who |
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
| #include <ESP8266WiFi.h> | |
| #include <WiFiUDP.h> | |
| const char* ssid = ".........."; | |
| const char* password = "..........."; | |
| WiFiUDP listener; | |
| void setup() { | |
| Serial.begin(115200); |
| #!/usr/bin/python | |
| # | |
| # this script will push an OTA update to the ESP | |
| # | |
| # use it like: python ota_server.py <ESP_IP_address> <sketch.bin> | |
| # | |
| # on the ESP side you need code like this: https://gist.github.com/igrr/43d5c52328e955bb6b09 to handle the update | |
| # | |
| import socket |