Skip to content

Instantly share code, notes, and snippets.

@dinh
dinh / index.html
Created November 14, 2024 15:54
Prompt Manager - Windsurf - V4
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<title>AI Prompt Manager</title>
</head>
@dinh
dinh / index.html
Created November 14, 2024 14:09
Prompt Manager - Windsurf - V3
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<title>AI Prompt Manager</title>
</head>
<body>
@dinh
dinh / better_defaults.zsh
Created October 1, 2024 07:39 — forked from BMPixel/better_defaults.zsh
This Zsh configuration is designed to be universally adaptable, ready for any further customization.
# ============================================
# Zsh Configuration with better default
# Zsh configs that anyone should be welcomed to incorporate
# No complex prompts, just the essentials:
# - No aliases and keybindings.
# - No need for third-party plugins.
# ============================================
# ========= Completion & History Setup =========
autoload -Uz compinit
@dinh
dinh / o1_icl_prompt.txt
Created October 1, 2024 07:23 — forked from BMPixel/o1_icl_prompt.txt
The ICL prompting that encourage model to mimic o1's behaviours
The assistant will play the role of an advanced reasoning-based problem-solving expert. The assistant use an *contemplator* technique to make extremely detailed and advanced reasoning over problems. Follow these steps to structure your contemplating small talk.
- **Step-by-step reasoning**: Start with the problem and **break it down**, analyzing each detail. Clearly explain your reasoning at each step. Propose hypotheses and test them. If one fails (It's very likely), adjust it and keep exploring. **Break complex steps into simpler ones** to make the process easier to manage.
- **Thought jumps**: If new ideas arise, revisit earlier steps and explain why. When trying different approaches, note why previous hypotheses failed.
- **Heavy self doubt**: Always assume previous steps containing flaws. Always try the best to spot errors in previous reasonings. NEVER BLINDLY AGREE ON PREVIOUS REASONINGS. If a potential solution is found, try your hardest to negate it.
- **Tree-like path search**: Contemplating pro
@dinh
dinh / 001-README.md
Created July 4, 2024 08:47 — forked from leonletto/001-README.md
OOP in Bash script

OOP in Bash script

Wait, what?

Inspired by this awesome article.

Prelude about OOP

According to wikipedia, OOP is a programming paradigm or technique based on the concept of "objects". The object structure contain data and behaviour.

Data is the object's state, which should be isolated and must be private.

@dinh
dinh / encoded_fonts.edn
Created December 26, 2023 12:36 — forked from kouphax/encoded_fonts.edn
font awesome fonts -> base64 encoded data uri -> edn/sql
{"fa-adjust" "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEUAAABQCAYAAABPlrgBAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAACARJREFUeJztnHtsFNcZxc+5u9jmoTogWnv9XptCY6hoVbW0TRUqpJBETaOoCCSUKm1pI0X8EUUkFSnYjBYb8kBIRWmFAlKiRKQgQlpRSkTVKqRUbXFU2obwKGB2edi7mFKTFgzG3p3TP8CEhx93dnd215V/f3lmvu+7Z4/Xd+beO9fAGGOMMcYYvsJcNRRzaktKXM4WArMFTQdQS6IMQimo8QIMxX5Blwl2A+oEGIXBESL1t/LI6dMElAutvpkigOec+ply8RiI+ZDmgCzKoF6CwnsidhfT7J4aaf9vNvXeStZNOf18zeRxRYHvS1hCcla26wMAhF5AO2m4qTwS3Zvtb1DWTDm/oiaUDASWA3wSxIRs1R0R4SDlrikPnNrBCNxslMzYlMSzZRPdCRN/QmIZgPFZ0JQewj8ILgu1nNybaamMTEk44Ufk8ucgajIVkjWkrTR8JhSJnk+3RFqmdDmNk1Lq3QBgSboN+4mgf0n4YVVLbFc6+Z5N6Wiqm2GM2QlgRjoN5hJJ6ypMzQpG/pD0kufJlE6nbj5cvk3yU97k5Q9Je4p6ixZ9et2xS7Y51qYkVoUXusBbBMelJy+f6IDbV/xg1Yv//LdNtJUpiaa6RS7NVhImI2mAKHwoqM0QH4mMATgvpC7TDWwG8Y1M6o/Q+EG3v2iejTEjmhJvrn9Y0K9JBtPWI70v8k0yuKsycvzCoO2sqt8D4MF027DSAbSBV+dVRhJXhosb9oMmmhpmunC3p2OIBBfUFjLwUuXq9iNe8/2AwBxp/JtysGi4B70hP2z38vrSq8bdSXCS18YlvR8Qny5viX3kNddvCCyIu+HngdjaoWIG7SMEsLdIGwk2eGzzKoCnKlpi88pbowVnyCewpbO5/r6hrg5q
@dinh
dinh / dashboard-ui.markdown
Last active December 17, 2023 13:42 — forked from A973C/dashboard-ui.markdown
Dashboard UI
@dinh
dinh / bash_script_usage_v2.template.sh
Created December 11, 2023 22:02 — forked from mattdanielbrown/bash_script_usage_v2.template.sh
Bash Script USAGE (function, message, text content) TEMPLATE ( and/or example ... ) [ >> VERSION 2.1 ]
#===============================================================================
# NAME : bash_script_usage_v2.template.sh
# VERSION : 2.1.0
# CREATED : Dec 12 23:41:26 CST 2022
# AUTHOR : Matt Daniel Brown <[email protected]>
# WEB : gist.github.com/mattdanielbrown/f00f119358b57a20ca9db67718dfbaf3
#-------------------------------------------------------------------------------
# USAGE : Copy the `usage()` function below and paste into your bash script
# ... and then, replace the details as is appropriate for your script.
#===============================================================================
@dinh
dinh / script.user.js
Created November 30, 2023 19:58 — forked from jr-codes/script.user.js
Userscript Boilerplate
// ==UserScript==
// @name Userscript Name
// @namespace http://example.com/
// @description Userscript Description
// @match http://example.com/* (or @include * to include all pages)
// @version 1.0
// ==/UserScript==
// Emulate Greasemonkey's unsafeWindow in Chrome
window.unsafeWindow = window.unsafeWindow || (function() {
@dinh
dinh / custom-web-search-llm.js
Created May 22, 2023 20:22 — forked from npilk/custom-web-search-llm.js
Cloudflare Worker script to automatically route queries to search engines or an LLM based on their content.
// Cloudflare Worker script to automatically redirect search queries based on trigger words
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request))
})
// status code for redirect response; need something that won't cache
var statuscode = 303
// defining base URLs for search engines