Skip to content

Instantly share code, notes, and snippets.

@probonopd
probonopd / Wayland.md
Last active November 18, 2024 10:04
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.

The Wayland project seems to operate like they were starting a greenfield project, whereas at the same time they try to position Wayland as "the X11 successor", which would clearly require a lot of thought about not breaking, or at least providing a smooth upgrade path for, existing software.

In fact, it is merely an incompatible alternative, and not e

@dpschen
dpschen / BackupFirefoxSync.md
Last active September 19, 2024 23:17
Hacky way to export synced tabs of Firefox Sync / Weave and import them in OneTab

Hacky way to export synced tabs of Firefox Sync / Weave and import them in OneTab

Background

I am guilty beeing a tab messy and was searching for a while for a good solution to move my open tabs to OneTab. Especially on mobile the tab situation was extremely bad. When I realized that I had over 3000 (!!) tabs on my iPhone opened I acknowledge that I got to do something.

First I tried to just open the tabs in Firefox. When you rightclick a device on the "Synced Tabs" sidebar there is an "Open all tabs" entry. For 3000 tabs already my computer was already overloaded when opening them… Closing every other open program and removing every browser extension other then blockers also didn't do the trick. After some time the tabs seemed to be in an open state, but Firefox was not really responding. I tried closing the tabs via OneTab and also to save them all as bookmark via Bookmarks -> Bookmark all Tabs but that also didn't work.

@codebudo
codebudo / resize_gpu.cpp
Created July 30, 2019 04:54
OpenCV example resizing an image with CUDA GPU acceleration
#include <stdio.h>
#include <opencv2/opencv.hpp>
#include "opencv2/cudaimgproc.hpp"
using namespace cv;
int main(int argc, char** argv ) {
if ( argc != 2 ) {
printf("usage: resizegpu <Image_Path>\n");
return -1;
@ipan
ipan / su.sh
Created January 25, 2018 13:26
switch to non-login users such as www-data #su #linux
# www-data is non-login user
sudo su -l www-data -s '/bin/bash'