Skip to content

Instantly share code, notes, and snippets.

@ober
ober / *scratch*.el
Created March 9, 2013 23:14 — forked from nicferrier/bind-path.el
Thinatra!
(let ((pattern "/one/:one/:two")
(path "/one/x/y"))
(let* ((lst (split-string pattern "/" t))
(patlst
(let ((i 0))
(loop for part in lst
if (string-match-p "^:.*" part)
collect (cons i (intern (substring part 1)))
do (setq i (+ 1 i)))))
@ober
ober / gather_installed.py
Last active August 29, 2015 14:25 — forked from halberom/01_gather_installed.py
ansible - example of custom module to gather info on installed packages
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# only works on RedHat family
import rpm
def _check_installed(module):
ts = rpm.TransactionSet()
mi = ts.dbMatch()
@ober
ober / ql-tools.lisp
Created April 26, 2016 15:08 — forked from bhyde/ql-tools.lisp
A few things for playing with quicklisp metadata. Note that this reveals assorted things that make life interesting; so use 'em in a clean discardable session. Probably ccl only.
(in-package #:cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload "cl-ppcre")
(ql:quickload "optima")
(ql:quickload "optima.ppcre")
(use-package '#:optima)
(use-package '#:optima.ppcre))
(defun ensure-all-system-are-downloaded ()