Skip to content

Instantly share code, notes, and snippets.

View meiazero's full-sized avatar
🎯
Focusing

Emanuel Avila meiazero

🎯
Focusing
View GitHub Profile
@meiazero
meiazero / install-apache-hadoop-and-spark.sh
Created October 25, 2025 22:22
Apache Hadoop and Apache Spark installation
#!/bin/bash
set -xeu # Encerra o script se um comando falhar
# --- Variáveis de Versão ---
# Verificado em 2025-10-25
HADOOP_VERSION="3.4.2"
SPARK_VERSION="4.0.1"
SPARK_BUILD_NAME="spark-${SPARK_VERSION}-bin-hadoop3"
# Usuário dedicado para o cluster
@meiazero
meiazero / instructions.md
Created June 18, 2025 16:34
ChatGPT Instructions

Traits:

You are an assistant in software engineering, I am a senior software engineer.
I need you to answer questions directly, without verbosity, using as few words as
possible for the most exact answer as possible. I don't need you to be friendly,
I don't need you to make sassy remarks. I despise you trying to be clever without
justification. Give me straight technical answers and do not try to chat beyond that.
Stay in full stoic mode for the duration of this chat and do not fall back to trying 
to impress me with remarks. This is only rule you cannot break. Do not be talkative and 
conversational. Tell it like it is; don't sugar-coat responses. You are also a graduate 
@meiazero
meiazero / utils.ts
Created January 26, 2025 14:22
Generate url-friendly slugs with nanoid
export function generateFriendlySlug(text: string): string {
const slug = text
.toLowerCase()
.replace(/[^a-z0-9\s]+/g, "")
.replace(/\s+/g, "-")
.replace(/-+/g, "-")
.replace(/^-+|-+$/g, "");
return slug;
}
@meiazero
meiazero / deepseek-prompt.txt
Last active January 24, 2025 22:50
Deepseek Prompt to usage with code
<context>
You are an expert programming AI assistant who prioritizes minimalist, efficient code.
You plan before coding, write idiomatic solutions, seek clarification when needed, and accept user preferences even if suboptimal.
</context>
<planning_rules>
- Create 3-step numbered plans before coding
- Display current plan step clearly
- Ask for clarification on ambiguity
- Optimize for minimal code and overhead
#!/bin/bash
# Lista de modelos e seus respectivos comandos de download
declare -A models=(
["Llama 3.2 3B"]="ollama pull llama3.2"
["Llama 3.2 1B"]="ollama pull llama3.2:1b"
["Llama 3.2 Vision 11B"]="ollama pull llama3.2-vision"
["Phi 3 Mini 3.8B"]="ollama pull phi3"
["Phi 3 Medium 14B"]="ollama pull phi3:medium"
["Gemma 2 2B"]="ollama pull gemma2:2b"

Conteudo do WorkShop

Ideação:

A etapa de ideação, é onde se testam hipóteses e é possível verificar o comportamento do mercado.

Na ideação é a hora de tirar a sua ideia do papel — se debruçar e fazer pesquisas sobre mercado, além de estudar sobre o meio que você pretende se inserir. Assim, você consegue analisar e identificar a oportunidade de surgimento. É nessa fase que você precisa compreender e investigar quais as necessidades e desejos que os clientes em potencial estão buscando, a fim de identificar quais suas dores, para conseguir mostrar e solucionar essa dor identificada por você. Para isso, é preciso analisar e compreender melhor o problema que se deseja solucionar, testar hipóteses e validá-las, ou seja, é necessário ir além e não apenas ter ótimas ideias.

\twocolumn[
\begin{center}
\begin{table}[ht]
\centering
\begin{tabularx}{\textwidth}{|X|X|X|X|X|X|}
\hline
Column 1 & Column 2 & Column 3 & Column 4 & Column 5 & Column 6 \\
\hline
Data 1 & Data 2 & Data 3 & Data 4 & Data 5 & Data 6 \\
Data 7 & Data 8 & Data 9 & Data 10 & Data 11 & Data 12 \\
@meiazero
meiazero / main.js
Last active July 29, 2024 21:04
A simple script to send a spam message to remind the user to schedule lunch
async function enviarScript(scriptText){
const lines = scriptText.split(/[\n\t]+/).map(line => line.trim()).filter(line => line);
main = document.querySelector("#main"),
textarea = main.querySelector(`div[contenteditable="true"]`)
if(!textarea) throw new Error("Não há uma conversa aberta")
for(const line of lines){
console.log(line)
// simple version
export type Prettify<T> = {
[K in keyof T]: T[K];
} & {};
// complex version
type DeepPrettifyFunction<F> = F extends (...args: infer A) => infer R
? (...args: A) => Prettify<R>
: never;
@meiazero
meiazero / env.ts
Created April 14, 2024 15:40
Trick to extend node.js native `ProcessEnv` interface to include your own environment variables with zod
import { z } from "zod";
export const envVariables = z.object({
// your env variables like:
HOST: z.string(),
PORT: z.number().int().positive(),
});
// Parse the environment variables to ensure they match the schema
envVariables.parse(process.env);