Difference between revisions of "Programming language cook book"

From Review or Discard at Will
Jump to: navigation, search
(Initial creation)
(No difference)

Revision as of 08:13, 27 August 2015

Mostly just for me to remember stuff

Python

I wanted a json utc datetime for a MQTT payload. Found the arrow module that is much like moment.js for javascript.

import arrow
print (arrow.get(arrow.utcnow()).for_json()

Mediawiki

display unformated like code snippets

<source lang="text"> code snippet </source>