Skip to content

Instantly share code, notes, and snippets.

describe "#lines_to_br" do
it "convert newlines into html linebreaks"
it "escapes the lines"
it "returns safe html"
it "returns '' if nil"
it "returns '' if blank string"
end
it "passes default argument along to t" do
subject.stub(:t).with('my_key', default: 'my_default').and_return('abc')
subject.safe_t('my_key', default: 'my_default')
end
@n0nick
n0nick / .vimrc
Last active January 3, 2016 02:29
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" TODO: this may not be in the correct place. It is intended to allow overriding <Leader>.
" source ~/.vimrc.before if it exists.
if filereadable(expand("~/.vimrc.before"))
source ~/.vimrc.before
endif
@n0nick
n0nick / gist:7823161
Created December 6, 2013 12:43
{en,de}crypting files
function encrypt() {
openssl des3 -salt -in $* -out $*.secret
}
function decrypt() {
openssl des3 -salt -d -in $* -out $*.plain
}
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" TODO: this may not be in the correct place. It is intended to allow overriding <Leader>.
" source ~/.vimrc.before if it exists.
if filereadable(expand("~/.vimrc.before"))
source ~/.vimrc.before
endif
" ========================================
" Vim plugin configuration
" ========================================
"
" This file contains the list of plugin installed using vundle plugin manager.
" Once you've updated the list of plugin, you can run vundle update by issuing
" the command :BundleInstall from within vim or directly invoking it from the
" command line with the following syntax:
" vim --noplugin -u vim/vundles.vim -N "+set hidden" "+syntax on" +BundleClean! +BundleInstall +qall
" Filetype off is required by vundle
export PATH=`brew --prefix rbenv`/shims:`brew --prefix rbenv`/bin:$PATH
export PATH="$HOME/.homebrew/bin:$PATH"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.nginx</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
// Button design - by nitzanron@
// I heard you like variables...
$button: #c2c2c2;
$buttonHover: #d2d2d2;
$buttonActive: #9a9a9a;
$buttonText: #000;
$buttonPrimary: #a3c2d2;
$buttonPrimaryHover: #a7d2df;
$buttonPrimaryActive: #78afc0;