Skip to content

Instantly share code, notes, and snippets.

@dsummersl
dsummersl / .profile fragment
Created December 5, 2012 15:43 — forked from jcamenisch/.profile fragment
Lightning-fast project-wide find/replace with git grep and sed -- with confirm option.
gg_replace() {
if [[ "$#" == "0" ]]; then
echo 'Usage:'
echo ' gg_replace term replacement file_mask'
echo ' gg_replace [-c] term replacement file_mask'
echo
echo 'Options:'
echo ' -c == confirm. Allows you to interactively confirm each modification.'
echo
echo 'Example:'
let fn = { 'cmpstr': a:1 }
function fn.compare(x,y) dict
let a = a:x
let b = a:y
exec "return ". self.cmpstr
endfunction
return sort(a:list,fn.compare,fn)
let list = ['1','10','2']
let fn = { }
function fn.compare(a,b) dict
return str2nr(a:a) < str2nr(a:b)
endfunction
return sort(a:list,fn.compare,fn)
let list = ['1','10','2']
let fn = { }
function fn.compare(a,b) dict
return str2nr(a:a) > str2nr(a:b)
endfunction
echo sort(list,fn.compare,fn)

Granny's Addressbook

Installing necessary software

This application will require the use of PHP, a MySQL database, a webserver such as Apache. If these are not already installed, please install them with the following command line inputs.

set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'guns/ultisnips.git'
Bundle 'Shougo/neocomplcache.git'
Bundle 'JazzCore/neocomplcache-ultisnips'
" to keep vim from complaining about ~/.vim/after...
diff --git a/Makefile.am b/Makefile.am
index aa481f8..d632fa5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,7 @@ doc_DATA = README.markdown
docdir = ${prefix}/share/doc/watchman-$(VERSION)
THIRDPARTY_CPPFLAGS = -I$(top_srcdir)/thirdparty/jansson -I$(top_builddir)/thirdparty/jansson
-JSON_LIB = -L. -lwmanjson
+JSON_LIB = -L. libwmanjson.a
diff --git a/Makefile.am b/Makefile.am
index aa481f8..d632fa5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,7 @@ doc_DATA = README.markdown
docdir = ${prefix}/share/doc/watchman-$(VERSION)
THIRDPARTY_CPPFLAGS = -Ithirdparty/jansson
-JSON_LIB = -L. -lwmanjson
+JSON_LIB = -L. libwmanjson.a
To reset the databases completely:
bundle exec rake db:drop && rm -rf tmp && bundle exec rake db:create db:migrate && bundle exec foreman start
And build:
bundle exec rake publishers:download publishers:update
<div>
<% @events_by_date.each do |day, events| %>
<section id="<%= day %>">
<h2>
<%= day %>
</h2>
<% events.each do |event| %>
<p><%= hyperlink(event.title) %></p>
<% end %>
<% end %>