Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / instalaciones-expo-gemini.md
Created May 9, 2025 15:53
Instalaciones para el curso de Gemini con React Native y Expo
@Klerith
Klerith / trivia-maker-gemini.txt
Created April 29, 2025 13:23
Generar preguntas de trivia
Eres un generador de trivias, se te pedir谩n preguntas de conocimiento general
y debes de generar 3 respuestas incorrectas y una correcta
El indice debe de variar de posici贸n, de vez en cuando genera una pregunta s煤per complicada de responder
{
question: "aqu铆 es donde va la pregunta general"
answers: [
"answer 1",
"answer 2",
"answer 3",
@Klerith
Klerith / gemini-instruction.txt
Created April 28, 2025 19:19
Instrucciones para Gemini
Eres un Pokedex, que da recomendaciones de Pok茅mon para combatir contra otros Pok茅mon.
Responde en un JSON, con el ID del pokemon y un ataque s煤per efectivo contra el Pok茅mon que se te da.
Siempre responde 4 pokemons
Este es el formato de respuesta:
{
1: 'tackle',
20: 'quick-attack',
23: 'thunderbolt',
25: 'thunder'
}
@Klerith
Klerith / temporal_image.dart
Created April 28, 2025 18:05
Esta clase toma un URL, lo descarga y crea un XFile
import 'package:dio/dio.dart';
import 'package:path_provider/path_provider.dart';
import 'dart:io';
import 'package:image_picker/image_picker.dart';
import 'package:uuid/uuid.dart';
// path_provider
class TemporalImages {
static Future<XFile> xFileFromUrl(String imageUrl) async {
@Klerith
Klerith / image_playground_screen.dart
Last active May 6, 2025 13:27
Pantalla de edici贸n y creaci贸n de im谩genes con Gemini
// https://gist.github.com/Klerith/85fe516a31580bd2b9d6090002ee3d24
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
import 'package:gemini_chat/config/theme/app_theme.dart';
import 'package:gemini_chat/presentation/widgets/chat/custom_bottom_input.dart';
const imageArtStyles = [
'Realista',
'Acuarela',
@Klerith
Klerith / gemini-upload-file.ts
Created April 16, 2025 18:11
Funci贸n para cargar archivos a Gemini
import { GoogleGenAI } from '@google/genai';
const fileMimeTypesByExtension = {
jpg: 'image/jpg',
jpeg: 'image/jpeg',
png: 'image/png',
gif: 'image/gif',
svg: 'image/svg+xml',
pdf: 'application/pdf',
doc: 'application/msword',
@Klerith
Klerith / custom_bottom_input.dart
Created April 15, 2025 14:23
Caja de texto con selector de im谩genes
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:gemini_chat/config/theme/app_theme.dart';
import 'package:flutter_chat_types/flutter_chat_types.dart' as types;
import 'package:image_picker/image_picker.dart';
class CustomBottomInput extends StatefulWidget {
final Function(types.PartialText, {List<XFile> images}) onSend;
final Function()? onAttachmentPressed;
@Klerith
Klerith / flutter-gemini.md
Last active April 8, 2025 13:21
Instalaciones recomendadas para el curso de Flutter + Gemini
@Klerith
Klerith / instalaciones.md
Last active April 7, 2025 14:35
TanStack Query - Instalaciones - YouTube

TanStack Query

Tanstack Logo

Instalaciones

@Klerith
Klerith / chat.interface.ts
Created March 11, 2025 17:54
Este es un archivo con informaci贸n ficticia que simula un backend con latencia.
export enum Plan {
BASIC = 'basic',
PRO = 'pro',
PREMIUM = 'premium',
ENTERPRISE = 'enterprise',
}
export interface Client {
id: string; // C1-12345
name: string;