Skip to content

Instantly share code, notes, and snippets.

set nocompatible
filetype off
set hlsearch
set tabstop=2
set shiftwidth=2
set expandtab
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
@marano
marano / gist:2720500
Created May 17, 2012 17:47
Happy console
export PS1='$( [[ ${?#0} = "" ]] && echo ":) " || echo ":( " )'
@marano
marano / Custom Feedzirra Flickr parser
Created June 12, 2010 17:19
Custom Feedzirra parsers
module Feedzirra
module Parser
class FlickrEntry
include SAXMachine
include FeedEntryUtilities
element :guid, :as => :id
element :link, :as => :url
@marano
marano / gist:108160
Created May 7, 2009 15:29
A core string extension that Ive used many times.
class String
def canonical
mb_chars.strip.normalize(:kd).gsub(/[^\x00-\x7F]/n,'').downcase.to_s
end
def trim
gsub(/ /,'')
end