Ihr Partner in Web-Entwicklung

Innovative Ideen für Ihr Unternehmen

Web-Entwicklung

Egal ob neue Firmen-Webseite, CRM-System oder Spezial-Software. Wir sind ihr Ansprechpartner in Sachen Web-Entwicklung!

Wir erstellen Webseiten und Web-Applikationen nach ihren Wünschen und Anforderungen. Dabei setzen wir stehts auf die neusten Technologie- und Sicherheits-Standards.

Netzwerk Administration

Planung, Aufbau und Administration ihres kleinen bis mittelständigen Firmen-Netzwerkes.

Wir kümmern uns daraum dass es in ihrer Firma läuft. Wir planen, bauen und administrieren ihr Unternehmens-Netzwerk.

Linux Server Management

Aufbau, Instandhaltung und Wartung ihres Linux-Servers.

Wir bieten ihnen einen umfassenden Service für ihren Linux-Server. Wir sorgen dafür, dass alles auf dem neusten Stand ist und ihre Services verlässlich laufen. Dabei achten wir stehts auf die Sicherheit ihres Netzwerkes und ihrer Kunden.

Wer Sind Wir?

Software ist Analyse und Instrospektion. Um einen Prozess zu verstehen, betrachten wir ihn so lange bis wir ihn verstehen. Gute Software erklärt einen Prozess in einfachen Schritten.

Wir bauen Software aus Micro-Services, kleine Komponenten die eine kleine Aufgabe erledigen. Ein Service alleine ist nahezu nutzlos, aber wenn mehrere zusammenfließen - dann können sie komplexe Prozesse abbilden und verwalten.

Viele unserer Services sind Open-Source, so das sie von der Community geprüft und verbessert werden können. Das erlaubt uns transparente und effiziente Arbeit.

Wir ergänzen diese Services dann mit anderen Services die proprietär sind, und das geistige Eigentum ihrer Firma schützen. [Mehr erfahren?]

Wir möchten das unsere Kunden das Gefühl haben das dass was wir tun ganz einfach ist. Dann wissen wir das wir es richtig machen.

César

César

Inhaber & Entwickler

Sebastian

Sebastian

Entwicker

BLOG

Wir nutzen unseren Blog um uns mit anderen Entwicklern auszutauschen. Die Softwareentwickler Community ist global, und selten Deutsch sprechend. Unsere Artikel sind deshalb alle auf Englisch verfasst. Wir laden sie trotzdem ein sich umzuschauen.

Security script level 9000

01/07/2020


: 56 : engineering

Drawing with PHP-GD

26/06/2020

For a few weeks I’m working on a fun little project where I need to display the live location of a train on a simple two-dimensional railroad-map with signal-icons and train-numbers. With the PHP-GD module, you can easily draw basic shapes like lines, rectangles, polygons, text and more and export or save them in various image-file types. Perfect for my project!

This is an example of the train-overview system I’m working on. As you can see I just used lines, triangles and text to display the needed information.

Every time a position of a train or the status of a signal changes, the script automatically updates the color of the line / triangle with the new information. And since it just outputs an image-file, it can be displayed on almost every device without any code!

Example for a PHP-script with PHP-GD to display those information:

<?php
// Set the HTTP header type to PNG
header("Content-type: image/png"); 

// Create a new image with the given size
$im = ImageCreateTrueColor(1920, 1080); 

// Define some colors
$white = ImageColorAllocate($im, 255, 255, 255); 
$black = ImageColorAllocate($im, 0, 0, 0);
$red   = ImageColorAllocate($im, 255, 0,0);
$green = ImageColorAllocate($im, 0, 255, 0);

// Set background to black
ImageFillToBorder($im, 0, 0, $black, $black);

// Create some lines on the image
ImageLine($im, 0, 0, 250, 250, $white);
ImageLine($im, 250, 250, 100, 250, $red);

// Create a triangle
ImageFilledPolygon($im, [
        130, 240,
        130, 260,
        145, 250
    ], 3, $green);

// Render the final image and send it to the browser
ImagePNG($im); 

// Finally destroy the image in memory to free up resources
ImageDestroy($im);

I’ll post some more updates about this project and the back-end (API) soon!


: 0 : engineeringprogramming, php, i like trains

Etherwake does not work if your network interface is not named eth0

19/06/2020

It seems to me that newer Linux releases (in our case Ubuntu server) are often shipped with network interfaces that are not named eth0. Our server’s network interfaces are all named something like enp4s0f0 and bond0 and stuff like that.

We do have a cronjob set up that will regularly wake our servers and run backups, allowing them to spin down whenever they’re done with the job they were performing.

Usually we would use a job like this:

etherwake -D mac:of:the:server

This used to work just fine, because older versions of most linux distros seem to name their network devices eth0. But when the device is named differently, you will have to use the ip addr command to find the name of the interface, in our case this produces something like this:

1: lo: [...]
    link/loopback [...]
    inet [...]
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s0f0: [...]
    link/ether [...]
3: enp3s0f1: [...]
    link/ether [...]
4: enp4s0f0: [...]
    link/ether [...]
5: enp4s0f1: [...]
    link/ether [...]
6: bond0: [...]
    link/ether [...]
    inet [...]
       valid_lft 509600sec preferred_lft 509600sec
    inet6 [...]
       valid_lft forever preferred_lft forever

In this case, you need to undertsand which network interface is the one the server is using to communicate with the network. In our case, all the interfaces are just mashed together into one, creating bond0, which is the one we’re going to be using.

So, instead of using the etherwake command like before, we need to add a -i flag to make the server understand that we’re intending to use another interface, in our case that would be:

etherwake -D mac:of:the:server -i bond0

Now, that works when the command is being executed from a normal bash, but we came accross an issue where the command would run in an interactive shell, but the cron job would just not run.

The issue stems from etherwake being placed in /usr/sbin where cron will not check. If you wish to run this in a cron that wakes the server everyday at 9 AM, you need something like this:

0 9 * * * /usr/sbin/etherwake -D mac:of:the:server -i bond0

And, et voila, we’re done. Our server will be started every day at 9:00, can run it’s cron job and then shut down appropriately.


: 0 : engineeringprogramming, php, i like trainslinux, sysops, engineering

Secure Node.JS-Modules

12/06/2020

This week I came to the point where I needed to secure a source-code I wrote on a Raspberry-Pi, which I installed in a publicly accessible control-unit, to be unreadable to others. It took me quite some time to find a solution to secure this source-code. On GitHub I found a simple tool named Bytenode.

Bytenode can be easily installed via npm. Then you can compile Node.JS files into V8 bytecode with this simple command:

bytenode --compile file.js

You can now run the code with:

bytenode file.jsc instead of node file.js.

And that’s it!

I used this tool in my project and it works perfectly!


: 0 : engineeringprogramming, php, i like trainslinux, sysops, engineeringprogramming, node.js, bytecode, raspberrypi

Project Spotlight: Fabric

05/06/2020

Today I’d like to write up about one of the projects we’ve been working on and the improvements it has been seeing over the last half a year it has been in development. Fabric is a PHP tool intended to provide statistics and detailed information about applications in a Micro-Service network.

At the time of writing Fabric is very much in development. It’ open source, so you can follow it’s changes on our repository for it.

Our intended use case is to provide our team with an overview of the status of our machines in the network, and the scheduled tasks they’re performing. Unlike many other tools, Fabric is intended to provide you with “slower” readings (it is not intended to read millions of events every day) but instead include a reading with an extensive log of how the reading was collected.

While this makes our collection not completely real-time, it’s fast enough that the human reaction time is slower than the application, and instead, the detailed nature of the attached log allows us to detect and diagnose issues early.

Fabric allows you to set alerts for certain states, with severity ranging from mild to critical. This allows us to be ahead of the curve when it comes to diagnosing issues. Instead of reacting quickly when a hard drive is full and the server stops working, we can see it coming a few weeks earlier and already plan for the event and fix the issue before it actually becomes one.

We’ve written a companion “app” that makes it easy to integrate fabric with your existing crons and processes.


: 0 : engineeringprogramming, php, i like trainslinux, sysops, engineeringprogramming, node.js, bytecode, raspberrypiengineering, web developmnet, php

Kontakt

Wir haben Ihr Interesse geweckt oder Sie möchten uns einfach eine Frage stellen?
Gerne können Sie uns eine E-Mail verfassen oder sich telefonisch bei uns melden.

Wir freuen uns auf Ihre Anfrage!

Magic3W
Pelkovenstr. 148
80992 München