Skip to content

Instantly share code, notes, and snippets.

View rizzatti's full-sized avatar

José Otávio Rizzatti Ferreira rizzatti

View GitHub Profile
0123
@rizzatti
rizzatti / .ycm_extra_conf.py
Created March 4, 2013 01:58
Workaround for header files and compilation database
import os
import re
import ycm_core
from clang_helpers import PrepareClangFlags
DATABASE_FOLDER = '/Users/zeh/code/zed/build'
DATABASE = ycm_core.CompilationDatabase(DATABASE_FOLDER)
EXTRA_FLAGS = [
'-isystem',
'/usr/lib/c++/v1',
/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
@rizzatti
rizzatti / gist:3610039
Created September 3, 2012 15:21
running rspec on ruby_ami right after cloning
% rake spec
/Users/zeh/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -S rspec spec/ruby_ami/action_spec.rb spec/ruby_ami/agi_result_parser_spec.rb spec/ruby_ami/async_agi_environment_parser_spec.rb spec/ruby_ami/client_spec.rb spec/ruby_ami/error_spec.rb spec/ruby_ami/event_spec.rb spec/ruby_ami/response_spec.rb spec/ruby_ami/stream_spec.rb --color
/Users/zeh/code/projects/ruby_ami/lib/ruby_ami.rb:31:in `require': cannot load such file -- ruby_ami/lexer (LoadError)
from /Users/zeh/code/projects/ruby_ami/lib/ruby_ami.rb:31:in `block in <top (required)>'
from /Users/zeh/code/projects/ruby_ami/lib/ruby_ami.rb:21:in `each'
from /Users/zeh/code/projects/ruby_ami/lib/ruby_ami.rb:21:in `<top (required)>'
from /Users/zeh/code/projects/ruby_ami/spec/spec_helper.rb:20:in `require'
from /Users/zeh/code/projects/ruby_ami/spec/spec_helper.rb:20:in `<top (required)>'
from /Users/zeh/code/projects/ruby_ami/spec/ruby_ami/action_spec.rb:1:in `require'
from /Users/zeh/code/project
require "eventmachine"
EM.kqueue = true
EM.threadpool_size = 3
EM.run do
count = 0
(1..50).each do |i|
blk = proc do
sleep 2
puts "#{i}\n"
[
"equity_position_investments",
"equity_position_real_estate",
...
].each do |field|
value = FormSanitizer.currency(send("#{field}_formatted".to_sym))
send("#{field}=".to_sym, value)
end