JavaScripts magic three dots
The so called spread / rest operator scares a lot of people switching to JavaScript.
This should be a self exaplaining code snippet:
Hotplug external Monitors on Linux
I am using i3 window manager which is automatically creating workspaces for new monitors.
The problem is that xrandr
is not enabling my external monitors when i plug them in (or remove them when unplugging them).
Donate CPU / GPU for Cancer, COVID-19 and co.
TL;DR: Run docker run -d johnktims/folding-at-home
to donate your spare CPU power!
As a software developer, you probably rent some sweet little servers to host all your wonderful awesome services.
You probably also realized that there are not that many people using your services so the server is always running at 0.01
load.
So what should you do with all that idle compute power??
Top NeoVim Plugins of 2020
I recently tried to find some new interesting NeoVim plugins and realised that there are not many people blogging about their setup in 2019/2020.
There are many outdated configs and plugin suggestions.
I wanna go through the must have plugins (in my opinion) starting from the most important one.
How to inspect a Python API
Imagine the following situation: There is a fancy, large, often changed Python API which is used sequentially and you wanna expose it to your favorite users via pretty user interface.
class FancyAPI:
def cleans_room(self, room: str):
"""Cleans given room for you. You should call it every day."""
pass
def bake_pizza(self, size: int, flavor: str):
"""Even this function got a docstring"""
pass
react-native-app with expo.io on coder.com
In the past few weeks I learned about react-native, coder.com and expo.io.
My brain went kinda crazy and wanted to connect these things into one, so I can develop my app whereever I want with only a browser and my phone.
system.exe at ~25% CPU fix
There is a specific bug out there, especially with HP Notebooks (440 G5).
Sometimes system.exe
consumes around 25% of your CPU. This is a real waste of energy so the notebook is going to consume alot of battery.
In my case the battery was fully drown after 2-3 hours. It should last around 10 hours.
React.js with ES6 & Webpack 4 => React-Hot-Loader 4 as Middleware with Express 4
To start a tiny react-app (with the new ES6 features) I wanted to have a basic hot-reload development server with an expressJS backend server, to handle API calls in the future.
This should be bundled with webpack because it’s the most popular and kinda easy to handle react in my opinion.
Since I couldn’t find any good documentation on the internet, I decided to put all of this together with the newest versions out there in 2018.
Useful Nginx Server Blocks
In the past weeks I set up some different webservers with Nginx. Nginx is more leightweight and easy to handle than Apache2.
There are alot of different usages for webservers. Some are reverse proxy, https, static sites, clouds or php. In this article I wanna share my experiences with different server blocks for some of these cases. It’s basically more a little wiki.
Setup NextCloud Server with Nginx SSL Reverse-Proxy and Apache2 Backend
In the next few chapters we gonna setup a NextCloud Server from scratch.
There are a lot of tutorials out there already covering this topic, but in our case we gonna use Nginx to serve the SSL-Certificates and proxy the connection to an Apache2 service which is serving NextCloud.
You can either use an existing Nginx configuration or follow the guide and deploy a new one.