Skip to content

Instantly share code, notes, and snippets.

View terremoth's full-sized avatar
🌄
#OpenToWork

Lucas M. Dutra terremoth

🌄
#OpenToWork
View GitHub Profile
@terremoth
terremoth / gta-sa-terremoth-starter-save-stats.md
Last active March 16, 2026 01:27
GTA San Andreas Terremoth Master Start Save stats

GTA San Andreas Terremoth Master Save

(table with id/check, description, requirement, required for 100%, reward)

  • without die

  • without being arrested

  • no cheats used

  • maximum health

  • maximum stamina

@terremoth
terremoth / check-sites.ps1
Created March 15, 2026 05:04
Check website list file, one per line, to se if it is online
param(
[string]$FilePath
)
if (-not (Test-Path $FilePath)) {
Write-Host "File not found: $FilePath" -ForegroundColor Red
exit
}
$sites = Get-Content $FilePath
@terremoth
terremoth / predict_gemini.py
Created January 30, 2026 04:40
Código "vibe-coded" com chatgpt+gemini para "prever" a quantidade de consoles handhelds que vão sair em 2026.
import numpy as np
import pandas as pd
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
from statsmodels.tsa.holtwinters import ExponentialSmoothing
from statsmodels.tsa.arima.model import ARIMA
from statsmodels.tsa.statespace.structural import UnobservedComponents
from scipy.optimize import curve_fit
import warnings
@terremoth
terremoth / filter_authless_apis.py
Created January 23, 2026 23:07
Filter API's with no CORS neither Authentication from https://github.com/public-apis/public-apis
from bs4 import BeautifulSoup
with open("input.html", "r", encoding="utf-8") as f:
soup = BeautifulSoup(f, "html.parser")
for table in soup.find_all("table"):
tbody = table.find("tbody")
if not tbody:
continue
@terremoth
terremoth / cmd.php
Last active January 9, 2026 18:25
get windows cmd/terminal information
<?php
$tty = array_map(fn($line) => $line[1], array_filter(array_map(fn($line)=> explode(":", $line), array_map(fn($line) =>
preg_replace("/\s+/", "", $line),explode("\n", shell_exec("mode con")))), fn($line) => count($line)>1));
@terremoth
terremoth / urso.ino
Created December 5, 2025 14:25
Comportamento do urso - roboi de mamão
#include <Servo.h> // Include the Servo library
Servo myServo; // Create a Servo object
const int SonarTrigger = 7; // define o pino 7 como Trigger
const int SonarEcho = 8; // define o pino 6 como Echo
const int led_olhos = 9;
const int buzzer = 10;
const int servo = 11; // Pino do servo
@terremoth
terremoth / post.md
Created September 9, 2025 23:32 — forked from vinicius73/post.md
["LÓGICA DE PROGRAMAÇÃO" É BOBAGEM, e explicarei porquê.]

#["LÓGICA DE PROGRAMAÇÃO" É BOBAGEM, e explicarei porquê.]

Se preparem que o texto é longo.

Várias vezes chegam novatos aqui perguntando como começar, e a galera diz "estuda lógica primeiro, depois vai pra linguagem X". Vivo dizendo que é bobagem. Ontem, em particular, falei isso, e vieram várias pessoas por inbox me perguntar porquê (e uma pra me xingar, achando que falei por arrogância).

Pra facilitar, eu vou escrever uma boa explicação de porquê "lógica de programação" é furada, doa a quem doer, e postar na APDA e no fórum da EnergyLabs (para futuras referências, porque esse assunto vai voltar, ctz).

@terremoth
terremoth / hello.s
Created August 7, 2025 05:50
Hello World in assembly x64 using AT&T syntax
.section .data
msg:
.asciz "Hello, World!\n"
.section .text
.global main
main:
mov $1, %rax
mov $1, %rdi
@terremoth
terremoth / child.html
Last active May 11, 2025 16:35
Father - child html page communication with JavaScript postMessage
<!DOCTYPE html>
<html>
<head>
<title>Child Window</title>
<meta charset="utf-8">
</head>
<body>
<h2>Child</h2>
<input type="text" id="valueToSend" placeholder="Enter something..." />
<button onclick="sendMessage()">Send to Parent</button>
@terremoth
terremoth / versiculo.py
Last active March 16, 2026 10:28
Pega um versículo aleatório da Bíblia (em PT-BR) e printa no terminal
from requests import get
MAIN_URL = "https://onbibles.com/api/verses/random?bibleSlug=acf"
HEADERS = ({
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.2403.157 '
'Safari/537.36', 'Accept-Language': 'pt-BR, en;q=0.5'})
page = get(MAIN_URL, headers=HEADERS)