Tag Linux
Quick Mock Server
Are you in a need of a quick mock server? One simple solution for Linux/Mac/BSD users is to employ an existing tool, nc. It exists in most distros and it’s very easy to use. #!/bin/bash if [ "$#" -ne "1" ]; then echo "usage: ./mock_server.sh <port>" exit 1 fi trap "{ exit 0; }" SIGINT SIGTERM SIGKILL PORT="$1" function make_response() { read -r response echo -e "HTTP/1.1 200 OK\r\n\r\n${response}" } while true ; do dd if=/dev/zero count=10000 make_response | nc -l "$PORT" done Save this in a file called mock_server.
One Use Case for TPL
TPL is a set of libraries from Microsoft that can be used for parallel processing, basically it is a set of high level tools that can make your code run in parallel. TPL is not a panacea for parallel processing, mainly because you donโt always need parallel processing, but when you need it, it can be a life-saver. The system The system was built with a simple purpose, to consume and process events delivered by Kafka.
Multi-stage building with Docker
Docker supports a feature, where you can create multiple containers with a single dockerfile and at the same time share the contents between the containers. This feature gives you the possibility of having multi-stage builds and opens one significant spot for creating repeatable builds. The idea behind it is simple, you can have multiple FROM statements inside the same Dockerfile. Each FROM statement can use different images, therefore defines itโs own dependencies and allows you to connect the containers from one base to the other by using COPY --from=0or COPY --from=previous-stage.
ASP.NET & Docker Experience
Introduction Docker is system for creating and managing lightweight linux containers, which has become very popular in the enterprise computing business. ASP .NET is a framework/platform from Microsoft, mainly used in building web applications. At the moment is on version 4.6.1 (stable) and version 5 is waiting around the corner. Version 5 is a completely re-done, its structure and mentality mimics the frameworks like Django, Flask or Express, which are small and provide you with basic functionality for web development.