Skip to content

Instantly share code, notes, and snippets.

View MicahElliott's full-sized avatar

Micah Elliott MicahElliott

View GitHub Profile
" ---------------------------------------------------------------------------
" 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"
@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>
@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">
@jrmoran
jrmoran / controllers.coffee
Created November 28, 2012 18:43
AngularJS Testing Controllers with Testacular & Testem
# = require '../components/jquery/jquery'
# = require '../components/angular-complete/angular'
Controllers = angular.module 'controllers', []
Controllers.controller 'PhoneListCtrl', ['$scope', ($scope)->
$scope.phones = [
{name: "Nexus S", snippet: "Fast just got faster with Nexus S."},
@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

@MicahElliott
MicahElliott / dict-search-arch.md
Created July 10, 2013 00:42
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
MicahElliott / arch-augment-vim-for-python.md
Created July 4, 2012 18:01
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

@jkresner
jkresner / Procfile
Created April 13, 2013 09:05
Deploy brunch to heroku
web: ./node_modules/.bin/coffee app.coffee
@srpouyet
srpouyet / nginx.conf
Last active August 5, 2018 22:37
Nginx Upstart script (Ubuntu 12.04)
### Nginx upstart script
### source: http://serverfault.com/a/391737/70451
### /etc/init/nginx.conf
description "nginx http daemon"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON=/usr/local/sbin/nginx
=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