Skip to content

Instantly share code, notes, and snippets.

View johthor's full-sized avatar

Johannes Thorn johthor

View GitHub Profile
@ericbn
ericbn / .vimrc
Last active March 31, 2024 10:39
Vim Powerline-like status line without the need of any plugin
" Statusline (requires Powerline font)
set statusline=
set statusline+=%(%{&buflisted?bufnr('%'):''}\ \ %)
set statusline+=%< " Truncate line here
set statusline+=%f\ " File path, as typed or relative to current directory
set statusline+=%{&modified?'+\ ':''}
set statusline+=%{&readonly?'\ ':''}
set statusline+=%= " Separation point between left and right aligned items
set statusline+=\ %{&filetype!=#''?&filetype:'none'}
set statusline+=%(\ %{(&bomb\|\|&fileencoding!~#'^$\\\|utf-8'?'\ '.&fileencoding.(&bomb?'-bom':''):'')
@runjak
runjak / Tree.hs
Created February 28, 2017 21:56
Example Haskell code on using pattern matching. Mostly comments. Also a Tree type is defined and stuff is done with it.
module Tree where
{-
This is code for a Haskell module named `Tree`.
You're currently reading a comment block in it.
Below this comment we define a data type called `Tree`.
It has two constructors, named `Leaf` and `Branch`.
The `Leaf` constructor takes one argument, which must be of type `Int`.
@dirx
dirx / domain-story.puml
Last active April 7, 2021 18:13
Plantuml Domain Story Test
' based on https://github.com/johthor/DomainStory-PlantUML
' Styling
' ##################################
!global $iconColor = "#333333"
!global $iconScale = "0.8"
!global $iconScaleActor = "1"
!global $stepColor = "#cccccc"