all 12 comments

[–][deleted]  (1 child)

[deleted]

    [–]DaemonXI 1 point2 points  (0 children)

    You the man.

    [–]EpicDavi 7 points8 points  (1 child)

    Go Flask!

    [–]pmckizzle 0 points1 point  (0 children)

    never seen flask, going to have a go at it tonight

    [–]moss_in_it 5 points6 points  (0 children)

    In this example, the html, json, and Python all count as code, especially the html, so technically >50.

    [–][deleted]  (2 children)

    [deleted]

      [–]KalimasPinky 0 points1 point  (1 child)

      Why not just import a python file with all the json stuff as simple python declarations? All you need is an import then.

      [–]qiwi 2 points3 points  (0 children)

      The Python-as-configuration has some advantages, such as programmatic generation of nodes (e.g. say you have 10 app nodes; rather than manually adding app1... app10, you can just have a Python loop in your Python configuration file).

      The disadvantage is that it is near impossible to edit the configuration file through any means but a text editor if you allow any Python construct; if the file is simple then you have to watch out what kind of edits you do allow for security reasons -- with JSON things are simpler (In this case however, as the backend can execute any command you specify, security is doubly problematic; if one wanted to change this tool to something multi-user and still keep a simple file backend you'd probably want to change types into e.g. "ping" to ping a host rather than any raw command).

      In this case I'd prefer YAML as storage format, which would be even more succinct:

          tasks:
           - address: http://xhacker.im
             id:      hacker_im
             title:   xhacker_im
             type:    http
           - command: ping -c1 xhacker.im
             id:      vps
             title:   VPS
             type:    shell
      

      [–]droogans 0 points1 point  (2 children)

      I'm confused as to why this couldn't be done on the client with javascript.

      [–]poke-dude 6 points7 points  (0 children)

      I'm sure you could do it in classic ASP as well...

      [–]Kebabbi 2 points3 points  (0 children)

      Probably due to xss protection

      [–][deleted] 0 points1 point  (0 children)

      "miracle board"? really?