Skip to content

Instantly share code, notes, and snippets.

@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
@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 / README.md
Last active July 17, 2025 10:23
Windows - Powertoys - Keyboard Manager - Common macOS keys mapping
@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
Score
avif - 0.9132000000000002
webp - 0.8198000000000002
higher better
window.onerror = function(message, file, line, column, error) {
var errorToReport = {
type: error ? error.type : '',
message: message,
file: file,
line: line,
column: column,
stack: error ? error.stack : '',
userAgent: navigator.userAgent,
href: location.href
@Tom910
Tom910 / search.js
Last active February 27, 2017 15:45
var Benchmark = require('benchmark');
var expect = require('expect');
var suite = new Benchmark.Suite;
var test = [];
for (var s = 0; s < 1000000; s++) {
test.push(s);
}
var Benchmark = require('benchmark');
var expect = require('expect');
var suite = new Benchmark.Suite;
var test = {
reasons: [],
chunks: []
};
for (var s = 0; s < 5000; s++) {
/*
❯ node -v
v14.15.1
❯ node Map-vs-native-cache.js
Testing caching
Map x 57.19 ops/sec ±1.83% (59 runs sampled)
Native x 50.16 ops/sec ±2.87% (63 runs sampled)
Fastest is Map
*/