Skip to content

Instantly share code, notes, and snippets.

View blais's full-sized avatar
:octocat:
Definitely not working from home

Martin Blais blais

:octocat:
Definitely not working from home
View GitHub Profile
@blais
blais / gist.el
Created September 20, 2010 04:45
(when (not token)
(setq token (read-string "GitHub API token: "))
(github-set-config "token" token))
;; FIXME: This is missing from the stdlib.
(defn split-extension [filename]
(let [index (.lastIndexOf filename ".")]
(list (.substring filename 0 index) (.substring filename index))))
(defn get-basename [filename]
(let [index (.lastIndexOf filename ".")]
(.substring filename 0 index)))
(defn get-extension [filename]
@blais
blais / apt-tree
Last active July 7, 2023 03:22
apt-tree
#!/usr/bin/env python3
"""Display a graph of dependencies between Ubuntu packages.
Reads a list of packages from either a file or stdin.
Outputs a PDF.
"""
__author__ = "Martin Blais <blais@furius.ca>"
import argparse
import logging
import random