Skip to content

Instantly share code, notes, and snippets.

@JarbasAl
JarbasAl / llama_intents.py
Created October 6, 2023 20:51
a intent parser using llama.cpp and mistral-7b
import json
from typing import List
from llama_cpp import ChatCompletionMessage, Llama, LlamaGrammar
TRAINING_INTENTS = [
{
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
@alexhaydock
alexhaydock / nm-clat.nix
Last active February 15, 2026 19:34
NixOS module to overlay latest NetworkManager with CLAT
# /etc/nixos/nm-clat.nix
{ config, pkgs, ... }:
{
# Use NetworkManager
networking.networkmanager.enable = true;
# Horrible hack to create a dispatcher to enable CLAT every time a connection
# comes up since networkmanager.settings doesn't seem to accept settings that
# only exist in the upstream dev branch
@jimmyhillis
jimmyhillis / keybindings.md
Last active February 15, 2026 19:33
iTerm 2 Mac-ready key binding additions.

Standard bindings

  • Move left between words: ⌥← | send escape sequence | b
  • Move right between words: ⌥→ | send escapes sequence | f
  • Start of the line: ⌘← | send escape sequence | [H
  • End of the line ⌘→ | send escape sequence | [F
  • Delete previous word ⌥←Delete | send hex code | 0x1B 0x08
  • Delete entire line ⌘←Delete | send hex code | 0x15

Don't forget the amazing icons ⌘ = command and ⌥ = options/alt (why oh why?).

@rssnyder
rssnyder / oracle-cloud-free-tier-guide.md
Last active February 15, 2026 19:31
oracle-cloud-free-tier-guide

how to leverage oracle's temping offers

free tier limits

The limits of the free tier say that you can create up to 4 instances.

  • x2 x86 instances (2core/1g)
  • x2 ampere instances (with 4core/24g spread between them)
  • 200GB total boot volume space across all intances (minimum of 50G per instance)

create your account

@karpathy
karpathy / microgpt.py
Last active February 15, 2026 19:33
microgpt
"""
The most atomic way to train and inference 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
@aravindnc
aravindnc / Activate_Windows_8_8.1_10_and_11_Pro_for_Free.md
Created February 19, 2024 17:15
Activate Windows 8, 8.1, 10 and 11 Pro for Free

Activate Windows 8, 8.1, 10 and 11 Pro for Free

A guide how to get and activate Windows 8, 8.1, 10 and 11 Pro for free!

NOTE

If you see the Windows keyboard button in this guide; and you can't find it on your keyboard, you likely have/had Windows 10 which has the button . If you can't find that one, you likely have a PC that has been upgraded to Windows 8/8.1/10/11 from Windows 8.1/8/7/Vista/XP and other ones. If you have one of those, refer the Windows key button to as yours. A list of them is below:

Windows key buttons

- Windows 11

- Windows 10

@nitefood
nitefood / Alexa-Gemini Step by Step Guide.md
Last active February 15, 2026 19:26
How to Connect Alexa to Gemini: A Step-by-Step Guide Using n8n

Step-by-Step Setup

  1. Access the Alexa Developer Console: Go to https://developer.amazon.com/alexa/console/ask.
  2. Create a New Skill: Click on Create Skill, give it a name, and choose your preferred language.
  3. Choose a Template: Select the "Start from Scratch" template and leave the rest as the default.

Configure the Skill

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active February 15, 2026 19:26
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under the Quests tab
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
@rodrigocorreaecastro
rodrigocorreaecastro / como-fazer-os-commits-da-forma-correta.md
Last active February 15, 2026 19:22
Como fazer os commits da forma correta

Conventional Commits

O que é?

O Conventional Commits é uma convenção simples de mensagens de commit, que segue um conjunto de regras e que ajuda os projetos a terem um histórico de commit explícito e bem estruturado.

Como utilizar

As regras são muito simples, como demonstrado abaixo temos um tipo de commit (type), o escopo/contexto do commit (scope) e o assunto/mensagem do commit (subject).

@notnotrobby
notnotrobby / cgp.md
Last active February 15, 2026 19:19
List of free resources to study computer graphics programming.