Skip to content

Instantly share code, notes, and snippets.

View JonathanReeve's full-sized avatar

Jonathan Reeve JonathanReeve

View GitHub Profile
@tsabat
tsabat / zsh.md
Last active October 16, 2024 14:43
Getting oh-my-zsh to work in Ubuntu
@jbpotonnier
jbpotonnier / hxt.markdown
Created February 24, 2012 14:18
Transform XML document using Haskell and XPath

I'm using HXT to transform a XML into another XML document. Selecting some nodes using XPath.

Here I want to collect all the authors in a new authors node.

Input document :

<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
    <book category="COOKING">
        <title lang="en">Everyday Italian</title>
@mgmartel
mgmartel / bp-sort-members-by-last-name.php
Last active October 16, 2024 19:39
Sort BuddyPress users by last name in the members directory. Updated for BP 1.7.
<?php
// Sort BuddyPress users by last name
//
// Use this Gist to sort members alphabetically by last name in the
// members directory. Follow the instructions below and drop the code
// in your functions.php or your functions plugin.
//
// Updated to work with BP 1.7. See earlier revisions of this gist for
// earlier versions of BP.
<?php
// Sort BuddyPress users by last name
//
// Use this Gist to sort members alphabetically by last name in the
// members directory. Follow the instructions below and drop the code
// in your functions.php or your functions plugin.
//
// Updated to work with BP 1.7. See earlier revisions of this gist for
// earlier versions of BP.

Spacemacs nix(os) mode

Problems:

  • Layers need system programs
  • Spacemacs does its own deterministic (but bad) package management
  • emacsWithPackages already exists in nixpkgs

API

Nixpkgs

;;; Patching Citar
;; Prerequisites
(require 'org)
(require 'ol-bibtex)
(require 'citeproc-bibtex)
(require 'citar)
;; Make org-bibtex work with biblatex fields, not needed for BibTeX
(setq org-bibtex-export-arbitrary-fields t