This file contains hidden or 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
Add app | |
Download aplicación | |
$ wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz | |
Extract archive | |
$ sudo tar -xzf postman.tar.gz -C /opt | |
Make link to /usr/bin | |
$ sudo ln -s /opt/Postman/Postman /usr/bin/postman |
This file contains hidden or 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 Transfer | |
def initialize(payment) | |
@payment = payment | |
end | |
def run | |
ActiveRecord::Base.transaction do | |
if @payment.origin.bank == @payment.destination.bank | |
intra_bank |
This file contains hidden or 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
a = Account.find 60 | |
ba = a.bank_accounts.find_by_code("bane5156dc1ca2bbb02ba9eb0fbfbdf") | |
ba.core_suffix = "002" | |
ba.core_presenter_suffix = "002" | |
ba.save | |
reload! | |
r = Remittance.find_by_code("rem52f909210c1902ff10ae24eb4273") | |
date_collect = Date.new(2016, 8, 19) | |
r.debits.each{|d| d.remittance_id = nil; d.status = "READY"; d.collect_at = date_collect; d.save} | |
date = r.debits.first.send_at |
This file contains hidden or 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 update_quality(items) | |
items.each do |item| | |
puts "dentro de items.each" | |
puts item.inspect | |
max_quality(item | |
end | |
end | |
def max_quality(item_n) |
This file contains hidden or 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
alias bash='bash --login' | |
alias ls='ls --color' | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
alias t='tailf' | |
alias c='ccze -A' | |
alias ag='ack-grep' | |
alias g='git' | |
alias e='gvim ' |
This file contains hidden or 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
Ruby: | |
http://www.poodr.com/ | |
Haml: | |
http://haml.info/tutorial.html | |
CSS: | |
http://es.learnlayout.com/ | |
SCSS o SASS |
This file contains hidden or 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 "minitest/autorun" | |
require_relative 'checkout.rb' | |
describe Checkout do | |
before do | |
@checkout = Checkout.new(nil) | |
end | |
# Items: AM,AC,AM,AM,CA | |
# Precio total esperado: 22.45€ |
This file contains hidden or 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 Checkout | |
PRODUCTS = {"AM" => {"code" => "AM", "price" => 3.11}, | |
"AC" => {"code" => "AC", "price" => 5} , | |
"CA" => {"code" => "CA", "price" => 11.23}} | |
def initialize(pricing_rules) | |
@pricing_rules = pricing_rules || default_pricing_rules | |
@list_products = [] | |
end |