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
react-native run-android | |
JS server already running. | |
Building and installing the app on the device (cd android && ./gradlew installDebug... | |
Downloading https://services.gradle.org/distributions/gradle-2.4-all.zip | |
Exception in thread "main" javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error | |
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) | |
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1914) | |
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1872) | |
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1855) |
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
"***************************************************************************** | |
"" Vim-PLug core | |
"***************************************************************************** | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
endif | |
let vimplug_exists=expand('~/.vim/autoload/plug.vim') | |
let g:vim_bootstrap_langs = "elixir,javascript,python,ruby" |
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
@examination_request | |
=> #<ExaminationRequest:0x002ab3b2f7fd38> { | |
:id => 1, | |
:procedure_type => "", | |
:execultante_sector => "", | |
:patient_id => nil, | |
:user_id => nil, | |
:medical_consultation_id => nil, | |
:created_at => Fri, 19 Aug 2016 14:58:07 UTC +00:00, | |
:updated_at => Fri, 19 Aug 2016 14:58:07 UTC +00:00 |
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
@examination_request | |
=> #<ExaminationRequest:0x002ab3b2f7fd38> { | |
:id => 1, | |
:procedure_type => "", | |
:execultante_sector => "", | |
:patient_id => nil, | |
:user_id => nil, | |
:medical_consultation_id => nil, | |
:created_at => Fri, 19 Aug 2016 14:58:07 UTC +00:00, | |
:updated_at => Fri, 19 Aug 2016 14:58:07 UTC +00:00 |
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
FROM ubuntu:14.04 | |
MAINTAINER Aristóteles Coutinho <[email protected]> | |
RUN apt-get update | |
# Defining the workplace | |
VOLUME ["/home/ruby/Workspace/Rails"] | |
# Install ruby dependencies | |
RUN apt-get install -y wget curl \ |
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 'mechanize' | |
agent = Mechanize.new | |
page = agent.get "https://login.oi.com.br/nidp/idff/sso?id=sso&sid=6&option=credential&sid=6" | |
# p page.forms | |
form = page.forms.first | |
form['Ecom_User_ID'] = '03372595343' | |
form['Ecom_Password'] = 'q2w3e4r5' | |
page = form.submit |
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
class Expense < ActiveRecord::Base | |
validates :value, presence: true | |
belongs_to :user | |
has_many :portions | |
accepts_nested_attributes_for :portions, reject_if: :all_blank, allow_destroy: true | |
def self.total | |
where(created_at: Date.today.beginning_of_month..Date.today.end_of_day).sum(:value) | |
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
# Deve criar no banco de dados de um valor(despesa) parcelado, onde | |
# o valor de cada parcela será cobrado nos messes subsequentes. | |
def create_invoices | |
interval = 1.month | |
cicles = self.quantity | |
start_date = Date.today | |
current_date = start_date | |
cicles.times do |
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
Vagrant.configure(2) do |config| | |
config.vm.box = "fnando/hellobits-trusty32" | |
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
class Meta | |
def initialize(meta = {}) | |
@meta = meta | |
end | |
def atingir_meta(meta) | |
return meta | |
end | |
def dobrar_meta(meta) | |
meta*2 | |
end |