Skip to content

Instantly share code, notes, and snippets.

@Tom910
Tom910 / gist:2b20f870555cf1e8193c4ab370426af5
Created January 6, 2023 12:03
Compress An Image Before Upload With JavaScript
// https://pqina.nl/blog/compress-image-before-upload?ck_subscriber_id=887774617
<input type="file" multiple class="my-image-field" />
<script>
const compressImage = async (file, { quality = 1, type = file.type }) => {
// Get as image data
const imageBitmap = await createImageBitmap(file);
// Draw to canvas
@Tom910
Tom910 / README.md
Last active May 5, 2026 22:15
Windows - Powertoys - Keyboard Manager - Common macOS keys mapping
@Tom910
Tom910 / code tools
Created August 24, 2025 02:34
Claude code system prompt Aug 2025
Tool name: Task
Tool description: Launch a new agent to handle complex, multi-step tasks autonomously.
Available agent types and the tools they have access to:
- general-purpose: General-purpose agent for researching complex questions, searching for code, and executing multi-step tasks. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries use this agent to perform the search for you. (Tools: *)
When using the Task tool, you must specify a subagent_type parameter to select which agent type to use.
@Tom910
Tom910 / promts.md
Created September 2, 2025 05:08
parlant promt examples
search query
https://github.com/search?q=repo%3Aemcie-co%2Fparlant%20_build_prompt&type=code