Skip to content

Instantly share code, notes, and snippets.

View LeonardoWlopes's full-sized avatar
🚀
Launching a rocket

Leonardo Lopes LeonardoWlopes

🚀
Launching a rocket
View GitHub Profile
@LeonardoWlopes
LeonardoWlopes / main-theme.json
Last active February 26, 2024 14:39
Oh my posh themes
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title_template": " {{ .Folder }} :: {{if .Root}}Admin{{end}}",
"palette": {
"main-bg": "#24283b",
"terminal-red": "#f7768e",
"pistachio-green": "#9ece6a",
"terminal-green": "#73daca",
"terminal-yellow": "#e0af68",
"terminal-blue": "#7aa2f7",
@LeonardoWlopes
LeonardoWlopes / biome.json
Last active April 16, 2024 20:06
bx-cli-configs
{
"dependencies": {},
"devDependencies": {
"@biomejs/biome": "1.6.4"
},
"scripts": {
"lint": "biome check . --apply"
},
"fileName": "biome.json",
"content": {
@LeonardoWlopes
LeonardoWlopes / raiz.py
Created April 13, 2024 16:22
codigos da thais
from decimal import *
def horner(p, x):
res = p[-1] # isto é o valor a_n
for i in range(len(p)-2, -1, -1):
res = res * x + p[i]
return res
def find_root(p, a, b, tolerance=Decimal('1e-10')):
if horner(p, a) * horner(p, b) > 0:
@LeonardoWlopes
LeonardoWlopes / json-sorter.ts
Last active July 11, 2024 02:13
Json Sort Function
import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
type JsonValue =
| string
| number
| boolean
| null
| JsonValue[]