Skip to content

Instantly share code, notes, and snippets.

View ar-nelson's full-sized avatar

Adam R. Nelson ar-nelson

View GitHub Profile
@ar-nelson
ar-nelson / dialog.js
Created August 30, 2013 06:09
node.js module that displays Zenity dialog boxes.
// zenity dialog box functions
// Adam R. Nelson
// August 2013
var spawn = require('child_process').spawn;
function appendSettings(args, settings) {
if (settings) {
if (settings.ok) {
args.push('--ok-label');
@ar-nelson
ar-nelson / figma-mouse-wheel.user.js
Created August 20, 2019 17:44
Greasemonkey script to fix slow Figma mouse wheel scrolling in Firefox on Linux
// ==UserScript==
// @name Figma Mouse Wheel Speed Fix
// @namespace https://adam.nels.onl
// @match https://www.figma.com/*
// @grant none
// ==/UserScript==
// Mouse wheel scrolling in Figma on Firefox + Linux is unbearably slow.
//
// This script catches all mouse wheel events on the main canvas,
@ar-nelson
ar-nelson / SIP.hs
Last active March 21, 2022 19:31
SIP hash in pure Haskell
{-# LANGUAGE UnicodeSyntax #-}
-- SIP hash in pure Haskell
-- Original C reference implementation taken from (github.com/veorq/SipHash)
-- Translated to Haskell by Adam R. Nelson (github.com/ar-nelson)
--------------------------------------------------------------------------------
module Data.Digest.SIP(sipHash) where
import Control.Monad