Skip to content

Instantly share code, notes, and snippets.

View real-jiakai's full-sized avatar
🎯
Focusing

Jaya real-jiakai

🎯
Focusing
View GitHub Profile
@jlia0
jlia0 / agent loop
Last active June 6, 2025 14:20
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
# /// script
# dependencies = [
# "atproto"
# ]
# ///
from atproto import Client
import getpass
import time
@rmtbb
rmtbb / ChatGPT Canvas HTML Renderer from Clipboard.url
Last active April 24, 2025 10:07
Bookmarklet that lets you render a full HTML page with any included css and javascript that is currently copied to your clipboard. Also works for SVG code. Useful with ChatGPT Canvas
javascript:(function(){try{navigator.clipboard.readText().then(function(t){if(t){var e=window.open("","_blank","width=800,height=600");e.document.open(),e.document.write(t),e.document.close()}else alert("Clipboard is empty. Please copy some text to the clipboard first.")}).catch(function(t){console.error("Failed to read clipboard contents: ",t),alert("An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.")})}catch(t){console.error("An error occurred:",t),alert("An error occurred while trying to open the new window with the clipboard content.")}})();//bookmarklet_title: HTML Preview from Clipboard
@AXYZE9
AXYZE9 / p.php
Created October 5, 2024 20:15
PHP Script that displays details of host system
<?php
/* ----------------This probe is based on the YaHei.net probe------------------- */
error_reporting(0); //Suppress all error messages
ini_set('display_errors','Off');
@header("content-Type: text/html; charset=utf-8"); //Language coercion
ob_start();
date_default_timezone_set(' Europe/Warsaw');//Time zone setting
$title = 'PHP Probe';
$version = "v0.4.7"; //version
define('HTTP_HOST', preg_replace('~^www\.~i', '', $_SERVER['HTTP_HOST']));
@jph00
jph00 / understanding_fasthtml.md
Last active June 6, 2025 11:56
Understanding FastHTML Components and Architecture - a Claude Conversation

Understanding FastHTML Components and Architecture

🧑 human (Aug 26, 2024, 03:52 PM)

What are the components of FastHTML, and how do they work together? What are some key things I need to understand to write idiomatic FastHTML apps?

🤖 assistant (Aug 26, 2024, 03:52 PM)

Based on the documentation provided, here are the key components of FastHTML and how they work together to create web applications:

  1. Core Components:
@dedlim
dedlim / claude_3.5_sonnet_artifacts.xml
Last active May 26, 2025 19:59
Claude 3.5 Sonnet, Full Artifacts System Prompt
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
@unixzii
unixzii / ForceEnablingXcodeLLM.md
Last active May 12, 2025 15:12
A guide to force enabling Xcode LLM feature on China-SKU Macs.

Introduction

Apple restricted the access to Xcode LLM (Predictive code completion) feature on China models of Mac. This guide provides a way to bypass that restriction. It's verified on macOS 15.0 Beta (24A5264n), but there is no guarentee that it will always work on later macOS versions.

Prerequisites

  • Xcode is installed and run at least once.
  • SIP debugging restrictions are disabled (via csrutil enable --without debug command in recovery mode).

Disclaimer

@eavae
eavae / ast_markdown_splitter.py
Last active May 7, 2025 00:25
A Simple AST based Markdown Splitter
import mistletoe
import re
import mistletoe.markdown_renderer
import warnings
from typing import Any, Callable, List, Sequence, TYPE_CHECKING
from mistletoe.span_token import (
SpanToken,
RawText,
)
@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
@aomarks
aomarks / archive-all-chatgpt-chats.js
Last active February 13, 2025 22:42
Archive all ChatGPT chats browser script
// This script will iterate over all of your ChatGPT sessions and archive them one-by-one.
//
// 1. Go to https://chat.openai.com/
// 2. Open Chrome devtools (see https://developer.chrome.com/docs/devtools/open) or equivalent in your browser
// 3. Open the console tab
// 4. Paste the code below and press enter
const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const history = document.querySelector('[aria-label="Chat history"]');
while (true) {