Skip to content

Instantly share code, notes, and snippets.

MTBF, MTTR, MTTA, and MTTF
Understanding a few of the most common incident metrics
MTBF: Mean time between failures
is the average time between repairable failures of a technology product
X = (P - Td) / Fs
P: Período de análise
Td: Tempo em que o sistema ficou fora (não deve considerar manutenção programada)
@rodrigomaia
rodrigomaia / happynel.md
Last active July 1, 2019 16:26
Teste Ruby on Rails

HappyNel

Dashboard de enquete de satisfação

Requerimentos

  1. Rails 5
  2. Git - Ceder acesso ao repositório. Pode ser no Bitbucket, Github, Gitlab...
  3. Faça o deploy da aplicação em algum serviço externo, como Heroku, Digital Ocean ou outro de sua preferência.
@keyboard = []
@keyboard[0] = ['1','2','3','4','5','6','7','8','9','0']
@keyboard[1] = ['q','w','e','r','t','y','u','i','o','p']
@keyboard[2] = ['a','s','d','f','g','h','j','k','l',';']
@keyboard[3] = ['z','x','c','v','b','n','m',',','.','/']
def find_position(caractere)
@keyboard.each_with_index do |row, index|
col = row.index(caractere)
return [index, col] unless col.nil?
@rodrigomaia
rodrigomaia / vaga.rb
Last active June 17, 2016 14:13
Vaga Ruby
class DevFortes
class << self
def conhecimentos_exigidos
conhecimentos "Exigidos", ["Ruby on Rails", "Javascript", "GIT"]
end
def conhecimentos_desejaveis
conhecimentos "Desejáveis", ["Rspec", "AWS", "Ext.js", "Mobile(iOS e Android)"]
@rodrigomaia
rodrigomaia / vaga.mobile
Created August 26, 2014 16:14
Fortes Informatica procura um Desenvolvedor Mobile
Procuramos um desenvolvedor - Android e iOS - para atuar em alguns projetos e promover o conhecimento dessas tecnologias.
Se você é um desenvolvedor fera, que não treme diante de problemas, busca o aprendizado constante, já publicou app(s) e aprendeu com isso, sabe trabalhar em equipe e gosta de mostrar o que sabe, precisamos conversar.
Me envie seu linkedin, github, blog e qualquer coisa que me ajude a lhe conhecer melhor.
rodrigomaia@grupofortes.com.br
@rodrigomaia
rodrigomaia / hacknfortes.rb
Last active June 15, 2016 17:34
Hack’n Fortes
class HacknFortes
class << self
def objetivo
"A Fortes Informática está em busca de novos talentos. Por isso, convidamos você para participar do Hack’n Fortes!\n\nSe você busca novos desafios, inscreva-se e venha participar de um dia dedicado ao desenvolvimento, com muito Ruby, Red Bull e junk food."
end
def data
"Data: #{Time.new(2014,8,30,10,00).strftime('%d/%m/%Y')} (Sábado)\nHORÁRIO: #{Time.new(2014,8,30,10,00).strftime('%H:%M')} às #{Time.new(2014,8,30,18,00).strftime('%H:%M')}\n\n"
end
@rodrigomaia
rodrigomaia / activemq.corrupt_jornal
Created June 25, 2014 15:59
ActiveMQ Detected missing/corrupt journal files
http://nishal-tech.blogspot.com.br/2012/09/activemq-detected-missingcorrupt.html
Sometime kahaDB which is used by activeMQ to persist the message, get either corrupted some message/journal gets corrupted or missing. I got few flag which can can configured in activemq.xml.
<persistenceAdapter>
<kahaDB directory="${activemq.base}/data/kahadb"
ignoreMissingJournalfiles="true"
checkForCorruptJournalFiles="true"
checksumJournalFiles="true" />
</persistenceAdapter>
@rodrigomaia
rodrigomaia / heroku.rename
Created June 19, 2014 22:40
Renaming Heroku Apps
https://devcenter.heroku.com/articles/renaming-apps
$ heroku apps:rename newname
http://newname.heroku.com/ | git@heroku.com:newname.git
Git remote heroku updated
@rodrigomaia
rodrigomaia / ps.on.mac_os
Created June 19, 2014 22:31
How to install pg gems when use pg. app
http://stackoverflow.com/questions/20224483/cannot-install-pg-gem-in-mavericks-with-postgres-app
Updated 7th June 2014
Latest Postgres App has pg_config located in the app bundler in Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config, so the new ge command would be:
gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config
@rodrigomaia
rodrigomaia / error.libv8
Created May 30, 2014 18:43
Could not find libv8
gem install libv8 -- --with-system-v8
bundle config build.libv8 --with-system-v8