This is a Lua port of of jbroadway's PHP project of the same name.
A very basic pattern-based Markdown parser. Supports the
following elements (and can be extended via slimdown.addRule()
):
- Headers
- Links
- Bold
var lines = { | |
B: 'Bakerloo', | |
C: 'Central', | |
D: 'District', | |
H: 'Hammersmith & Circle', | |
J: 'Jubilee', | |
M: 'Metropolitan', | |
N: 'Northern', | |
P: 'Piccadilly', |
function instanceOf (subject, super) | |
super = tostring(super) | |
local mt = getmetatable(subject) | |
while true do | |
if mt == nil then return false end | |
if tostring(mt) == super then return true end | |
mt = getmetatable(mt) |
-- You could setup global vars: | |
for k,v in ipairs{3,10,4,9,2,1,nil,nil,nil,11,12,nil,6,7,5,8,0} do _G['GPIO'..k-1]=v end | |
-- and use them like this: | |
gpio.mode(GPIO2, gpio.OUTPUT) | |
gpio.write(GPIO2, gpio.WRITE) |
This is a Lua port of of jbroadway's PHP project of the same name.
A very basic pattern-based Markdown parser. Supports the
following elements (and can be extended via slimdown.addRule()
):
The latest versions of Node do support most of the ES6 syntax. However, notably, they still do not support import
and export
expressions. In order to use these espressions we can turn to Babel.
Babel provides a wrapper around Node that automatically translates a given source file before running it in the normal
Node application installed on your machine. This wrapper application is called babel-node
and is provided in the
babel-cli
package.
However, import
and export
translators are not in the core Babel functionality, we'll need to add a preset.
The translators needed here are in the es2015
Babel preset.
You will need to create an Heroku account if you don't have one already. You'll also need to install the Heroku Toolbelt, which includes the Heroku CLI that we'll be using shortly.
Follow the installation instructions for your platform in the Sailor docs, but essentially all you need is the sailor
CLI.
https://github.com/gamesys/moonshine/
[[{"driverNumber":1,"duration":121790},{"driverNumber":3,"duration":125239},{"driverNumber":2,"duration":125298},{"driverNumber":10,"duration":125768},{"driverNumber":5,"duration":127046},{"driverNumber":4,"duration":127716},{"driverNumber":9,"duration":127937},{"driverNumber":6,"duration":128740},{"driverNumber":15,"duration":129128},{"driverNumber":11,"duration":129804},{"driverNumber":19,"duration":130567},{"driverNumber":7,"duration":131135},{"driverNumber":8,"duration":131346},{"driverNumber":14,"duration":131810},{"driverNumber":16,"duration":132738},{"driverNumber":12,"duration":133007},{"driverNumber":20,"duration":133869},{"driverNumber":18,"duration":134774},{"driverNumber":21,"duration":134824},{"driverNumber":22,"duration":135978},{"driverNumber":23,"duration":136626},{"driverNumber":17,"duration":137676}],[{"driverNumber":1,"duration":117127},{"driverNumber":2,"duration":116963},{"driverNumber":10,"duration":117795},{"driverNumber":5,"duration":119307},{"driverNumber":9,"duration":118701},{"drive |
[ | |
{ | |
"driverNumber":7, | |
"tyres":[ | |
"supersoft", | |
"medium", | |
"medium" | |
] | |
}, | |
{ |
[ | |
[ | |
{ | |
"driverNumber":1, | |
"duration":99646 | |
}, | |
{ | |
"driverNumber":4, | |
"duration":101714 | |
}, |