Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Go to disposable container on a given namespace
# Usage: disposable <namespace>
# Example:
# $ disposable production-edupass
disposable() {
local namespace="$1"
if [ -z "$namespace" ]; then
@guilhermeteodoro
guilhermeteodoro / gist:3771ea060d25b9e11ec67632eb757970
Created November 9, 2021 13:45 — forked from tombh/gist:b45e86788620435adc5a
Use .env file to filter sensitive data from VCR cassettes
# Assuming that you're using .env to store your sensitive app credentials, then you can
# use VCR's `filter_sensitive_data` method to convert occurrences of those credentials
# to `<%= ENV['#{key}'] %>` in your recorded VCR cassettes.
require 'vcr'
# Use the .env file to compile the list of sensitive data that should not be recorded in
# cassettes
def sensitive_strings
contents = File.read "#{Rails.root}/.env"
files = {'MG/issued': ['31181024217653000276570010006591261186626184', '31181024217653000276570010006591271001202770', '31181024217653000276570010006591281080923058', '31181024217653000276570010006591291813732957', '31181024217653000276570010006591301597813037', '31181024217653000276570010006591311341477523', '31181024217653000276570010006591321586025150', '31181024217653000276570010006591331988697371', '31181024217653000276570010006591341662806850', '31181024217653000276570010006591351399378977', '31181024217653000276570010006591361651253298', '31181024217653000276570010006591371269851367', '31181024217653000276570010006591381680522883', '31181024217653000276570010006591391092932948', '31181024217653000276570010006591401397204513', '31181024217653000276570010006591411430041468', '31181024217653000276570010006591421888548977', '31181024217653000276570010006591431869471090', '31181024217653000276570010006591441284654563', '31181024217653000276570010006591451197464429', '3118102421765300027657001000659146181850
@guilhermeteodoro
guilhermeteodoro / loggi.rb
Created April 16, 2018 17:20
Test for loggi
text = <<-EOS
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Maecenas et tellus sed massa blandit dictum. Pellentesque at nisi neque.
Suspendisse sed purus vitae est molestie sollicitudin eget nec quam.
Quisque sollicitudin pharetra justo quis elementum. Vivamus pretium dictum sapien ut ultrices. Donec elementum neque sed molestie ullamcorper. Fusce sodales sapien vel egestas posuere.
EOS
cleaned_text =
text
.strip
@guilhermeteodoro
guilhermeteodoro / pis.rb
Created October 11, 2017 19:28
Generates and validates a pis/pasep number
# frozen_string_literal: true
module PisNumber
class Calculator
WEIGHTS = [3, 2, 9, 8, 7, 6, 5, 4, 3, 2].freeze
def generate
random_number = rand(1_000_000_000..9_999_999_999).to_s
digit = calculate_digit to_a(random_number)
@guilhermeteodoro
guilhermeteodoro / avatar.html
Created October 5, 2017 17:38
an html to generate avatars from urls
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script
src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="

Desafio CargoX

Bem vindo! Se você está aqui é porque gostamos do seu perfil e queremos conhecer um pouco mais sobre suas habilidades como desenvolvedor.

O que deverá ser feito?

Você deverá desenvolver um CONFIGURADOR DE FORMULÁRIOS. O exercício se divide em 2 etapas: 1 - Formulário Configurador e 2 - Formulário Alvo

1 - Formulário Configurador

@guilhermeteodoro
guilhermeteodoro / chess_table.rb
Created September 29, 2015 00:53
Bio Ritmo chess table challenge: generates a chess table in a html file.
require 'fileutils'
html = <<-eos
<!doctype html>
<html lang='pt-BR'>
<head>
<meta charset='utf-8'>
<title>Super Xadrez</title>
# create file adb-hosts
192.168.0.133 adm.dev
192.168.0.133 api.clickjogos.dev
192.168.0.133 clickjogos.dev
192.168.0.133 connect.clickjogos.dev
192.168.0.133 devcenter.dev
192.168.0.133 jdm.dev
192.168.0.133 m.clickjogos.dev
192.168.0.133 sso_example.clickjogos.dev

Removendo o fix existente

Quando for deployada a remoção do fix dos bgs acontecerá a seguinte situação:

error

Esse fix remove uma regra de css que obriga o background subir:

  • No Click Jogos background-position: 50% -31px !important
  • No Jogos de Meninas background-position: 50% -29px !important