Skip to content

Instantly share code, notes, and snippets.

#01 - #collectivenouns

Do any of you use Twitter? [pause] If you feel inspired during this talk, please feel free to coin your own venereal terms by tweeting something like "a bunch of somethings" with the #collectivenouns hashtag. You'll find out why presently.

#02 - Etymology of venery

From Venus, the goddess of love and beauty, we get the Latin root ven,

<!DOCTYPE HTML>
<html>
<head>
<title>Pecha Kucha</title>
</head>
<body>
<div id="nav">
<ol>
</ol>
</div>
# OS ?= LINUX
#OS ?= WINDOWS
OS ?= MACOSX
#OS ?= BSD
ifeq ($(OS), LINUX) # also works on FreeBSD
CC ?= gcc
CFLAGS ?= -O2 -Wall
teensy_loader_cli: teensy_loader_cli.c
$(CC) $(CFLAGS) -s -DUSE_LIBUSB -o teensy_loader_cli teensy_loader_cli.c -lusb
@nelstrom
nelstrom / plover-nkro-on-ergodox.md
Last active April 2, 2024 20:18
Instructions on how to get a Plover keymap working with NKRO on ErgoDox keyboard.

[Plover][] is an awesome open source stenography program, but to run the software [you need an NKRO keyboard][nkro]. The [ErgoDox keyboard][ergodox] can be made to run in NKRO mode by following these steps.

Install dependencies

These instructions are based on this document, which assumes you're using Windows. I'm using a mac, and I had to download and install the [CrossPack for AVR Development][crosspack] before the build process worked.

Download the source

The NKRO firmware and Plover keymap can be found in the simon_layout branch of @shayneholmes fork of tmk_keyboard. Get the source:

@nelstrom
nelstrom / nose-errorformat.vim
Created February 26, 2014 10:26
An attempt at writing an errorformat for output from the nose test runner.
let &makeprg="cat nose.txt"
let &errorformat="%E%f line %l in test_foo,"
let &errorformat.="%C%m,"
let &errorformat.="%Z"
make!
copen
@nelstrom
nelstrom / format-html-with-pandoc.vim
Created February 18, 2014 18:00
An autocommand to set up pandoc to reformat HTML with Vim's `gq{operator}` command.
function! FormatprgLocal(filter)
if !empty(v:char)
return 1
else
let l:command = v:lnum.','.(v:lnum+v:count-1).'!'.a:filter
echo l:command
execute l:command
endif
endfunction
@nelstrom
nelstrom / stitch-word.vim
Created February 5, 2014 09:18
A Vim function to transform words to "stitch words", e.g. "Seattle" becomes "S-e-a-t-t-l-e"
function! StitchWord(word)
let word = substitute(a:word, '\v(\w)', '\1-', 'g')
let word = substitute(word, '\v(\w)-$', '\1', 'g')
return word
endfunction
inoremap <c-x>- <c-o>ciw<C-r>=StitchWord(@@)<CR>
<root>
<devicevendordef>
<vendorname>FILCO</vendorname>
<vendorid>0x04d9</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>MAJESTOUCH_TENKEYLESS</productname>
<productid>0x1818</productid>
</deviceproductdef>
<item>

Download the inspect-registers.vim file from this gist. Open the file in Vim, launching with no vimrc:

vim -Nu NONE inspect-registers.vim

Source the file:

:source %

Insert text on line one:

@nelstrom
nelstrom / getting-vim-with-clipboard-support.md
Created November 14, 2013 23:04
Original draft of [Getting Vim with `+clipboard` support](http://vimcasts.org/blog/2013/11/getting-vim-with-clipboard-support/). Shows what I know!

On OS X

On OS X Mavericks, Apple ships Vim version 7.3 with -clipboard. Here's the gist from running [/usr/bin/vim --version on Mavericks][10.9] (and [the same on Mountain Lion][10.8]). Shame on you Apple!

If you [use Homebrew][brew.sh], you can get Vim with +clipboard by running:

brew install vim

Here's a gist from running [/usr/local/bin/vim --version][brew].