Skip to content

Instantly share code, notes, and snippets.

View rodrigovirgilio's full-sized avatar

Rodrigo Virgilio rodrigovirgilio

View GitHub Profile
require 'poi'
# given an Excel spreadsheet whose first sheet (Sheet 1) has this data:
# A B C D E
# 1 4 A 2010-01-04
# 2 3 B =DATE(YEAR($E$1), MONTH($E$1), A2)
# 3 2 C =DATE(YEAR($E$1), MONTH($E$1), A3)
# 4 1 D =DATE(YEAR($E$1), MONTH($E$1), A4)
workbook = POI::Workbook.open('spreadsheet.xlsx')
@rodrigovirgilio
rodrigovirgilio / sublime
Created July 31, 2012 12:58
Atalho do Sublime mac osx
sudo ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/bin/subl
@rodrigovirgilio
rodrigovirgilio / textmate
Created September 5, 2012 12:03
atalho TextMate commando in line
sudo ln -s /Applications/TextMate.app/Contents/Resources/mate /bin/mate
@rodrigovirgilio
rodrigovirgilio / 02.make
Created December 11, 2012 12:51
brew issues
/usr/bin/make install-am
/bin/sh ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I./include -I./zbar -I./include -Wall -Wno-parentheses -g -O2 -c -o zbar/zbar_libzbar_la-jpeg.lo `test -f 'zbar/jpeg.c' || echo './'`zbar/jpeg.c
/bin/sh ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I./include -I./zbar -I./include -Wall -Wno-parentheses -g -O2 -c -o zbar/processor/zbar_libzbar_la-x.lo `test -f 'zbar/processor/x.c' || echo './'`zbar/processor/x.c
libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./zbar -I./include -Wall -Wno-parentheses -g -O2 -c zbar/jpeg.c -fno-common -DPIC -o zbar/.libs/zbar_libzbar_la-jpeg.o
libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./zbar -I./include -Wall -Wno-parentheses -g -O2 -c zbar/processor/x.c -fno-common -DPIC -o zbar/processor/.libs/zbar_libzbar_la-x.o
brew: superenv removed: -Wall -Wno-parentheses -g -O2
brew: superenv removed: -Wall -Wno-parentheses -g -O2
/bin/sh ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I
##
# Fazendo deploy com o capistrano de uma aplicação Rails
# usando servidores da Amazon ec2 e unicorn como servidor
# o versionamento do ruby no ambiente de produção foi feito
# com o rbenv ( https://github.com/sstephenson/rbenv ), o SO
# esta com o Centos 5.3 x64
#
# Primeiramente é necessario instalar a gem com o comando:
# gem install capistrano
# ou adicione a linha: gem "capistrano", :group => :development
@rodrigovirgilio
rodrigovirgilio / teste.rb
Last active December 17, 2015 08:59
Table with Prawn
def to_pdf
bounding_box([0, 770], :width => 520, :height => 40) do
stroke_bounds
text_box "18. Februar 2013 -", :at => [5, 35]
text_box "24. Februar 2013", :at => [5, 20]
end
move_down 2
header_1 = make_cell(:content => "18 Mo", width: 68)
@rodrigovirgilio
rodrigovirgilio / gist:5823109
Created June 20, 2013 14:17
Skype Português PT-BR Mac osx
Terminal:
defaults write com.skype.skype AppleLanguages '(pt-BR)'
@rodrigovirgilio
rodrigovirgilio / team_mmr_updater.rb
Created May 6, 2016 17:08
Add MMR players to teams Riot - Codeminer42
class TeamMMRUpdater
def self.call(*args)
new(*args).call
end
def initialize(team)
@team = team
end
def call
@rodrigovirgilio
rodrigovirgilio / homework.md
Last active January 29, 2019 16:33
Cambly - Homework - Tara Snow

Exercicis page 108

...

Tell about the last time you celebrated a holiday. new years / carnival

01/29/2019

Carnival on the beach in Brazil

At last years carnival, I and my wife rented an apartment and invited our friends to go to the carnival on the beach.

Ruby e Rails
Guias:
http://guides.rubyonrails.org/
Livros (Free mas vale pagar um café para o autor ;) ):
https://leanpub.com/conhecendo-ruby
Livros (Pagos):
https://leanpub.com/conhecendo-rails