Skip to content

Instantly share code, notes, and snippets.

@poppyschmo
poppyschmo / cmath_memaccess.patch
Last active July 17, 2019 08:43
Meta patch for AUR libgestures PKGBUILD, replaces math lib, demotes compiler error
diff --git a/PKGBUILD b/PKGBUILD
index 01a7f5e..0aec3d1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,9 +18,11 @@ source=("$_gitname::git+https://github.com/galliumos/libgestures.git")
md5sums=('SKIP')
prepare() {
- cp "$startdir"/finger_metrics_math.patch "$srcdir/$_gitname"
+ cp "$startdir"/cmath_everywhere.patch "$srcdir/$_gitname"
@poppyschmo
poppyschmo / cap_znc_self_message.pl
Created July 16, 2018 06:49
Request znc.in/self-message capability in irssi
use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
# Derived from: cap_sasl.pl and server_time.pl
# See also: https://irssi.org/NEWS/#v0-8-18
$VERSION = '0.1';
%IRSSI = (
authors => 'poppyschmo',
contact => 'poppyschmo@users.noreply.github.com',
@poppyschmo
poppyschmo / freenode_onion_cert_check.sh
Last active March 15, 2018 01:47
Validate and/or fingerprint the latest DV cert for Freenode's onion domain
#!/bin/sh
# License: Apache 2.0
# https://gist.github.com/poppyschmo/0fbebe98575dba747e3e70c491bedd34
#
# Validate the latest DV cert (for zettle.freenode.net) used by Freenode's
# onion domain, freenodeok2gncmy.onion. These certs are currently issued by
# Let's Encrypt and are good for three months but usually renewed early.
#
#
@poppyschmo
poppyschmo / immediate_interpreter_bool.patch
Created December 16, 2017 02:37
Band-aid for libgestures gcc -Wint-in-bool-context
diff --git a/src/immediate_interpreter.cc b/src/immediate_interpreter.cc
index 88a36c7..e7b0e2a 100644
--- a/src/immediate_interpreter.cc
+++ b/src/immediate_interpreter.cc
@@ -1409,7 +1409,7 @@ void ImmediateInterpreter::UpdateThumbState(const HardwareState& hwstate) {
float dist_sq = DistanceTravelledSq(fs, true, true);
float dt = hwstate.timestamp - origin_timestamps_[fs.tracking_id];
bool closer_to_origin = dist_sq <= thumb_dist_sq_thresh;
- bool slower_moved = (dist_sq * min_dt &&
+ bool slower_moved = (dist_sq * min_dt != 0 &&
@poppyschmo
poppyschmo / alacritty.spec
Last active October 13, 2017 08:38
Fedora RPM spec for alacritty
Name: alacritty
Summary: A cross-platform, GPU enhanced terminal emulator
License: ASL 2.0
Release: 2%{?dist}
%define git_owner jwilm
%define git_url https://github.com/%{git_owner}/%{name}
URL: %{git_url}
@poppyschmo
poppyschmo / glcompare
Last active October 12, 2017 04:29
Identify libglvnd files affected by the official Nvidia installer
Obsolete