Skip to content

Instantly share code, notes, and snippets.

@fmthoma
fmthoma / Voronoi.hs
Created November 12, 2018 08:32
Voronoi Diagrams
{-# LANGUAGE RecordWildCards #-}
import Control.Applicative (liftA2)
import Control.Monad (replicateM)
import Data.Foldable (for_)
import Data.List (find, foldl')
import Data.Maybe (mapMaybe)
import Prelude hiding ((**))
import System.Environment (getArgs)
import System.Random (randomRIO)
@fmthoma
fmthoma / gdb.log
Created May 25, 2018 11:41
KPL performance logs
This file has been truncated, but you can view the full file.
[New LWP 9677]
[New LWP 9678]
[New LWP 9679]
[New LWP 9680]
[New LWP 9681]
[New LWP 9682]
[New LWP 9683]
[New LWP 9684]
[New LWP 9685]
[New LWP 9686]
> eta-pkg dump
name: template-haskell
version: 2.11.1.0
id: template-haskell-2.11.1.0-H3p2esrX1TJFAuLx2Xvq6P
key: template-haskell-2.11.1.0-H3p2esrX1TJFAuLx2Xvq6P
license: BSD3
maintainer: libraries@haskell.org
synopsis: Support library for Template Haskell
description:
This package provides modules containing facilities for manipulating

Keybase proof

I hereby claim:

  • I am fmthoma on github.
  • I am fmthoma (https://keybase.io/fmthoma) on keybase.
  • I have a public key whose fingerprint is 4635 7ACA 3737 9F9B B084 FD40 EE9F F238 0568 D95E

To claim this, I am signing this object:

@fmthoma
fmthoma / w3m_resizing.patch
Created December 19, 2015 21:01
Fix semi-transparent artifacts in w3m-img when used with 32-bit color (e.g. urxvt)
diff --git a/w3mimg/x11/x11_w3mimg.c b/w3mimg/x11/x11_w3mimg.c
index d24213e..c534393 100644
--- a/w3mimg/x11/x11_w3mimg.c
+++ b/w3mimg/x11/x11_w3mimg.c
@@ -378,6 +378,10 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
w = imlib_image_get_width();
if (h <= 0)
h = imlib_image_get_height();
+
+ im = imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), w, h);
diff --git a/src/rxvtfont.C b/src/rxvtfont.C
index 4b266bd..99130fa 100644
--- a/src/rxvtfont.C
+++ b/src/rxvtfont.C
@@ -1326,31 +1326,7 @@ bool
rxvt_font_xft::has_char (unicode_t unicode, const rxvt_fontprop *prop, bool &careful) const
{
careful = false;
-
- if (!XftCharExists (term->dpy, f, unicode))