Skip to content

Instantly share code, notes, and snippets.

View henninb's full-sized avatar
😀

Brian Henning henninb

😀
View GitHub Profile
@henninb
henninb / keybase.md
Last active February 16, 2020 17:36

Keybase proof

I hereby claim:

  • I am bitexplorer on github.
  • I am henninb (https://keybase.io/henninb) on keybase.
  • I have a public key ASDZ8rGBtA3DWIb8NVySYr-lYNRD8MzdUrgrRaFQ52DvCAo

To claim this, I am signing this object:

@henninb
henninb / xmonad.hs
Created August 8, 2021 13:10
subset of my xmonad config - trying to perform a greedyView with shift
--viewShift :: WorkspaceId -> Query (Endo (W.StackSet WorkspaceId l Window ScreenId sd))
--viewShift = doF . liftM2 (.) W.greedyView W.shift
keybinds :: XConfig Layout -> [((KeyMask, KeySym), NamedActions.NamedAction)]
keybinds conf = let
subKeys str ks = NamedActions.subtitle str : mkNamedKeymap conf ks
wsKeys = map show ([1..9] ++ [0] :: [Int])
zipM m nm ks as f = zipWith (\k d -> (m ++ k, NamedActions.addName nm $ f d)) ks as
zipM' m nm ks as f b = zipWith(\k d -> (m ++ k, NamedActions.addName nm $ f d b)) ks as
in
@henninb
henninb / xmonad.hs
Created August 9, 2021 10:55
xmonad - name the submap keys
import qualified XMonad.Util.NamedActions as NamedActions
import qualified Data.Map as M
keybinds :: XConfig Layout -> [((KeyMask, KeySym), NamedActions.NamedAction)]
keybinds conf = let
subKeys str ks = NamedActions.subtitle str : mkNamedKeymap conf ks
in
subKeys "Scratchpads"
[
("M-S-o", NamedActions.addName "submap" $ submap . M.fromList $
@henninb
henninb / File.kt
Last active August 16, 2021 18:20
kotlin enum with jooq
data class Transaction(
@JsonProperty
var transactionId: Long,
@JsonProperty
var guid: String,
@JsonProperty
var accountId: Long,
@henninb
henninb / groovy
Last active August 31, 2021 04:33
Jooq.groovy
Field TOTALS_DEBITS = dslContext.select(DSL.coalesce(DSL.sum(T_TRANSACTION.AMOUNT), 0.0).as("debits"))
.from(T_TRANSACTION)
.where(T_TRANSACTION.ACTIVE_STATUS.eq(true) & T_TRANSACTION.ACCOUNT_TYPE.eq("debit")).asField()
Field TOTALS_CREDITS = dslContext.select(DSL.coalesce(DSL.sum(T_TRANSACTION.AMOUNT), 0.0).as("credits"))
.from(T_TRANSACTION)
.where(T_TRANSACTION.ACTIVE_STATUS.eq(true) & T_TRANSACTION.ACCOUNT_TYPE.eq("credit")).asField()
return dslContext.select((TOTALS_DEBITS - TOTALS_CREDITS).as("totals"))