##Closure / Table hybrid classes
Features:
- Public/Private instance fields
- Public/Private instance methods
- public class methods/fields
- inheritance (only 1 parent)
##Closure/table hybrid switch function
| rednet.open("top") | |
| config = { | |
| } | |
| registered = false | |
| master = 0 | |
| pulseLengthInSec ={ | |
| ["stack"] = 1.65, | |
| ["single-redstone"] = 6 | |
| } |
| rednet.open("right") | |
| slaves = {} | |
| rednet.broadcast("newmaster") | |
| function dbjson(thing) | |
| print(json.encodePretty(thing)) | |
| end | |
| function compileResourceList() |
| modemside = "right" | |
| master = 0 | |
| function checkModem() | |
| if (not rednet.isOpen(modemside)) then rednet.open(modemside) end | |
| end | |
| function detectMaster() | |
| checkModem() | |
| print("looking for master") | |
| if (master > 0 ) then return end |
| -- Main Program taken from Computercraft mod | |
| local upload_argument_name = "publish" | |
| local install_argument_name = "install" | |
| local update_argument_name = "update" | |
| local list_argument_name = "list" | |
| local program_name = fs.getName(shell.getRunningProgram()) -- "cpm" | |
| local saveFileName = "listOfPrograms" |
| -- Directions | |
| local Direction = {} | |
| Direction.left = "left" | |
| Direction.right = "right" | |
| Direction.forward = "forward" | |
| Direction.back = "back" | |
| Direction.up = "up" | |
| Direction.down = "down" | |
| Direction.isValid = function(direction) | |
| local dir = string.lower(direction) |
##Closure / Table hybrid classes
Features:
##Closure/table hybrid switch function
| code-highlighter: http://softwaremaniacs.org/soft/highlight/en/ | |
| Host github-gist examples as homepage: http://bl.ocks.org/ |
| Beer Mug: "\xF0\x9f\x8d\xba" |
Some Interesting Stuff: Stackoverflow VIM Tricks
Must-Have VIM-Plugins
| ADB | |
| Only see browser log (console.log) in adb logcat: adb logcat browser:V *:S |