This file contains 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
def teste | |
puts 'Eduzera' | |
end |
This file contains 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
#1 Executar os seguintes comandos: | |
sudo apt-get remove --purge librmagick-ruby-doc librmagick-ruby1.8 | |
#2. Instalar o imagemagick libmagick9-dev ruby1.8-dev | |
sudo apt-get install imagemagick libmagick9-dev ruby1.8-dev | |
#3. Executar a instalacao do rmagick | |
sudo gem install rmagick |
This file contains 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
require "openssl" | |
require "net/smtp" | |
Net::SMTP.class_eval do | |
private | |
def do_start(helodomain, user, secret, authtype) | |
raise IOError, 'SMTP session already started' if @started | |
#check_auth_args user, secret, authtype if user or secret | |
no_args = method(:check_auth_args).arity |
This file contains 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
.idea[idea]{:class => idea.read == true ? "read" : ''} | |
.grid_1.alpha.rcenter | |
=check_box :idea, :id, {} ,idea.id | |
.grid_1.acenter | |
=link_to image_tag(user_profile_image(idea.participant,false,"grid_1"), :class => 'box-shadow-small'), polymorphic_path(idea.participant) | |
.grid_12.close | |
%p.name | |
=link_to idea.participant.name , "javascript://" | |
%p | |
= "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.".truncate(200) |
This file contains 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
#config/initializers/mail_setup.rb | |
ActionMailer::Base.smtp_settings = { | |
:address => "smtp.gmail.com", | |
:port => 587, | |
:domain => "idea4b.com.br", | |
:user_name => "contato@idea4b.com.br", | |
:password => "loldesign2011", | |
:authentication => "plain", | |
:enable_starttls_auto => true |
This file contains 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
// 1. | |
$('a.more_emails').on( 'click', addEmailsFields); | |
// 1.1 | |
$('input[id*="client_client_emails_attributes"]').each(function(index, element){ | |
$(element).parent().css({position: 'relative'}); | |
$(element).parent().append(createRemoveEmailLink); | |
}); | |
This file contains 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
<body> | |
<!--...--> | |
<section id='container'> | |
<!--add classe with-scroll no elemento e só--> | |
<section id='posts' class='with-scroll'> | |
<header class='clearfix'> | |
<h1> O que faz a gente ser tim? </h1> | |
<figure class='user-picture'> | |
<img src="img_dna/placeholders/profile01.png"> |
This file contains 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
gem 'brcep' |
This file contains 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
#login by ssh | |
cat ~/.ssh/id_rsa.pub | ssh [machine-user]@[machine-ip] "cat >> ~/.ssh/authorized_keys" | |
#first login | |
ssh root@[machine-ip] | |
#update repository | |
sudo apt-get update | |
#install required softwares |
This file contains 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
#created by: Eduardo Zaghi | |
#idea base: https://chop-chop.org/order-now.html | |
require 'action_view' | |
class Proposal | |
include ActionView::Helpers::NumberHelper | |
HTML_PRICE = 150 | |
HTML_HALF_PRICE = HTML_PRICE / 2 |
OlderNewer