This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
highlight LongLines guibg=#333300 | |
au BufWinEnter * call matchadd('LongLines', '^.\{80,119}$', -1) | |
highlight VeryLongLines guibg=#330000 | |
au BufWinEnter * call matchadd('VeryLongLines', '^.\{120,}$', -1) | |
highlight Indent9 guibg=#645640 | |
au BufWinEnter * call matchadd('Indent9', '^\s\{20}\&^\s\{17}', -1) | |
highlight Indent8 guibg=#564832 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Animal | |
end | |
module Runner | |
refine Animal do | |
puts "I have #{legs} and I'm running!" | |
end | |
end | |
Dog.include Animal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Foo | |
def bar | |
"A cow" | |
end | |
end | |
describe Foo | |
let :subject_class { Class.new } | |
let :subject { subject_class.new } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
refinement Runner | |
def run | |
puts "I have legs and I am running" | |
end | |
end | |
object = Object.new | |
do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mobi_dev=# create or replace function eval (expression text, arg text, val text) returns boolean | |
as | |
$body$ | |
declare | |
result boolean; | |
begin | |
execute replace(replace(expression, 'arg', '''' || arg || ''''), 'val', '''' || val || '''') into result; | |
return result; | |
end; | |
$body$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colorscheme camo | |
set nocompatible | |
set background=dark | |
set noautoindent smartindent | |
set expandtab | |
set softtabstop=2 | |
set shiftwidth=2 | |
set hlsearch " highlight search results | |
set nowrap " don't wrap lines |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Taken from febuiles on github. | |
# This assumes you have: | |
# 1) A user called `hubot` in charge of the bot. | |
# 2) A file called /home/hubot/.hubotrc that contains the Hubot credentials. | |
# | |
# To set the adapter either edit bin/hubot to specify what you want or append | |
# `-- -a campfire` to the $DAEMON variable below. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function git_contributions() { | |
shortstat=$(git log --author=$1 --oneline --shortstat | grep deletions) | |
`/usr/bin/env ruby <<-RUBY | |
additions = 0 | |
deletions = 0 | |
%[ $shortstat ].each_line do |line| | |
addition_matches = line.match(/(\d+) insertions/) | |
additions += addition_matches[1].to_i if addition_matches |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arg = `echo $COUNT_CALLS_TO` | |
KLASS, METHOD = *arg.split('#').map(&:strip) | |
module MethodCounter | |
module ClassMethods | |
@@method_times_run_var = 0 | |
def method_times_called | |
@@method_times_run_var | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set relativenumber | |
au InsertEnter * :set number | |
au InsertLeave * :set relativenumber | |
function! FocusGainNumbering() | |
if(mode() == 'i') | |
:set number | |
else | |
:set relativenumber |
OlderNewer