Skip to content

Instantly share code, notes, and snippets.

View Pompeu's full-sized avatar
:octocat:
Focusing

Itacir Ferreira Pompeu Pompeu

:octocat:
Focusing
  • PompeuSolutions
  • Buriti Alegre - GO
  • 07:21 (UTC -03:00)
View GitHub Profile
@Pompeu
Pompeu / exercicios_2_.md
Created September 23, 2021 15:34
exercicios_2_.md

Exercícios if/else

  1. Escreva um programa para ler 2 valores (considere que não serão informados valores iguais) e escrever o maior deles.
  2. Escreva um programa para ler o ano de nascimento de uma pessoa e escrever uma mensagem que diga se ela poderá ou não votar este ano (não é necessário considerar o mês em que ela nasceu).
  3. Escreva um programa que verifique a validade de uma senha fornecida pelo usuário. A senha válida é o número 1234. Devem ser impressas as seguintes mensagens: ACESSO PERMITIDO caso a senha seja válida.
@Pompeu
Pompeu / axios.js
Created August 24, 2021 23:01
axios.js
// npm init
// npm install axios --save
const axios = require("axios");
const id = 1;
const getUrl = "https://jsonplaceholder.typicode.com/posts/";
const log = (res) => console.log(res.data);
@Pompeu
Pompeu / install_nodejs_ubuntu.sh
Last active August 4, 2023 20:45
install_nodejs_ubuntu.sh
wget https://nodejs.org/dist/v14.17.4/node-v14.17.4-linux-x64.tar.xz \
tar -xvf node-v14.17.4-linux-x64.tar.xz \
cd node-v14.17.4-linux-x64/ \
# edite seu .bashrc ou .zshrc com esse if abaixo
#if [ -d "$HOME/Downloads/node-v14.17.4-linux-x64" ] ; then
# PATH="$PATH:$HOME/Downloads/node-v14.17.4-linux-x64/bin"
#fi
#https://nodejs.org/en/https://nodejs.org/en/
@Pompeu
Pompeu / send_email.js
Last active July 21, 2021 01:17
send_email.js
// comandos
// npm init
// npm install rxjs
// npm install @sendgrid/mail
const fs = require("fs");
const { from } = require("rxjs");
const { filter, map } = require("rxjs/operators");
const sgMail = require("@sendgrid/mail");
//server
const express = require("express");
const formidable = require("formidable");
const app = express();
app.post("/", (req, res, next) => {
const form = formidable({
multiples: true,
keepExtensions: true,
import functools
"""
Escreva uma função:
def solucao(A: int, B: int, K: int) -> int:
que, dados três inteiros A, B e K, retorna o número de inteiros dentro do intervalo [A..B] que são divisíveis por K, ou seja:
{i: A ≤ i ≤ B, i mod K = 0}
@Pompeu
Pompeu / timeout.py
Created August 5, 2020 02:58 — forked from TySkby/timeout.py
Timeout decorator/context manager using signals (for Python 3)
#!/usr/bin/env python3
"""Easily put time restrictions on things
Note: Requires Python 3.x
Usage as a context manager:
```
with timeout(10):
something_that_should_not_exceed_ten_seconds()
```
#property copyright "Itacir Ferreira Pompeu"
#property version "0.01"
//fix extencioa
#include <Trade/Trade.mqh>
input double lote = 1.0;
input int ema_lower = 5;
double ema_lower_buffer[];
double ifr_buffer[];
@Pompeu
Pompeu / organizacao_gemfile_ruby.md
Created February 15, 2019 12:02
sugestao_organizacao_ruby.md

Orientações basicas

Nos erros de versão.

Verifique a versão na pagina oficial da gem a versão de suport do ruby e rails. Caso não haja essa informção verifique o ano em que versão ruby e com isso certifique-se de adicionar a gem com essa versão no Gemfile e faça o teste local.

Instalando bundle localmente na aplicação.

@Pompeu
Pompeu / get-latest-tag-on-git.sh
Created February 12, 2019 18:52 — forked from rponte/get-latest-tag-on-git.sh
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples