Skip to content

Instantly share code, notes, and snippets.

View christoph-frick's full-sized avatar

Christoph Frick christoph-frick

View GitHub Profile
@christoph-frick
christoph-frick / SteamLinux.groovy
Created December 6, 2017 21:29
Helper to create a pull request for SteamLinux
import groovy.json.*
def rootbranch = "upstream/master"
def jsonFile = "GAMES.json" as File
def id = args[0]
["git", "checkout", "-b", id, rootbranch].execute()
@christoph-frick
christoph-frick / Awesome-Fennel.md
Last active March 5, 2025 19:06
Use fennel to write the awesome-wm config

How to write an awesome-wm config with Fennel

Awesome-WM is a X11 window manager, that is configured via Lua. Fennel is a Lisp for Lua. This shows a general setup of how to write your awesome-wm config using fennel directly without the compilation step (which would also work, but is not needed).

General setup

Fetch a recent Fennel version (the

@christoph-frick
christoph-frick / .vimrc
Last active April 8, 2019 10:18
.vimrc for use with Fennel
call plug#begin('~/.vim/plugged')
" ...
Plug 'guns/vim-sexp', {'for': ['fennel']}
Plug 'tpope/vim-sexp-mappings-for-regular-people', {'for': ['fennel']}
Plug 'kovisoft/paredit', {'for': ['fennel']}
Plug 'bakpakin/fennel.vim', {'for': 'fennel'}
" ...
call plug#end()
let g:sexp_enable_insert_mode_mappings = 0
@christoph-frick
christoph-frick / .vimrc
Last active June 25, 2019 07:32
Vim Clojure setup
call plug#begin('~/.vim/plugged')
" ...
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-projectionist'
Plug 'guns/vim-sexp', {'for': ['clojure', 'fennel']}
Plug 'guns/vim-slamhound', {'for': 'clojure'}
Plug 'tpope/vim-sexp-mappings-for-regular-people', {'for': ['clojure', 'fennel']}
Plug 'tpope/vim-salve', {'for': 'clojure'}
Plug 'kovisoft/paredit', {'for': ['clojure', 'fennel']}
Plug 'tpope/vim-fireplace', {'for': 'clojure'}
; clj -Sdeps '{:deps {org.jsoup/jsoup {:mvn/version "1.13.1"}}}'
; Clojure 1.10.1
(import 'org.jsoup.Jsoup)
; org.jsoup.Jsoup
(def soup (Jsoup/parse "<html><head><title>Website title</title></head>
<body><p>Sample paragraph number 1 </p>
<p>Sample paragraph number 2</p>
</body></html>"))
; #'user/soup
(.getElementsByTag soup "p")
@christoph-frick
christoph-frick / ics2pal.groovy
Created September 1, 2021 14:15
Convert ICS to PAL
@Grapes([
@Grab('org.slf4j:slf4j-simple:1.7.32'),
@Grab('org.mnode.ical4j:ical4j:3.1.0'),
])
import net.fortuna.ical4j.data.CalendarBuilder
import net.fortuna.ical4j.model.Component
import net.fortuna.ical4j.model.Property
import net.fortuna.ical4j.model.component.CalendarComponent
import net.fortuna.ical4j.model.property.DateProperty