Skip to content

Instantly share code, notes, and snippets.

View MicahElliott's full-sized avatar

Micah Elliott MicahElliott

View GitHub Profile
=begin
endless.rb is a pre-processor for ruby which allows you to use python-ish
indentation to delimit scopes, instead of having to type 'end' every time.
Basically, this makes the end keyword optional. If you leave off the
end, the preprocessor inserts an end for you at the next line indented
at or below the level of indentation of the line which started the scope.
End is optional, so you can still write things like this:
begin
" ---------------------------------------------------------------------------
" Automagic Clojure folding on defn's and defmacro's
"
function GetClojureFold()
if getline(v:lnum) =~ '^\s*(defn.*\s'
return ">1"
elseif getline(v:lnum) =~ '^\s*(defmacro.*\s'
return ">1"
elseif getline(v:lnum) =~ '^\s*(defmethod.*\s'
return ">1"
@mikhailov
mikhailov / installation.sh
Created November 23, 2010 15:18
nginx+passenger (real production config)
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776
$ cd /usr/src
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
@jchris
jchris / couchapp.html
Created November 27, 2010 15:14
the smallest possible CouchApp
<!DOCTYPE html>
<html>
<!-- This should be the simplest possible jQuery based CouchApp. Install by uploading to a design document in Futon or putting in _attachments/index.html and running `couchapp push` -->
<head><title>Tiny CouchApp</title></head>
<body>
<h1>Tiny CouchApp</h1>
<ul id="databases"></ul>
</body>
<script src="/_utils/script/jquery.js"></script>
<script src="/_utils/script/jquery.couch.js"></script>
@MicahElliott
MicahElliott / .Xdefaults
Created November 28, 2010 03:53
Xterm color scheme
! xterm color scheme — Make all 16 beautiful.
!
! Suited for black background, but includes disabled alternative light scheme.
!
! Open this file with gvim to enable <Leader><F2> color mode.
!
! Use `xfontsel`, `xlsfonts`, and `fc-list` to find other fonts.
!
! On Ubuntu I have to name this file ‘~/.Xdefaults-$(hostname)’
!
@MicahElliott
MicahElliott / dir_colors
Created November 29, 2010 06:18
Fine-tune your dircolors for unique colorings of any file type.
# .dircolors
#
# Configure your console file colors.
#
# Author: Micah Elliott http://MicahElliott.com
#
# This file should sit in your $HOME as .dircolors or .dir_colors,
# depending on your distro.
#
# Configuration file for dircolors, a utility to help you set the
@MicahElliott
MicahElliott / .gitignore
Created November 29, 2010 07:14
Python Autotest - Automatically run tests upon detecting writes to source(s).
vids
@MicahElliott
MicahElliott / vimpress.mkd
Created December 21, 2010 04:43
Plain Presentations in Plain Text (PPPT)

Presentations in Plain Text (PPT++)

With some help from Markdown and Vim.

“Hope this makes you chuckle.” —Micah Elliott

@biovisualize
biovisualize / index.html
Created October 6, 2011 01:35
Inkscape d3 tutorial
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<title>D3-Inkscscape tutorial</title>
</head>
<body>
<div id="viz"></div>
<a href="#" id="download">Download</a>
<script type="text/javascript">
@MicahElliott
MicahElliott / rbenv-howto.md
Created April 17, 2012 18:11
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