All my tech-savvy readers and YouTube using colleagues, of course cringe, whenever they accidentally end up on a video with a VPN sponsoring. A sponsoring usually not in the form of an traditional ad, but as a spoken endorsement by the creator himself, so my god damn adblocker can’t block it.
And it’s become so many, basically all medium sized youtubers who need to make some money on the platform since the YouTube-adpocalypse, have, at some point, gone down the VPN shilling route. But this is not only a lesson about the problems of having individuals with no formal education…
I recently had to create an UI in Unreal Engine, and being the gimp-grouch that I am, I instantly thought I could (ab-)use LibreCAD, an Open Source technical drawing program, to create a scalable vector UI.
There was just one problem. Unreal Engine can’t import vector graphics.
This article assumes you have basic knowledge of Unreal Engine and C++. LibreCAD, as long as you only want to draw some straight lines, is completely self explanatory.
Now, there are more sensible solutions to this, you could just buy an SVG-importer on the marketplace, for a mere 20 bucks. You could also…
One of the best additions to browser capabilities in recent years was the addition of service workers and offline support in general. We can now preload data, like articles or network intensive data like pictures, style-sheets or JavaScript libraries, from our web service. This is extremely useful for mobile devices in regions with unstable or slow internet connection. (…like this backwater country in the middle of Europe I am living in.)
The general approach is, to check for new content, whenever there is an internet connection (or access to WLAN) and display it on demand. The service worker is just…
My recent article about VPN shilling on YouTube, has really made me think about which creators I actually still enjoy.
So, in case you can’t stand watching another, meaningless, infotainment video, which the YouTube algorithm suggested to you or which you got click-baited into (“What if we put a nuke on the moon “— no I’m not going to link it, I don’t want it to get any more views.) Here are some great, zero click-bait channels, which really dig into topics, with widespread scientific illiteracy.
Peter Hadfield, is a long time journalist, who posted entirely undercover as Potholer54 for…
This article is a indirect successor to JavaScript-lazyload. You might want to read this first. To recap: We have designed a JavaScript routine, which will load images based on the view-ports size and position. Previously we have pre-generated those images and returned specific resolutions as static content, now we want to automatically scale images according to URL arguments.
In this guide we assume a media URL will look like this:
In this article I will showcase a template to activate an arbitrary application once it is accessed and deactivate it again automatically if it’s no longer used. While it is not difficult per se it unfortunately requires a lot of systemd units and can be confusion at first. If you only want the code go to my GitHub.
Assuming we have a file /usr/bin/roflcopter.sh that runs continuously once started and provides a service on a Unix or network socket, we first need a systemd unit that starts this program.
[Unit]
Description=ScriptWapper
Requires=check-deactivate.service
[Service]
Type=simple
ExecStart=/usr/bin/roflcopter.sh
ExecStop=pkill roflcopter
[Install]
WantedBy=multi-user.target
We…
I like to start my flask projects with a simple __name__ == "__main__"
with argparse and app.run()
. But obviously the flask inbuilt server is not the fastest and probably not the safest either. This is why you should eventually use a WSGI-runner like waitress to run your app. This post will show how to migrate, while keeping any standalone capabilities.
In short, everything in your if __name__
block is not going to be executed anymore, the simplest solution is to move it to a @app.before_first_request
anotated function, so:
app = Flask("LOL") if __init__ == "__name__": # arparse stuff ... #…
I know it isn’t cool these days to just have a build-script, but you really don’t have to follow the trend of making CI more and more complicated. Jenkins and Docker both have their respective places, but these powerful tools should be used with care, and only whenever the complexity of a project actually justifies and necessitates complex CI-pipelines.
Cue Webhooks. GitLab and GitHub have an inbuilt feature called Webhooks. Whenever a certain event, for example a push on the master branch, occurs, a remote URL is automatically queried to inform a remote server of this event.
First, you need…
This article describes how to use the Open Graph Protocol and structured data (JSON-LD) to allow messengers, other websites and search-engines to preview elements of your website.
OGP is used for most small previews in many instant messengers like Telegram or Whatsapp, but also on Facebook and Twitter. It’s very easy to use and the official documentation actually tells you everything you need to know, but there are some potential pitfalls. Every page on your website must have a correct segment in it’s header. Here is the minimalist’s code for a basic web page:
<html lang="en-us" prefix="og: http://ogp.me/ns#"> <head> <meta…
Nginx is a reverse proxy and web-server which can handle SSL connections for your applications and web content. It is actually very easy to get SSL up an running for free with Let’s Encrypt as your certification authority. Even if you can’t or don’t want to use Nginx as your main web-server, your can simply terminate all SSL connections there and then connect locally via HTTP to your hosted applications.
Certbot does most of the work for you, it’s basically a client for certificate authority servers. In our example we will use ACME, which means Certbot will place a magic…
Python programmer at heart, web developer on my bad days.