Skip to content

Instantly share code, notes, and snippets.

Hélio Costa e Silva hlegius

Block or report user

Report or block hlegius

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
hlegius / Dockerfile
Last active Aug 1, 2019
Docker base configuration for Scala projects with Docker (tested against Docker Beta for OS X)
View Dockerfile
FROM hseeberger/scala-sbt
# For a Alpine Linux version, comment above and uncomment below:
# FROM 1science/sbt
RUN mkdir -p /exampleapp
RUN mkdir -p /exampleapp/out
WORKDIR /exampleapp
COPY . /exampleapp
hlegius / .vimrc
Last active Jan 25, 2018
Personal Vim's dotfile
View .vimrc
" Original "Vi behaviour" disabled (I am not that tr00 user [yet])
set nocompatible " better safe than sorry
" Fair Vim
noremap <Left> <NOP>
noremap <Right> <NOP>
noremap <Up> <NOP>
noremap <Down> <NOP>
inoremap <Left> <NOP>
hlegius / monkeypatch.rb
Created May 25, 2016
It's so cool - c'mon and join us.
View monkeypatch.rb
hlegius / Rails Datetime Timezone
Last active Dec 27, 2015
This is the price to pay when you "love" Black Magic frameworks. As you can see, Rails' ActiveRecord will override timezone for all time/datetime attributes up to your "rails configuration". There is nothing to do about it. This is the Rails way. Nice, huh?
View Rails Datetime Timezone
2.0.0p247 :001 > e =, date_offset: 'GMT-4')
=> #<Event id: nil, start_date_time: "2013-11-01 13:03:31", date_offset: "GMT-4", created_at: nil, updated_at: nil>
2.0.0p247 :002 > e.start_date_time
=> Fri, 01 Nov 2013 11:03:31 BRST -02:00
2.0.0p247 :003 > d =
=> Fri, 01 Nov 2013 13:04:02 -0200
2.0.0p247 :004 >, d.month,, d.hour, d.minute, d.second, e.date_offset)
=> Fri, 01 Nov 2013 13:04:02 -0400
hlegius /
Created Oct 27, 2013
Chain of Responsibility - GoF Way
abstract class Authenticator {
private Authenticator next;
public static Authenticator chain() {
Authenticator defaultMethod = new EmailAuthenticator();
Authenticator networkMethod = new NetworkAuthenticator();
Authenticator partnerMethod = new PartnerAuthenticator();
hlegius / test_helper.rb
Created May 27, 2013
Solr Sunspot Mocking session
View test_helper.rb
::Sunspot.session =
hlegius / paperclip_mocking_test.rb
Last active Dec 14, 2015
Mocking Paperclip with Mocha
View paperclip_mocking_test.rb
hlegius / projeto.txt
Created Apr 25, 2012
Season - Projeto final
View projeto.txt
Projeto final: Gerenciador financeiro.
O sistema web deverá contemplar as seguintes ideias:
- Cadastro de despesa
- Listagem de gastos/recebimentos com filtro por data.
- Cadastro de categorías de despesas
Bonus points (opcional):
- Cadastro de "budget" para uma categoria.
hlegius / Criteria.php
Created Sep 19, 2010
[PHP] Realiza queries SQL com PDO.
View Criteria.php
* Criteria para a QueryObject
* @author Hélio Costa e Silva <>
* @created Novembro, 25 2008
* @revised Dezembro, 26 2008
* @version desenvolvimento / development
View mixins_inhe.rb
module Foo
def save
puts 'in save'
module Foo
def self.included(resource)
resource.extend ClassMethods
You can’t perform that action at this time.