Updated layout for my website

I just finished some redesigning for my website lgk.io. Before the update: After the update: I now use display: grid; to show the latest blog post link next to my introduction card. This way, I waste less space and the user can see more, the links to the featured apps are visible again on the… Updated layout for my website weiterlesen

Apple M1: Potential für die gesamte PC-Sparte?

Im November hat Apple die ersten Macs mit M1 veröffentlicht, der ersten Generation des eigenen Prozessors. Für Apple und dessen User bedeutet das einen großen Bruch, weg von Intel x86-CPUs und hin zu auf ARM-basierende Chips, wie man sie bisher hauptsächlich aus Mobilgeräten wie Smartphones und Tablets kennt. Aber auch für Microsoft bietet das meiner… Apple M1: Potential für die gesamte PC-Sparte? weiterlesen

If / else statement inside of React Component’s Render method

Sometimes (well, actually pretty often) you have to use conditional statements inside of React Component’s Render methods. You could do it like this: import React from „react“; class MyComponent extends React.Component { render() { return ( <di> {„LGK“ == „awesome“ ? <h1>LGK is awesome!</h1> : <h1>LGK is not awesome :C</h1> } </div> ); } }… If / else statement inside of React Component’s Render method weiterlesen

Node.js: Check if you are in debug or production mode

Sometimes you have to use other values in a variable when your application is in production as if when you are debugging it. For example you have to use another web service URL. Here is how can do it: var webApiUrl; if (process.env.NODE_ENV === „production“) { // use in production webApiUrl = „http://myapp.online/awesome-app/api“; } else… Node.js: Check if you are in debug or production mode weiterlesen