Skip to content

Instantly share code, notes, and snippets.

View felipedavi's full-sized avatar
🎯
Focused on learning more

Felipe Oliveira felipedavi

🎯
Focused on learning more
View GitHub Profile
@felipedavi
felipedavi / bitcoin-brl
Created June 30, 2024 15:28
Bitcoin in Real (Google Finance - Web scraping - Python)
#!/usr/bin/env python3
import requests, re
from bs4 import BeautifulSoup
url = 'https://www.google.com/finance/quote/BTC-BRL'
headers = {
'Accept-Language': 'pt-BR'
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
soup = BeautifulSoup(response.text, 'html.parser')
@felipedavi
felipedavi / block_paragraph.html
Created March 28, 2023 12:56
Block Copy Past HTML Paragraphs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Block Paragraph</title>
<style>
body {
width: 80%;
@felipedavi
felipedavi / rockPaperScissors.py
Created December 25, 2022 03:49
Day2 Try Aoc 2022
#coding: utf-8
score = int(0)
pointsh={"Rock":1, "Paper":2, "Scissors":3}
points={"Winner":6, "Draw":3, "Loser":0}
file = open("dataday.txt", "r")
for line in file:
if line in ['\n', '\r\n']:
pass
else:
tmp = line.split(' ')
@felipedavi
felipedavi / CurrencyMask.kt
Created June 5, 2022 17:26
Currency Mask - Real BRL
import android.text.Editable
import android.text.TextWatcher
import android.util.Log
import android.widget.EditText
import java.math.BigDecimal
import java.text.DecimalFormat
import java.text.NumberFormat
import java.util.*
class CurrencyMask(private val editText: EditText) : TextWatcher {
@felipedavi
felipedavi / README.md
Last active February 28, 2022 20:46
Krosky CS:GO Config

Krosky CS-GO Config

launch options

-novid -high -language brazilian +exec krosky.cfg

@felipedavi
felipedavi / Makefile
Created July 31, 2021 16:00
Java Makefile
# vim: noet ft=make:
JAVAC = javac
JAVA = java
SRC := $(wildcard *.java)
TARGET := $(SRC:%.java=%.class)
BIN := $(TARGET:%.class=%)
all: run
@felipedavi
felipedavi / hora-certa
Created May 31, 2021 17:28
Keep Linux Time Synchronized without NTP
#!/usr/bin/env bash
# Manter Horário Linux Sincronizado sem NTP
# ------------------------------------------------------------------
sudo date +%s -s @$(curl -s http://pcdsh01.on.br/RelogioServidor.php) > /dev/null
@felipedavi
felipedavi / README.md
Last active May 22, 2021 11:58
Padrões de Commits

Styleguides

Mensagens de commit

  • Usar modo imperativo ("Adiciona feature" não "Adicionando feature" ou "Adicionada feature").
  • Primeira linha deve ter no máximo 72 caracteres.
  • Considere descrever com detalhes no corpo do commit.
  • Considere usar um emoji no início da mensagem de commit.

Emoji | Code | Commit Type

@felipedavi
felipedavi / .xinitrc
Last active May 13, 2021 18:00
Switching between desktop environments/window managers
#!/bin/sh
session=${1:-i3}
case $session in
i3|i3wm) exec i3;;
kde) exec startplasma-x11;;
*) exec $1;;
esac
@felipedavi
felipedavi / calc-media-parcial.py
Created May 10, 2021 20:57
Cálculo de Nota Necessária na Recuperação para Atingir a Média do IFRJ.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# vim: set fileencoding=utf-8 :
__author__ = "Felipe Oliveira"
__license__ = "MIT"
""" calc-media-parcial.py:
Cálculo de Nota Necessária na Recuperação para Atingir a Média do IFRJ.
"""
b = float(input("INFORME A NOTA PARCIAL NO BIMESTRE: "))
x = (15 - b)/1.5