Skip to content

Instantly share code, notes, and snippets.

View KeithMoc's full-sized avatar
🎯
Focusing

Keith Moc KeithMoc

🎯
Focusing
  • Adelaide Australia
View GitHub Profile
@KeithMoc
KeithMoc / llm-wiki.md
Created April 5, 2026 04:55 — forked from karpathy/llm-wiki.md
llm-wiki

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@KeithMoc
KeithMoc / Manus_report.md
Created April 8, 2025 02:48 — forked from renschni/Manus_report.md
In-depth technical investigation into the Manus AI agent, focusing on its architecture, tool orchestration, and autonomous capabilities.

I wrote an in-depth research prompt to conduct a GPT-Deep-Research on the Manus topic, seeking to replicate it with currently available open source tools. This is the result:

TLDR: Manus AI Agent Report

Manus is an autonomous AI agent built as a wrapper around foundation models (primarily Claude 3.5/3.7 and Alibaba's Qwen). It operates in a cloud-based virtual computing environment with full access to tools like web browsers, shell commands, and code execution. The system's key innovation is using executable Python code as its action mechanism ("CodeAct" approach), allowing it to perform complex operations autonomously. The architecture consists of an iterative agent loop (analyze → plan → execute → observe), with specialized modules for planning, knowledge retrieval, and memory management. Manus uses file-based memory to track progress and store information across operations. The system can be replicated using open-source components including CodeActAgent (a fine-tuned Mistral model), Docker for sandbox

@KeithMoc
KeithMoc / agent loop
Created April 8, 2025 01:36 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@KeithMoc
KeithMoc / README.md
Created January 30, 2025 01:52 — forked from disler/README.md
Four Level Framework for Prompt Engineering
@KeithMoc
KeithMoc / mosh-setup-guide.md
Created January 28, 2025 23:46 — forked from marcwjj/mosh-setup-guide.md
Step by step guide to setup mosh ssh client to Google Cloud VM instance

A beginner's guide to setup Mosh roaming terminal on Mac to access Google Cloud Compute Engine instance

Being new to training ML models using Google Cloud VM instances, I faced issues where my ssh connection to the cloud instance (using either the clound web-based ssh client or using cloud shell) would disconnect from time to time (for example when I power off my laptop or the network gets disconnected) which would terminate the model training process. Therefore I searched for a ssh client that can handle disconnection and can resume connection without disrupting the process running on the server and came across with Mosh mobile shell, a remote terminal app that supports roaming.

It took me a while to figure out how to set up a third party ssh terminal using the google cloud OAuth. Here's a step-by-step guide:

Update: a simpler alternative for persisting remote sessions

Since this writing, another Mosh user kindly advised me that using terminal multiplexer co

@KeithMoc
KeithMoc / cursorrules.html
Created December 13, 2024 14:24 — forked from artsparkAI/cursorrules.html
example of cursorrules (ignore .html extension, just for highlighting)
You are a world-class Staff Engineer in React, Typescript, Next.js and Tailwind CSS. Your role is to generate complete,
functional front-end code based on the user's specifications. Adhere to these guidelines:
<CleanCode>
Don't Repeat Yourself (DRY)
Duplication of code can make code very difficult to maintain. Any change in logic can make the code prone to bugs or can
make the code change difficult. This can be fixed by doing code reuse (DRY Principle).
The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative representation
@KeithMoc
KeithMoc / kvm_minikube.md
Created July 26, 2024 01:47 — forked from alexellis/kvm_minikube.md
Run multiple minikube Kubernetes clusters on Ubuntu Linux with KVM

Ramp up your Kubernetes development, CI-tooling or testing workflow by running multiple Kubernetes clusters on Ubuntu Linux with KVM and minikube.

In this tutorial we will combine the popular minikube tool with Linux's Kernel-based Virtual Machine (KVM) support. It is a great way to re-purpose an old machine that you found on eBay or have gathering gust under your desk. An Intel NUC would also make a great host for this tutorial if you want to buy some new hardware. Another popular angle is to use a bare metal host in the cloud and I've provided some details on that below.

We'll set up all the tooling so that you can build one or many single-node Kubernetes clusters and then deploy applications to them such as OpenFaaS using familiar tooling like helm. I'll then show you how to access the Kubernetes clusters from a remote machine such as your laptop.

Pre-reqs

  • This tutorial uses Ubuntu 16.04 as a base installation, but other distributions are supported by KVM. You'll need to find out how to install
@KeithMoc
KeithMoc / restrict-ansible-playbook-for-specific-os.md
Last active March 8, 2022 03:52
Stop ansible-playbook when we restricted the role to be run only on Ubuntu

[!info] Put these lines at the beginning of the tasks/main.yml file.

# show the error message when the remote host is not an Ubuntu OS.
- name: End the playbook
  fail:
    msg: "Mongodb role supports Ubuntu only."
 when: ansible_distribution != 'Ubuntu'
@KeithMoc
KeithMoc / ansible-download-file-to-local.md
Created March 8, 2022 00:03
Ansible - Download a file to local host at current role/files directory

Checksum from path

- name: get download file checksum
  uri:
    url: "{{ download_file_checksum_path_sha512 }} "
    return_content: yes
  register: checksum
  
 - name: download file
@KeithMoc
KeithMoc / wireguard_set_peer.md
Last active September 3, 2021 08:00
Wiguard set Peer without restart the service

1. Run wg command to set Peer configuration

sudo wg set wg0 peer <Peer_Public_Key> allowed_ips x.x.x.x/24,x.x.x.x/32 wg0: is the interface of the wireguard (etc. wg0, wg1, etc.)

2. Check the effect of the action

sudo wg show