Skip to content

Instantly share code, notes, and snippets.

View rcoproc's full-sized avatar
🙏
I pray to God for our great protection in these difficult times!

Ricardo Oliveira rcoproc

🙏
I pray to God for our great protection in these difficult times!
View GitHub Profile
## GAE
From GcpAppEngineServiceSample SELECT latest(flex.cpu.Utilization), latest(flex.cpu.ReservedCores) WHERE entityName LIKE 'integration-auth.%'
From GcpAppEngineServiceSample SELECT latest(system.memory.UsageBytes), latest(system.Instances) WHERE entityName LIKE 'integration-auth.%'
From GcpAppEngineServiceSample SELECT latest(system.memory.UsageBytes / 1e9), latest(system.Instances) WHERE entityName LIKE 'integration-auth.%'/B
## Transactions
From transaction select count(****) where appName = 'Integration Auth (Production)'
from transaction select count(*) where appName = 'Integration Auth (Production)' timeseries
from transaction select count(*) where appName = 'Integration Auth (Production)' timeseries compare with 1 week ago
from transaction select count(*) where appname = 'Integration Auth (Production)' timeseries facet request.method

Texto original em Inglês: https://gist.github.com/rondy/af1dee1d28c02e9a225ae55da2674a6f

  • FWIW: Eu não produzi o conteúdo apresentado aqui (o esboço do livro de Edmond Lau). Acabei de copiar e colar de algum lugar da Internet, mas não me lembro qual é exatamente a fonte original. Também não consegui encontrar o nome do autor, por isso não posso lhe dar os devidos créditos. *

Engenheiro Eficaz(The Effective Engineer) - Notas

  • Por Edmond Lau
  • Altamente recomendado: +1:
@rcoproc
rcoproc / api_custom_spec.rb
Last active February 8, 2020 22:37
Ruby JSON API with include_json and schema test
# Json API Tests
# Para o código abaixo funcionar temos que configuras seguintes GEMS:
# gem 'rspec-json_expectations' # Utilizado no helper include_json
# gem 'json_matchers' # Utilizado pelo helper match_response_schema ...
require 'rails_helper'
RSpec.describe "Customers", type: :request do
describe "GET /customers" do
  • Dynamic Dispatch
  • Dynamic Method
  • Ghost Methods
  • Dynamic Proxies
  • Blank Slate
  • Kernel Method
  • Flattening the Scope (aka Nested Lexical Scopes)
  • Context Probe
  • Class Eval (not really a 'spell' more just a demonstration of its usage)
  • Class Macros
@rcoproc
rcoproc / 1. SRP .md
Last active April 17, 2020 02:12 — forked from Integralist/1. SRP .md
S.O.L.I.D principles in Ruby

Single responsibility principle

"Em outras palavras, todas as classes complicadas devem ser divididas em classes menores, responsáveis ​​por um comportamento específico, facilitando o entendimento e a manutenção da base de código." https://rubygarage.org/blog/solid-principles-of-ood

Probably the most well known principle, and one that should try to adhere to most of the time.

Let's say you have this code:

@chair28980
chair28980 / new_rails_app.md
Last active June 15, 2022 16:36
New rails 6 app with postgresql and heroku deployment

Create a new rails 6 app with postgresql and heroku deployment

Before we begin

@nicbet
nicbet / Dockerfile
Created June 27, 2019 03:00
Elixir 1.9 Releases Alpine Linux Docker Multi-Stage Build
# ---- Build Stage ----
FROM erlang:22-alpine AS app_builder
# Set environment variables for building the application
ENV MIX_ENV=prod \
TEST=1 \
LANG=C.UTF-8
# Fetch the latest version of Elixir (once the 1.9 docker image is available you won't have to do this)
RUN set -xe \
@bradtraversy
bradtraversy / docker-help.md
Last active July 9, 2024 10:18
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@thinkgarden
thinkgarden / git.md
Last active February 5, 2020 09:52
[git]