Skip to content

Instantly share code, notes, and snippets.

Avatar

brandon s allbery kf8nh geekosaur

View GitHub Profile
View rotaerk xmonad.hs
import System.IO
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run (spawnPipe)
import XMonad.Util.EZConfig (additionalKeys)
main = do
xmproc <- spawnPipe "xmobar"
xmonad $ docks
@geekosaur
geekosaur / dcss-er?
Created Aug 4, 2019
I thought this wasn't supposed to be possible
View dcss-er?
This is Dungeon Crawl Stone Soup 0.24-a0-528-g98e85ec62a
Game seed: 14789942687155141024
Welcome, zvx the Gargoyle Fighter.
The bosom of this dungeon contains the fabled artefact, the Orb of Zot.
Press ? for a list of commands and other information.
Found a scroll labeled NUQ SEBLE and a robe.
Found a staircase leading out of the dungeon.
A jackal and a giant cockroach come into view.
There is a staircase leading out of the dungeon here.
View gist:9fd2dbe0caba9fdfbcc85c7c70e81366
, ((0 .|. modMask, xK_question), windows $ W.greedyView "1")
, ((shiftMask .|. modMask, xK_question), windows $ W.shift "1")
@geekosaur
geekosaur / lc.txt
Created Jan 20, 2019
lambda calculus example - DukeDrake
View lc.txt
(\g.\f.\x. g f (f x)) (\f.\x. x)
(\g. \f0. \x0. g f0 (f0 x0)) (\f1. \x1. x1) -- alpha rename to avoid collisions
\f0. \x0. (\f1. \x1. x1) f0 (f0 x0) -- apply parameter for g
g = (\f1. \x1. x1)
\f0. \x0. f0 x0 -- apply parameters to inner lambda and reduce
f1 = f0
x1 = f0 x0
View gist:d01d5b391acef62146e5936652a79ad5
mylayoutHook = avoidStruts $
layoutHook defaultConfig |||
Accordion |||
Grid |||
simpleTabbed |||
Circle |||
spiral (6/7) |||
ThreeCol 1 (3/100) (1/2) |||
ThreeColMid 1 (3/100) (1/2) |||
(...)
View .crawlrc
tile_full_screen = true
show_player_species = true
# See options_guide.txt for the options
# cset, feature, mon_glyph, item_glyph
display_char += explosion : x263c
display_char += cloud : x2637
# @@@ use feature to customize per god?
display_char += altar : x1030e
display_char += fired_zap : x26a1
View gist:d43f36b141053eff9a663671acba87b3
scratchpads :: NamedScratchpads
scratchpads = [ NS "scratchpad" scratchpad (role =? "scratchpad") nonFloating
, NS "volume" "pavucontrol" (className =? "Pavucontrol") nonFloating
]
where
scratchpad = "urxvt -r scratchpad"
View gist:99056f658fdd6ab6e5c8cf9f889cab05
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import System.IO
main = do
xmproc <- spawnPipe "xmobar"
xmonad $ docks defaultConfig
{logHook = dynamicLogWithPP $ xmobarPP
@geekosaur
geekosaur / xmonad.hs
Created Dec 16, 2017
Gratin xmonad.hs
View xmonad.hs
import XMonad
import qualified XMonad.StackSet as W
import XMonad.Util.EZConfig
import XMonad.Hooks.SetWMName
import Data.Bits ((.|.))
import System.Exit (exitSuccess)
main = xmonad $ defaultConfig {
terminal = "xfce4-terminal",
modMask = mod4Mask,
View histogrammed unicode names
commands to create histogram data set:
perl6 -e '.put for (^0x10ffff).map(&uniname)' | sort -u | sed '/^</s/ /_/g' | tr ' ' '\n' | sort | uniq -c | sort -k1nr,1 > hist.ucs
awk -F\; '$0 != "" && !/^#/ {print $2}' NameAliases.txt | tr ' ' '\n' | sort | uniq -c | grep -v '/^$/' | sort -k1nr,1 > hist.alias
awk '{w[$2] += $1} END {for (s in w) {print w[s] "\t" s}}' hist.alias hist.ucs | sort -k1nr,1 >hist.all
command to compute packing:
awk '{t += $1} n < 183 && $2 !~ /^.$/ {c += $1; n++} $1 == 1 {s++} $2 ~ /^.$/ {u += $1} END {print "tot", t, "cpr", c, "sing", s, "chr", u}' hist.all
output:
tot 120240 cpr 72165 sing 9571 chr 4133