See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
vim.diagnostic.config({ | |
virtual_text = false | |
}) | |
-- Show line diagnostics automatically in hover window | |
vim.o.updatetime = 250 | |
vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]] |
require "active_support/concern" | |
module M | |
extend ActiveSupport::Concern | |
included do | |
has_many :things | |
scope :disabled, -> { where(disabled: true) } | |
after_commit :send_email | |
validates :email, length: { maximum: 255 }, email: true |
module Formatter | |
def self.included base | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
def class_method | |
"yahy" | |
end | |
end |
class Formatter | |
def formatted_phone(phone) | |
phone.delete("^0-9") | |
end | |
end | |
class Payment < Formatter | |
def phone(phone) | |
formatted_phone(phone) | |
end |
class Payment | |
def formatted_phone(phone) | |
phone.delete("^0-9") | |
end | |
end | |
class Contact | |
def formatted_phone(phone) | |
phone.gsub(/[^0-9]/, '') | |
end |
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
ROM buildpack-deps:stretch | |
RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
bzip2 \ | |
ca-certificates \ | |
libffi-dev \ | |
libgdbm3 \ | |
libssl-dev \ | |
libyaml-dev \ |
CÛdigo do Produto Nome do Produto NCM CEST CFOP CSOSN COFINS PIS Origem Unidade PreÁo de Venda | |
900005253 #CART MASC 19081 CAFE 42023200 00.000.00 5102 101 4 4 2 - Importado UND R$ 34,62 | |
900005219 #CART MASC 19081 PRETO 42023200 00.000.00 5102 101 4 4 2 - Importado UND R$ 34,62 | |
900004953 #CART MASC 19089 CAFE 42023200 00.000.00 5102 101 4 4 2 - Importado UND R$ 64,12 | |
900004919 #CART MASC 19089 PRETO 42023200 00.000.00 5102 101 4 4 2 - Importado UND R$ 64,12 | |
901901553 #CARTEIRA PCOURO CAFE 42023200 00.000.00 5102 101 4 4 2 - Importado UND R$ 37,67 | |
901906753 #CARTEIRA PCOURO CAFE 42023200 00.000.00 5102 101 4 4 2 - Importado UND R$ 50,09 | |
901901519 #CARTEIRA PCOURO PRETO 42023200 00.000.00 5102 101 4 4 2 - Importado UND R$ 37,67 | |
901906719 #CARTEIRA PCOURO PRETO 42023200 00.000.00 5102 101 4 4 2 - Importado UND R$ 50,09 | |
226007001 &BOLSA COURO XCBD60-070-01 42022100 00.000.00 5102 101 4 4 2 - Importado UND R$ 151,34 |