Skip to content

Instantly share code, notes, and snippets.

@probonopd
probonopd / Wayland.md
Last active July 22, 2024 21:24
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

@mafredri
mafredri / rm-backup.sh
Last active June 7, 2024 12:56
Scripts for the reMarkable tablet (backup and factory reset)
# Creates remarkable_backup-(date).tar.gz with todays date, backs up /home/root.
(
ssh root@10.11.99.1 'tar cf - .' \
| gzip >remarkable_backup-$(date '+%Y-%m-%d').tar.gz
) 2 >err.log
cat err.log
@veekaybee
veekaybee / wholesome-data-science.md
Last active August 16, 2019 06:40
Wholesome data science.

Wholesome Data Science

Data science has a really bad reputation recently. Between Facebook's privacy violations , facial scanning at kiosks in restaurants, and racism in algorithms, there are a lot of cases where surveillance, invasion of privacy, and unethical algorithms are dominating the news.

These cases are really important to make public, study, and prevent. But it's just as important to collect examples of good use cases of data science (that are not hyperbolized or PR fluff) so we can focus on those as an industry, and learn about what makes them work, as well.

Have some? Make some? Feel free to leave a comment or edit.

Examples

@wyatt8740
wyatt8740 / update-gtk3.sh
Created April 2, 2017 21:42
Downloads latest debian GTK3 source, patches to fix annoyances, and compiles.
#! /bin/bash
# for this to work correctly, make an empty directory and put this shellscript inside it, along with the patch 'gtk3_make_filechooser_not_suck.patch'.
# Running this in a directory with a previous gtk source tree or any other files or directories may make this script behave unexpectedly!
# the patch file is found at:
# https://gist.github.com/wyatt8740/ae82550264564e2bba49b58d3e07f0f5.
# raw patch file (direct link):
# https://gist.github.com/wyatt8740/ae82550264564e2bba49b58d3e07f0f5/raw/bc5bc32d15e852ba92a8b0b710e01960c371ba8b/gtk3_make_filechooser_not_suck.patch
@raineorshine
raineorshine / human-readable-hash-comparisons.md
Last active July 21, 2024 20:31
An aesthetic comparison of a few human-readable hashing functions.

An Aesthetic Comparison of Human-Readable
Hashing Functions

The following compares the output of several creative hash functions designed for human readability.

sha1's are merely used as arbitrary, longer, distributed input values.

input 1 word output 2 word output 3 word output
diff -x '*.html' -x '*.png' -a -r -u a/gtk+-3.22.7/gtk/gtkfilechooserwidget.c b/gtk+-3.22.7/gtk/gtkfilechooserwidget.c
--- a/gtk+-3.22.7/gtk/gtkfilechooserwidget.c 2016-12-30 09:55:56.000000000 -0500
+++ b/gtk+-3.22.7/gtk/gtkfilechooserwidget.c 2017-01-25 19:38:43.000000000 -0500
@@ -2420,7 +2420,10 @@
gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN;
get_selection_modifiers (widget, event, &modify, &extend);
- if (!is_touchscreen &&
+ /* Ubuntu, disable the new behaviour of opening sometime on single click
+ it's confusing for users and the change had no rational
@iwillspeak
iwillspeak / Cargo.toml
Created September 3, 2016 17:49
Simple Pratt-style Parsing in Rust
[package]
name = "parsetest"
version = "0.1.0"
authors = ["Will Speak <lithiumflame@gmail.com>"]
[dependencies]
[[bin]]
name = "parsetest"
path = "main.rs"
@esrever10
esrever10 / gs.sh
Last active February 7, 2024 10:26
gstreamer send and receive h264 rtp stream
# linux send h264 rtp stream:
gst-launch-1.0 -v ximagesrc ! video/x-raw,framerate=20/1 ! videoscale ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! udpsink host=127.0.0.1 port=5000
# Macos send h264 rtp stream:
gst-launch-1.0 -v avfvideosrc capture-screen=true ! video/x-raw,framerate=20/1 ! videoscale ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! udpsink host=127.0.0.1 port=5000
# receive h264 rtp stream:
gst-launch-1.0 -v udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! autovideosink
@gwpl
gwpl / clean.sh
Last active May 24, 2024 01:42
`openssl pkeyutl` how to: -sign -verify -encrypt -decrypt , using openssh keys snippets/examples
rm -v pub.pkcs8 test.sign test.txt.decrypted test.txt.encrypted