Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# A small bash wrapper to kaniko with a few assumptions built in.
set -euo pipefail
cache_repo=$(echo "$destination" | cut -d : -f 1)-cache
hmaurer /
Created Mar 2, 2021 — forked from jocki84/
scrollIntoViewIfNeeded 4 everyone!!!

Polyfill for scrollIntoViewIfNeeded()

This gist provides polyfill code for the [scrollIntoViewIfNeeded()][SIVIN] Element method found on WebKit browsers.


There is no particular requirement on the position in the hierarchy of the

View MouseSafeArea.ts
import * as React from "react";
import { useMousePosition } from "~/hooks/useMousePosition";
/** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */
export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) {
const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {};
const [mouseX, mouseY] = useMousePosition();
const positions = { x, y, h, w, mouseX, mouseY };
return (
hmaurer / main.ts
Last active Aug 9, 2020
Simple Deno HTTP server for Nix
View main.ts
import { serve } from "";
const s = serve({ port: 80 });
for await (const req of s) {
if (req.url !== "/") {
req.respond({ status: 404 });
const body = new TextEncoder().encode(
"Hello World from Deno on Nix (via Gist)"
hmaurer / NixOverlays.hs
Created Aug 8, 2020 — forked from pwm/NixOverlays.hs
Nix Overlays in Haskell
View NixOverlays.hs
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
module NixOverlays where
import Data.Foldable (foldl')
import Data.Function (fix)
import qualified Data.HashMap.Lazy as HMap
View mixed-router.cljs
[fulcro-css.css :as css]
[fulcro.client.dom :as dom :refer [div]]
[fulcro.client.mutations :as m]
[fulcro.client.primitives :as prim :refer [defsc]]
[fulcro.client.routing :as r :refer [defsc-router]]
[fulcro.incubator.ui-state-machines :as uism :refer-macros [defstatemachine]]
[fulcro.ui.form-state :as fs]
[taoensso.timbre :as log]

Haskell, Stack and Intellij IDEA IDE setup tutorial how to get started

Upon completion you will have a sane, productive Haskell environment adhering to best practices.


  • Haskell is a programming language.
  • Stack is tool for Haskell projects. (similar tools for other languages include Maven, Gradle, npm, RubyGems etc)
  • Intellij IDEA IDE is a popular IDE.

Install required libraries

sudo apt-get install libtinfo-dev libghc-zlib-dev libghc-zlib-bindings-dev

hmaurer / keys_plus.cljc
Created Oct 22, 2018 — forked from favila/keys_plus.cljc
s/keys+, an s/keys variant that allows inline respec-ing of a key to narrow the range of its type
View keys_plus.cljc
(ns com.breezeehr.specs.keys-plus
"Variants of clojure.spec/keys and keys* that allow additional inline spec-ing."
(:refer-clojure :exclude [keys])
(:require [clojure.core :as c]
[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.walk :as walk])
#?(:cljs (:require-macros [com.breezeehr.specs.keys-plus]))
#?(:clj (:import (java.util UUID))))
View gist:5931e4cf1955a537b8f817b073fcebc3
name: hello-haskell-serverless
github: "githubuser/hello-haskell-serverless"
license: BSD3
author: "Author name here"
maintainer: ""
copyright: "2018 Author name here"
hmaurer / 0 -
Created Aug 4, 2018 — forked from sundarj/0 -
data: towards enlightenment
View 0 -


towards enlightenment

‘It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.’