Skip to content

Instantly share code, notes, and snippets.

View mhfs's full-sized avatar

Marcelo Silveira mhfs

View GitHub Profile
@mhfs
mhfs / README.md
Created March 28, 2014 18:02 — forked from jm3/ d3 drift JS
@mhfs
mhfs / keybase.md
Last active August 29, 2015 14:03

Keybase proof

I hereby claim:

  • I am mhfs on github.
  • I am mhfs (https://keybase.io/mhfs) on keybase.
  • I have a public key whose fingerprint is 6F4B 7528 9C6B D712 7562 5153 D63A B713 961C 0AB5

To claim this, I am signing this object:

@mhfs
mhfs / Gemfile
Last active August 29, 2015 14:15
check twitter username availability
# A sample Gemfile
source "https://rubygems.org"
ruby "2.1.2"
gem "httparty"
gem "pony"
# lib/tw_date_picker.rb
module TwDatePicker
module TwDatePickerHelper
end
module AssetTagHelper
def tw_date_picker_includes(options = {})
javascript_include_tag('tw_date_picker', options)
end
@company = Company.find(@ticket.company_id) ||= @companies.first
#/Users/mhfs/Sites/supporter/app/controllers/tickets_controller.rb:140: syntax error, unexpected tOP_ASGN, #expecting ')'
#...y.find(@ticket.company_id) ||= @companies.first)
# ^
I18n::InvalidPluralizationData in Memberships#create
Showing app/views/shared/_form_error.html.erb where line #1 raised:
translation data {:service_item=>"Ítem de Serviço", :ticket=>"Ticket", :attachment=>"Anexo", :profile=>"Perfil", :account=>"Conta", :company=>"Empresa", :membership=>"funciona porra", :user=>"Usuário", :business_unit=>"Unidade de Negócio", :membershipable=>"Permissionável"} can not be used with :count => 1
Extracted source (around line #1):
1: <%= error_messages_for :object => form_error %>
activerecord:
models:
attachment: "Anexo"
account: "Conta"
company: "Empresa"
business_unit: "Unidade de Negócio"
service_item: "Ítem de Serviço"
ticket: "Ticket"
membership: "funciona porra"
profile: "Perfil"
==> production.log <==
# Logfile created on Tue Sep 08 10:50:08 -0700 2009
Processing HomepageController#index (for 201.82.129.151 at 2009-09-08 10:51:17) [GET]
Parameters: {"action"=>"index", "controller"=>"homepage"}
Rendering template within layouts/application
Rendering homepage/index
ActionView::TemplateError (can't convert nil into String) on line #11 of app/views/layouts/application.html.haml:
8: = stylesheet_link_tag 'application'
Feature: Login
To ensure the safety of the application
A regular user of the system
Must authenticate before using the app
Scenario Outline: Failed Login
Given the user "known_user"
When I go to the main page
ActionMailer::Base.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => 587,
:domain => "twiva.com.br",
:authentication => :plain,
:user_name => "noreply@twiva.com.br",
:password => 'mypass'
}