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
@rcoproc
rcoproc / stimulus.md
Created July 23, 2020 14:35 — forked from mrmartineau/stimulus.md
Stimulus cheatsheet
@rcoproc
rcoproc / nginx.conf
Created June 10, 2020 01:50 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@rcoproc
rcoproc / economia.md
Last active May 5, 2020 19:55
AMAZON AWS

10 MANEIRAS DE REDUZIR SUA CONTA AWS

João Helana(AWS Partner Architect) 05/05/2020

É um processo contínuo(não é porque faz hoje que não fará amanhã)


  1. Parar de pagar por instâncias ociosas(ECS, RDS)
@rcoproc
rcoproc / comments_controller.rb
Created March 24, 2020 17:42 — forked from samiron/comments_controller.rb
Sample Rails Controller
class CommentsController < ApplicationController
# GET /comments
# GET /comments.json
def index
@comments = Comment.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @comments }
end
@rcoproc
rcoproc / struct_nested.go
Created March 1, 2020 20:26
Method with struct nested
package main
import "fmt"
type Contact struct {
phone, address string
}
type Employee struct {
name string
salary int
@rcoproc
rcoproc / receptor_pointer.go
Created March 1, 2020 20:14
Receptor pointer to change value
package main
import "fmt"
type Employee struct {
name string
salary int
}
func (e *Employee) changeName(newName string) {
@rcoproc
rcoproc / array_navigation.go
Created March 1, 2020 20:00
Array definition with for navigation sample
package main
import "fmt"
func main() {
a := [...]int{1, 2, 3, 4, 5}
for index := 0; index < len(a); index++ {
fmt.Printf("a[%d] = %d\n", index, a[index])
}
@rcoproc
rcoproc / short_sintax.go
Last active March 1, 2020 19:58
Multi Dimensional array with for range navigation
package main
import "fmt"
func main() {
a := [...][2]int{{1, 2}, {3, 4}, {5, 6}}
fmt.Printf("Array is %v and type of array element is %T", a, a[0])
fmt.Println("")
for parent, child := range a {
@rcoproc
rcoproc / alias_matchers.md
Created February 27, 2020 17:16 — forked from JunichiIto/alias_matchers.md
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value