Skip to content

Instantly share code, notes, and snippets.

View mikeesto's full-sized avatar
🙂

Michael Esteban mikeesto

🙂
View GitHub Profile
@mikeesto
mikeesto / script.sh
Created October 24, 2022 03:30
Run Python scripts on boot with PM2
pm2 start script.py --interpreter python3
@mikeesto
mikeesto / csv2bib.py
Created March 29, 2023 23:22
Convert CSV file to BibTeX
import csv
def generate_bibtex_key(authors, year):
"""Generate a BibTeX key from the first author's last name and the year"""
last_names = authors.split(",")[0].split()
last_name = last_names[-1] if len(last_names) > 0 else ""
return f"{last_name.lower()}{year}"
def convert_csv_to_bibtex(csv_file, bibtex_file):
"""Convert a CSV file to BibTeX format"""
@mikeesto
mikeesto / hotspot.md
Last active April 19, 2023 07:47
Create a local WiFi hotspot with a Raspberry Pi with custom routing

Create a local WiFi hotspot with custom routing on the Raspberry Pi

This setup lets you:

  • SSH into the Pi directly (e.g. ssh pi@raspberrypi)
  • Access things running on the Pi (e.g. a web server)
  • Set up fun domains that only exist within the local network, and can route to your services running on the Pi
  • Prevents any access to the internet which can be useful if you are running the Pi as a tech demo, or for teaching etc

This is a modified/shorter version from the official Pi docs.

@mikeesto
mikeesto / route.js
Created May 25, 2024 08:47
Fal.ai hide prompt nextjs
// app/api/fal/proxy/route.js
import { route } from "@fal-ai/serverless-proxy/nextjs";
export const POST = async (req) => {
const body = await req.json();
const modifiedBody = {
...body,
prompt: `an illustration of a ${body.input} in the style of Vincent van Gogh`,
@mikeesto
mikeesto / whisper-benchmarks.txt
Created August 15, 2024 04:22
Rough whisper benchmarks
MBP M3 Pro 36GB
Transcribing 39:00 min video
1:30 - MLX with distil-large-v3-ggml
1:44 - whisper.cpp with ggml-small.en and flash attention flag (-fa)
1:45 - whisper.cpp with ggml-small.en