With some help from Markdown and Vim.
“Hope this makes you chuckle.” —Micah Elliott
" --------------------------------------------------------------------------- | |
" 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" |
<!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> |
<!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"> |
# = 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."}, |
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.
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.
# Install and run abs (sync)
sudo pacman -S abs
web: ./node_modules/.bin/coffee app.coffee |
### 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 |