Skip to main content

Posts

Showing posts from March, 2017

Adventures in Elm

You can write your first elm code online here: http://elm-lang.org/examples/hello-html Your first hello word code will look like this: import Html main = Html.text "Hello, World!!" Your index.html  will look like this: Hello, World!! You can also div as follows: import Html main = Html.div [] [ Html.text "Hello, World!!"] Output will remain the same, but if you inspect the webpage, you can see the following in the source code: You can convert your html code to elm here: https://mbylstra.github.io/html-to-elm/ You can also add a view function import Html main = view view : Html.Html Never view = Html.div [] [ Html.text "Hello, World!!"] Your output will remain the same. If you want to output your mouse position your code will look like: import Html import Mouse import Programmator main : Program {} main = { init = { x=0, y=0 }, input = Mouse.moves, view = view } |> Programmator.viewFromOneInput view : Mo

Adventures in Elm

You can write your first elm code online here: http://elm-lang.org/examples/hello-html Your first hello word code will look like this: import Html main = Html.text "Hello, World!!" Your index.html  will look like this: Hello, World!! You can also div as follows: import Html main = Html.div [] [ Html.text "Hello, World!!"] Output will remain the same, but if you inspect the webpage, you can see the following in the source code: You can convert your html code to elm here: https://mbylstra.github.io/html-to-elm/ You can also add a view function import Html main = view view : Html.Html Never view = Html.div [] [ Html.text "Hello, World!!"] Your output will remain the same. If you want to output your mouse position your code will look like: import Html import Mouse import Programmator main : Program {} main = { init = { x=0, y=0 }, input = Mouse.moves, view = view } |> Programmator.viewFromOneInput view : Mouse.Position -> Html.Html Mouse.Position vi

Docker Security

Docker contaniners share the kernel wth the machine they are running on. If any of the containers starts using up more resources like CPU, RAM the other containers might run ino /do/s issue. The attack can break out from a container into the host  machine or other containers. Make sure that the images coming from dockerhub are from trusted sources. You should be careful with what secrets you store in your containers. You can use the commands: docker network disconnect nh nh is the name of the container. This will disconnect your containers from the network and they will be inaccessible. docker diff Docker diff will show you which files have been modified. If you do not want external invalid/destructive files to modify your containersthen you can make your containers read-only Specify --read-only option while running your container.

Docker Security

Docker contaniners share the kernel wth the machine they are running on. If any of the containers starts using up more resources like CPU, RAM the other containers might run ino /do/s issue. The attack can break out from a container into the host  machine or other containers. Make sure that the images coming from dockerhub are from trusted sources. You should be careful with what secrets you store in your containers. You can use the commands: docker network disconnect nh nh is the name of the container. This will disconnect your containers from the network and they will be inaccessible. docker diff Docker diff will show you which files have been modified. If you do not want external invalid/destructive files to modify your containersthen you can make your containers read-only Specify --read-only option while running your container.