Skip to content

Instantly share code, notes, and snippets.

View asanchez75's full-sized avatar

Adam Sanchez asanchez75

View GitHub Profile
@asanchez75
asanchez75 / minimax_tool_call_adapter.py
Last active May 23, 2026 07:40
LiteLLM proxy plugin: MiniMax XML tool call → OpenAI JSON adapter . For Minimax2.7 running on Llama.cpp
"""
LiteLLM proxy plugin: MiniMax XML tool call → OpenAI JSON adapter.
Registered via litellm_config.yaml:
litellm_settings:
callbacks:
- plugins.minimax_tool_call_adapter.minimax_logger
Requires PYTHONPATH to include the plugins directory (set via PYTHONPATH env var in docker-compose.yml).
"""
@asanchez75
asanchez75 / microgpt.py
Created March 6, 2026 19:31 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp

Install OpenStack on a Hetzner VQ7 server

Reinstall Ubuntu

  1. Boot the server into the 64bit Linux rescue system
  2. Run installimage
  3. Select Ubuntu 11.10 (oneiric) 64bit
  4. In the editor, where you have to set the disk partition sizes, search for following lines and remove them. The actual lines may vary if Hetzner changes anything.
@asanchez75
asanchez75 / RDF Data Access and Data Management
Created October 8, 2014 12:33
14. RDF Data Access and Data Management
14. RDF Data Access and Data Management
Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
@asanchez75
asanchez75 / README.txt
Created February 23, 2025 21:31 — forked from adshrc/README.txt
Cloudflare Maintenance Page - Simple Cloudflare Worker
Easy to use Maintenance page as a Cloudflare Worker. Once set up, you can enable it for unlimited pages in your CF account. Get rid of greedy subscriptions that charge you per domain.
How to:
1. Go to Cloudflare Workers and create a new Worker (url is https://dash.cloudflare.com/<your-id>/workers/new)
2. paste the Code from above
3. Set an AUTH_KEY and AUTH_VALUE and the maintenancePageHtml (optionally)
4. deploy the worker
5. goto Cloudflare and choose a domain, click on the Workers section (url is https://dash.cloudflare.com/<your-id>/<domain>/workers)
6. click on "Add Route" and set the Route you want to enable the maintenance page for (typically <domain>/*)
7. choose your previously created worker from the dropdown
@asanchez75
asanchez75 / nginx_reverse_for_notebook
Created February 10, 2020 12:30 — forked from kent119/nginx_reverse_for_notebook
Config Nginx as a reverse proxy for Jupyter notebook on VPS
# /etc/nginx/sites-enabled/some.domain
# Change the server name {some.domain}
# Change the {host.of.notebook} and {port} in the following locations
server {
listen 80;
# Change the server name {some.domain}
server_name some.domain;
location / {
# Change the {host.of.notebook} and {port}
proxy_pass http://host.of.notebook:port;
e7f34b6faaa6:/var/www/html# composer require 'drupal/core-composer-scaffold:9.5.9' --with-all-dependencies
./composer.json has been updated
Running composer update drupal/core-composer-scaffold --with-all-dependencies
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
<http://www.side-sante.fr/sides> <rdf:type> <owl:Ontology> .
<http://www.side-sante.fr/sides> <owl:backwardCompatibleWith> <http://www.side-sante.fr/sides/version/1.0> .
<http://www.side-sante.fr/sides> <owl:versionIRI> <http://www.side-sante.fr/sides/version/2.0> .
<:01_definition> <rdf:type> <:EDN_Rubric> .
<:02_prevalence_epidemiology> <rdf:type> <:EDN_Rubric> .
<:03_physiopathology> <rdf:type> <:EDN_Rubric> .
<:04_diagnosis> <rdf:type> <:EDN_Rubric> .
<:05_multimediaContent> <rdf:type> <:EDN_Rubric> .
<:06_emergencyIdentification> <rdf:type> <:EDN_Rubric> .
<:07_etiology> <rdf:type> <:EDN_Rubric> .
@asanchez75
asanchez75 / access_postgresql_with_docker.md
Created September 20, 2022 09:21 — forked from MauricioMoraes/access_postgresql_with_docker.md
Allow Docker Container Access to Host's Postgres Database on linux (ubuntu)

You have to do 2 things in order to allow your container to access your host's postgresql database

  1. Make your postgresql listen to an external ip address
  2. Let this client ip (your docker container) access your postgresql database with a given user

Obs: By "Host" here I mean "the server where docker is running on".

Make your postgresql listen to an external ip address

Find your postgresql.conf (in case you don't know where it is)

$ sudo find / -type f -name postgresql.conf

@asanchez75
asanchez75 / iterm.el
Created September 13, 2022 14:41 — forked from johnmastro/iterm.el
Send text from Emacs to iTerm
;;; iterm.el - Send text to a running iTerm instance
(require 'pcase)
(require 'thingatpt)
;; To match SublimeText's key binding:
;; (global-set-key (kbd "<C-return>") 'iterm-send-text)
(defvar iterm-default-thing 'line
"The \"thing\" to send if no region is active.