Skip to content

Instantly share code, notes, and snippets.

View typoworx-de's full-sized avatar

typoworx-de

View GitHub Profile
@probonopd
probonopd / Wayland.md
Last active May 7, 2024 10:25
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@hideojoho
hideojoho / 0-4-steps-get-docker-with-gpu-on-ubuntu-2004.md
Last active October 3, 2023 06:39
4 steps to get a docker running with GPU on Ubuntu 20.04

⚠️ The following instruction is written on 25 Jul 2020 (= old).

4 steps to get a docker running with GPU on Ubuntu 20.04

Environment

  • Ubuntu 20.04
  • CUDA 10.2
  • Docker Latest
@einpraegsam
einpraegsam / NotAuthorized.php
Last active May 10, 2023 21:46
Individual 403 and 404 handling in TYPO3 9 and 10. Show a 404 page but keep wrong URL. In case of a missing frontend login, redirect to login page and redirect back after login.
<?php
declare(strict_types=1);
namespace Vendor\Sitepackage\PageHandler;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Core\Error\PageErrorHandler\PageErrorHandlerInterface;
use TYPO3\CMS\Core\Http\RedirectResponse;
use TYPO3\CMS\Core\Http\Uri;
use TYPO3\CMS\Core\Site\Entity\Site;
@ishad0w
ishad0w / sources.list
Created April 30, 2020 16:55
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@okapies
okapies / INSTALL.md
Last active February 16, 2022 20:19
How to install akvcam on Ubuntu 18.04

Install DKMS

$ apt install dkms

Prepare for signing kernel modules

TODO

Install

Download the source code.

@yaroslavche
yaroslavche / create_stream_from_string.md
Last active January 18, 2024 15:06
PHP. Create a stream from a string

If you know the string is small use

$stream = fopen(sprintf('data://text/plain,%s', $string), 'r');
$result = stream_get_contents($stream);

data://

When passing plain string without base64 encoding, do not forget to pass the string through URLENCODE(), because PHP automatically urldecodes all entities inside passed string (and therefore all + get lost, all % entities will be converted to the corresponding characters).

If data is large - better use

@F21
F21 / signing-gpg-keys.md
Last active May 5, 2024 20:59
Signing someone's GPG key

This is a quick guide of the commands we use to sign someone's GPG key in a virtual key signing party.

Note: The steps cover only the technical aspects of signing someone's key. Before signing someone's key, you must verify their identity. This is usually done by showing government-issued ID and confirming the key's fingerprint

The commands will work for both GPG and GPG2.

I use Julian's key for the examples. His key id is 2AD3FAE3. You should substitute with the appropriate key id when running the commands.

Signing the key

  1. List the keys currently in your keyring: gpg --list-keys.
@superseb
superseb / defaultdns.md
Last active April 17, 2024 08:51
Change default DNS nameserver used by Kubernetes pods

Change default DNS nameserver used by Kubernetes pods

This can be applied generically but usually applies to Linux nodes that have a local caching nameserver running, which means pointing to an IP in the loopback range (127.0.0.0/8). Ubuntu 18.04 Bionic Beaver does this by default.

Option 1: Change host configuration

sudo systemctl mask systemd-resolved
rm -f /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
@Brainiarc7
Brainiarc7 / cuda_installation_on_ubuntu_18.04
Last active March 12, 2024 23:46 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
cuda 9.0 installation guidline for ubuntu 18.04 LTS
# first get the PPA repository driver
sudo add-apt-repository ppa:graphics-drivers/ppa
# install nvidai driver
sudo apt install nvidia-384 nvidia-384-dev
# install other import packages
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
# CUDA 9 requires gcc 6
@mrzor
mrzor / fish-set-cookie-redirect.js
Created March 6, 2018 14:40
Nick.js / Headless Chrome / Redirect + Set-Cookie fishing