Skip to content

Instantly share code, notes, and snippets.

This agreement is based on the Apache Software Foundation Contributor License Agreement. (v r190612)

Thank you for your interest in software projects stewarded by Chaordic GmbH (“Chaordic”). In order to clarify the intellectual property license granted with Contributions from any person or entity, Chaordic must have a Contributor License Agreement (CLA) on file that has been agreed to by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Chaordic and its users; it does not change your rights to use your own Contributions for any other purpose. This Agreement allows an individual to contribute to Chaordic on that individual’s own behalf, or an entity (the “Corporation”) to submit Contributions to Chaordic, to authorize Contributions submitted by its designated employees to Chaordic, and to grant copyright and patent licenses thereto.

You accept and agree to the following terms and conditions for Your present and

@wfaler
wfaler / home.nix
Last active April 13, 2021 19:59
Home manager setup
{ config, pkgs, ... }:
{
nixpkgs.overlays = [ (self: super: {
jre = super.jdk11;
}) ];
nixpkgs.config.allowUnfree = true;
home.packages = [
pkgs.kubectl
@wfaler
wfaler / fix bt audio on mac
Last active August 7, 2019 08:05
Fixes stuttering bt on mac.
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 80
@wfaler
wfaler / xmonad.hs
Created June 26, 2018 06:30
xmonad for ultra-wide screen
import XMonad
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.DynamicLog
import Control.Monad
import qualified Data.Map as M
import Graphics.X11.Xlib
import XMonad.Prompt
@wfaler
wfaler / prepend-test.scala
Last active June 29, 2017 09:13
Finding out type of prepend.Out
case class Record[A](userId: UUID, createdAt: LocalDateTime, version: Long, data: A)
type MetaData = UUID :: LocalDateTime :: Long :: HNil
def length[R <: HList](record: Record[A])
(implicit gen: Generic.Aux[A, R],
prepend: Prepend[R, MetaData]) = {
val data = gen.to(record.data)
val meta = record.userId :: record.createdAt :: record.version :: HNil
{
"campaign": "My first NPS campaign",
"contacts": [{
"email": "johndoe@foobar.com",
"name": "John Doe",
"extra-field": "other data"
}]
}
@wfaler
wfaler / init.el
Last active December 17, 2018 12:11
Latest init.el, updated for Haskell and engine
(require 'package)
(setq package-list '(markdown-mode
yaml-mode
rjsx-mode
elm-mode
typescript-mode
json-mode
dhall-mode
php-mode
@wfaler
wfaler / wille-faler.asc
Created November 4, 2016 09:50
My GPG Public key - consider this one verification
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQINBFgbKMgBEAC0ptVBL0wgM6/gf9jR7yKQ0HMgr+qk41f2HQh8SFDVqeK3c3ic
hBxqf1xMT5rUAlkE+IW3OgbQC+Oeun9+J1a9xU6T5r0o8cdZ7fEs6EL8B5qQh+pH
GCbNcqtLqOnJVh+ebDFPjLz4pubmchRVKU+po9NccbBFKjjGufzNnQP7R0RDncFq
kFlE8rk72YFB6HO2Qg/9tdGV6aBaiYhCu0x+fbER1Gi3MUu+gh9bEkouXNSdHUL+
fjhf3tYVrsUGFT+CwdvYzaS/X4+pEF8ktxa2ppUncsTI/kDvx6IhC5bDbH0WRp21
XWkUMSx/IpZPhMy1lLCEzQAatxSwNmTuayG49Plvqq7L4ACeCBKUSR3miMn4cAxD
U9Hh/PrssTa3XMd7pfChMKwzoqO9EFeD8SR19XzUIv2/Za92eqIgqgZyLeiVBvcG
case class Foo(bar: String, baz: Int, quux: Boolean)
import shapeless._, labelled.FieldType, record._
trait ToLabels[L <: HList] {
def apply(l: L): List[String]
}
trait LowPriorityToLabels {
implicit def hconsToLabels[K <: Symbol, V, T <: HList](implicit
@wfaler
wfaler / init.el
Last active February 8, 2016 21:32
my current ~/.emacs.d/init.el
(require 'package)
(setq package-list '(markdown-mode
yaml-mode
js2-mode
jsx-mode
find-file-in-project
auto-complete
nix-mode
dockerfile-mode
scala-mode2