Skip to content

Instantly share code, notes, and snippets.

MicahElliott / zbell-long-cmd.zsh
Last active Apr 29, 2021
Sound a bell when long-running commands complete
View zbell-long-cmd.zsh
# Original:
# Add to zplug:
# zplug MicahElliott/97df9ca799e49c0fcc0a981bf021f813, from:gist, as:plugin, use:zbell-long-cmd.zsh
# brew install terminal-notifier
# only do this if we're in an interactive shell
[[ -o interactive ]] || return

Keybase proof

I hereby claim:

  • I am MicahElliott on github.
  • I am micahelliott ( on keybase.
  • I have a public key whose fingerprint is D75C 9C88 9D93 8635 14F3 95F2 C8D4 2FB3 299C 28F0

To claim this, I am signing this object:

View ruby-ossl_pkey_ec.c.diff
--- ruby-1.8.7-p374/ext/openssl/ossl_pkey_ec.c 2010-06-21 05:18:59.000000000 -0400
+++ ruby-1.8.7-p374/ext/openssl/ 2014-02-09 19:21:24.635060547 -0500
@@ -757,8 +757,10 @@
method = EC_GFp_mont_method();
} else if (id == s_GFp_nist) {
method = EC_GFp_nist_method();
+#if !defined(OPENSSL_NO_EC2M)
} else if (id == s_GF2m_simple) {
method = EC_GF2m_simple_method();
MicahElliott /
Last active Dec 22, 2015
I Get Around (a Zsh overview of the chdir family)

I Get Around

We all know how to use cd (aka chdir). It’s probably the first command you ever learned. Or maybe that was ls. Anyway, when paired with some cousins (pushd, popd, dirs, cdpath, chpwd) it’s a lot more capable than you may have realized.

Useful Aliases

I find it tedious to type out all the family (“cd-fam” henceforth) of navigation commands in full length, so let’s start by slimming down – we’re

MicahElliott /
Created Jul 10, 2013
Set up local dictionary search on ArchLinux

Install the dictionary.

% pacman -S words

Make it convenient.

% alias g='grep --color=always --perl-regexp'
% export dict=/usr/share/dict/american-english

Use it.

MicahElliott / clj-fold.vim
Created Jul 4, 2012 — forked from dakrone/gist:519858
Automagic Clojure folding on defns and defmacros
View clj-fold.vim
" ---------------------------------------------------------------------------
" Automagic Clojure folding on defn's and defmacro's
" Blog post:
function GetClojureFold()
if getline(v:lnum) =~ '^\s*(defn.*\s'
return ">1"
elseif getline(v:lnum) =~ '^\s*(def\(macro\|method\|page\|partial\).*\s'
return ">1"
MicahElliott /
Created Jul 4, 2012
Configure vim in arch linux for python runtime support

Steps to upgrade vim in arch linux for python runtime support

Python support is needed by vim in order to run things like Conque and Slimv. Arch keeps vim slim by only providing Python support in gvim. But you may prefer vim to gvim, so here's what's needed.

More ABS info.

# Install and run abs (sync)
sudo pacman -S abs
MicahElliott /
Created Apr 17, 2012
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.
aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev
MicahElliott /
Created Apr 9, 2012
Installing an unhosted jar dependency (though clojure source on github)

Installing an unhosted jar dependency (though source on github)

In this example I'm setting up doc-test with lein for a new project.

Create a new project.

% lein new my-proj
% cd my-proj