Install the Rails gem if you haven't done so before
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CorreiosApiService | |
def self.get_token | |
token = nil | |
correios_token = CorreiosToken.all.first | |
if correios_token.nil? || correios_token.expires_at <= Time.now.utc - 30 * 60 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//PRA PEGAR O EMAIL E O TOKEN PRA SE AUTENTICAR NA API DO PAGSEGURO VC PRECISA IR NO PAINEL LA DO SANDBOX, NO MENU LATERAL NA ESQUERDA | |
// EM PERFIS DE INTEGRAÇÃO/VENDEDOR AI OS DADOS ESTAO NO INICIO DA PAGINA EM VENDEDOR DE TESTES; | |
//O PROCESSO DESCRITO ACIMA SÓ TE DA O EMAIL E O TOKEN DO AMBIENTE DE TESTE(SANDBOX), PRA PEGAR O EMAIL E O TOKEN DE PRODUÇÃO VOCE | |
//PRECISA LOGAR NA SUA CONTA DO PAGSEGURO FORA DO SANDBOX pagseguro.uol.com.br-> ACESSAR MINHA CONTA, | |
// NO MENU LATERAL NA ESQUERDA IR EM APLICAÇOES/MINHAS APLICAÇOES E CLICAR EM CRIAR NOVA APLICAÇÃO, AI VC PREENCHE TUDO QUE ELES PEDEM //QUE É OBRIGATORIO, DEPOIS VÁ EM PREFERENCIAS/INTEGRAÇÕES NO MENU LATERAL E EM UTILIZAÇÃO DE API CLIQUE EM GERAR UM TOKEN QUE VOCE VAI //USAR NO METODO INICIAR COM O EMAIL DA SUA CONTA DO PAGSEGURO QUE É O MESMO EMAIL USADO NO SANDBOX, EM PRODUÇÃO SO ALTERNE OS TOKENS; | |
//ABAIXO DOS IMPORTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for debugging with valgrind | |
#daemon off; | |
#master_process off; | |
#user nobody; | |
worker_processes 1; | |
worker_rlimit_core 500M; | |
working_directory /tmp/nginx_cores/; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char) | |
# |<---- Preferably using up to 50 chars --->|<------------------->| | |
# Example: | |
# [feat] Implement automated commit messages | |
# (Optional) Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# (Optional) Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.min.js" defer></script> | |
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# used to install offical chrome and selenium on Ubuntu 16.04.1 LTS, 18.04 desktop, Jan 2020 | |
# also tested and works on Elem OS 5.1 :) | |
cd ~ | |
sudo apt-get update | |
sudo apt install python-pip | |
pip install simplejson | |
pip install bs4 | |
pip install selenium | |
apt-get install libasound2 libnspr4 libnss3 libxss1 xdg-utils unzip |
When a lot of people are working on the same Rails application, than Vagrant could help to set up environment quick and easy. Even Vagrant is not recommended for production, it is very usefull for testing deployment script. For production we can simply copy deployment script and run manually.
We can deploy Ruby on Rails app using a quick way to deploy ruby on rails on vagrant.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 10%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 30%)", | |
"@gray-light": "lighten(@gray-base, 50%)", | |
"@gray-lighter": "lighten(@gray-base, 90%)", | |
"@brand-primary": "#337ab7", | |
"@brand-success": "#28B62C", |
NewerOlder