Added Lua example.
This commit is contained in:
parent
0aba1cfc69
commit
7e72b0cd01
2 changed files with 17 additions and 3 deletions
14
lua/lua.lua
Executable file
14
lua/lua.lua
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
permalink: /cgi/lua/index.lua
|
||||||
|
---
|
||||||
|
|
||||||
|
print("Content-type: text/plain")
|
||||||
|
print()
|
||||||
|
print("Hello from Lua!")
|
||||||
|
print()
|
||||||
|
print("print(os.date('%a %b %d %H:%M:%S %Z %Y'))")
|
||||||
|
print(os.date("%a %b %d %H:%M:%S %Z %Y"))
|
||||||
|
print()
|
||||||
|
print("for i = 1,10 do print(i) end")
|
||||||
|
for i = 1,10 do print(i) end
|
||||||
|
|
||||||
|
|
@ -4,14 +4,14 @@ permalink: /cgi/python/index.py
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
#from http import HTTPStatus
|
#from http import HTTPStatus
|
||||||
from pprint import pprint
|
#from pprint import pprint
|
||||||
|
|
||||||
print("Content-type: text/plain\n")
|
print("Content-type: text/plain\n")
|
||||||
#print(HTTPStatus.OK.value)
|
#print(HTTPStatus.OK.value)
|
||||||
print("Hello from Python!")
|
print("Hello from Python!")
|
||||||
print("")
|
print("")
|
||||||
print('print(datetime.today().strftime("%Y-%m-%d"))')
|
print('print(datetime.today().strftime("%a %b %d %H:%M:%S %Y"))')
|
||||||
print(datetime.today().strftime('%Y-%m-%d'))
|
print(datetime.today().strftime('%a %b %d %H:%M:%S %Y'))
|
||||||
print("")
|
print("")
|
||||||
print("for i in range(1, 11): print(i);")
|
print("for i in range(1, 11): print(i);")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue