Skip to content

Instantly share code, notes, and snippets.

View bokor's full-sized avatar

Brian Bokor bokor

  • Slack
  • San Jose, CA
View GitHub Profile
@raggi
raggi / v.zsh
Created May 29, 2012 17:04
Vim server per-directory
#!/usr/bin/env zsh
which -s vim > /dev/null && VIM=vim
which -s gvim > /dev/null && VIM=gvim
which -s mvim > /dev/null && VIM=mvim
[[ -e /Applications/MacVim.app/Contents/MacOS/Vim ]] && VIM="/Applications/MacVim.app/Contents/MacOS/Vim"
[[ -z "${VIM}" ]] && echo "No vim found" && exit 1
# Console vim just gets a straight pass through, as there's no quick way to
@raggi
raggi / encode_io.rb
Created May 9, 2012 19:35
csv generation, conversion, with utf16le - example
require 'iconv' unless "".respond_to?(:encode)
require 'active_support/basic_object'
# = EncodeIo
#
# This is essentially a basic delegation class. The reason it isn't
# using the delegate library from stdlib is that FasterCSV has special
# casing for io classes. In order to keep using this, we need #kind_of?
# and #class to pretend that this is the original class.
#