Skip to content

Instantly share code, notes, and snippets.

@jlia0
jlia0 / agent loop
Last active April 28, 2025 06:43
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
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active April 28, 2025 04:17
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@devnoname120
devnoname120 / macos_docker_xorg_forwarding.md
Last active April 25, 2025 05:20
Xorg/X11 forwarding on macOS and docker

Xorg/X11 forwarding on macOS and docker

In order to run Xorg apps on macOS you will need to install xquartz:

brew install --cask --no-quarantine xquartz

And then configure it

<script lang="ts" setup>
import "dockview-core/dist/styles/dockview.css";
import {IContentRenderer, DockviewGroupPanel, GroupPanelContentPartInitParameters, PanelUpdateEvent, Parameters, DockviewComponent} from "dockview-core"
onMounted(() => {
const root = document.getElementById("root")!;
const app = document.getElementById("app")!;
const dockviewComponent = new DockviewComponent( {
[
{
"bindings": {
// Built-in
"ctrl-g": "menu::Cancel",
"ctrl-x 5 2": "workspace::NewWindow",
"ctrl-x ctrl-c": "zed::Quit",
"ctrl-x ctrl-f": "workspace::Open",
"ctrl-x k": "pane::CloseActiveItem",
"ctrl-x o": "workspace::ActivateNextPane",
@mattsan
mattsan / rv32sim.exs
Created September 26, 2022 04:43
RISC-V subset simulator in Elixir
defmodule RV32Sim.Register do
def new do
<<0::32-unit(32)>>
end
def get(_, 0), do: 0
def get(registers, number) do
<<_::size(number)-unit(32), result::32, _::bytes>> = registers
result
@asdf8601
asdf8601 / py2mermaid.py
Last active July 2, 2024 14:59
[mermaid] classDiagram builder from python code
r"""
This requires to have the library (pkg) pre-installed.
Usage:
$ python ./py2mermaid.py --pkg pandas
$ python ./py2mermaid.py --pkg pandas --base-module pandas.core
$ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core
$ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core --raw | sed "s/\w\.\(\w\)/\U\1/g"
Note: based on https://gist.github.com/Zulko/e0910cac1b27bcc3a1e6585eaee60121
@erhangundogan
erhangundogan / typescript-diagnostic.sh
Last active January 11, 2024 20:58
TypeScript compiler CLI commands to debug and diagnose your builds
# npm i -g typescript
# change directory to your project
# Prints out tsconfig.json including extended options if there is any.
tsc --showConfig
# You can use this flag to discover where TypeScript is spending it’s time when compiling
# https://github.com/microsoft/TypeScript/wiki/Performance
tsc --extendedDiagnostics
@Gitbux
Gitbux / huawei-blotware.sh
Created December 12, 2020 22:15
huawei-bloatware-remover.sh
#!/bin/bash
####
#### Copyright (C) 2019 wuseman <[email protected]> - All Rights Reserved
#### Created: 13/02/2019
####
#### A notice to all nerds.
#### If you will copy developers real work it will not make you a hacker.
#### Resepect all developers, we doing this because it's fun!
####
# adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'|grep '/'|awk -F'u0' '{print $2}'|awk '{print $1}'|cut -d/ -f1
@lemon24
lemon24 / 00-sqlite3-server.md
Last active February 14, 2024 14:28
Python sqlite3 server using multiprocessing.managers

This gist tracks the creation of an almost fully functional sqlite3 server in Python 3, using only the multiprocessing.managers standard library module.

But why?

  • To see if it can be done.
  • To learn about multiprocessing managers.
  • Aside from whole-database locking, SQLite (maybe, see below) supports table-level locking between multiple connections in the same process to the same database. A "SQLite server" makes it possible for users in different processes to use SQLite connections that live in the same process.