Skip to content

Instantly share code, notes, and snippets.

@eddking
eddking / Dockerfile
Last active August 29, 2015 14:24
Template for automating documentation
FROM ubuntu:14.04
# ---- Edit These ----
ENV DOCS_NAME=template
ENV DOCS_SOURCE=source
ENV DOCS_REMOTE=http://yoursite.com
# --------------------
# docs remote is used in the dash feed url, see build.sh
ENV DOCS_ROOT=/var/www
ENV DEBIAN_FRONTEND=noninteractive
@eddking
eddking / hash_ring.go
Last active August 29, 2015 14:07
A simple example of a hash ring using go.
import (
jump "github.com/anachronistic/jump-consistent-hash"
)
type Ring struct {
VirtualNodes uint64
RealNodes []string
Replication int32
}
@eddking
eddking / commands.vim
Last active November 16, 2022 02:13
Vim normal mode commands as a Unite.vim menu
let g:unite_source_menu_menus.commands.command_candidates = [
\['▷ record a macro q', 'normal q' ],
\['▷ move forward one word w', 'normal w' ],
\['▷ move to the end of the prev word e', 'normal e' ],
\['▷ replace the character underneath the cursor r', 'normal r' ],
\['▷ move forward till the next character typed t', 'normal t' ],
\['▷ yank/copy y', 'normal y' ],
\['▷ undo u', 'normal u' ],
\['▷ enter insert mode i', 'normal i' ],
\['▷ open a new line underneath the current li
@eddking
eddking / PresentationSamples.java
Created October 13, 2013 18:24
Sample usage code for a Rigel presentation at Semantico
package com.semantico.rigel;
import static com.semantico.rigel.transformers.CommonTransformers.*;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.solr.client.solrj.SolrQuery.ORDER;