Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonathan Reeve JonathanReeve

View GitHub Profile
View spacemacs-nix-notes.org

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

View bp-sort-members-by-last-name.php
<?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.
@mgmartel
mgmartel / bp-sort-members-by-last-name.php
Last active Nov 30, 2020
Sort BuddyPress users by last name in the members directory. Updated for BP 1.7.
View bp-sort-members-by-last-name.php
<?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.
@jbpotonnier
jbpotonnier / hxt.markdown
Created Feb 24, 2012
Transform XML document using Haskell and XPath
View hxt.markdown

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>
@tsabat
tsabat / zsh.md
Last active Aug 1, 2021
Getting oh-my-zsh to work in Ubuntu
View zsh.md

Prereq:

apt-get install zsh
apt-get install git-core

Getting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh

wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh