Skip to content

Instantly share code, notes, and snippets.

View bouroo's full-sized avatar
🏠
Remote Working

Kawin Viriyaprasopsook bouroo

🏠
Remote Working
View GitHub Profile
@bouroo
bouroo / chatbox-exported-data.json
Last active June 18, 2025 06:43
Chat Box config
{"configVersion":10,"chat-sessions":[],"settings":{"showWordCount":false,"showTokenCount":false,"showTokenUsed":true,"showModelName":true,"showMessageTimestamp":false,"showFirstTokenLatency":false,"userAvatarKey":"","defaultAssistantAvatarKey":"","theme":2,"language":"en","fontSize":16,"spellCheck":true,"defaultPrompt":"You are a helpful assistant.","allowReportingAndTracking":true,"enableMarkdownRendering":true,"enableLaTeXRendering":true,"enableMermaidRendering":true,"injectDefaultMetadata":true,"autoPreviewArtifacts":false,"autoCollapseCodeBlock":true,"pasteLongTextAsAFile":true,"autoGenerateTitle":true,"autoLaunch":false,"autoUpdate":true,"betaUpdate":false,"shortcuts":{"quickToggle":"Alt+`","inputBoxFocus":"mod+i","inputBoxWebBrowsingMode":"mod+e","newChat":"mod+n","newPictureChat":"mod+shift+n","sessionListNavNext":"mod+tab","sessionListNavPrev":"mod+shift+tab","sessionListNavTargetIndex":"mod","messageListRefreshContext":"mod+r","dialogOpenSearch":"mod+k","inpubBoxSendMessage":"Enter","inpubBoxSendMess
@bouroo
bouroo / system instructions.md
Last active June 18, 2025 06:45
AI prompts

Helpful assistant

Purpose and Goals:
- Deliver expert, clear, concise, and precisely aligned output.

Behaviors and Rules:
- Immediately seek clarification if user intent is ambiguous or information is missing.
- Proactively anticipate follow-up questions or suggest relevant improvements when beneficial and concise.
- Prioritize internal knowledge; use external research only when essential for accuracy, completeness, or current information.
@bouroo
bouroo / zed.json
Created May 27, 2025 09:05
zed config
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"features": {
@bouroo
bouroo / Disable-VBS.cmd
Created May 3, 2025 04:29
Script to disable Virtualization Based Security and Credential Guard
@Echo off
cls
Color 04
Echo ##############################################################################
Echo Script to disable Virtualization Based Security and Credential Guard
Echo Version 20250404 by Metis IT
Echo Script started at %date% %time%
Echo .
Echo DISCLAIMER:
Echo .
@bouroo
bouroo / find_by_keywords.go
Last active June 15, 2025 13:46
Find files that contains all keywords
package main
import (
"bufio"
"context"
"encoding/csv"
"fmt"
"os"
"path/filepath"
"runtime"
@bouroo
bouroo / reset_traffic.sh
Created December 22, 2024 06:43
Reset Plesk traffic for both incoming and outgoing HTTP traffic for specific domain.
#!/usr/bin/env bash
# Prompt user to enter the domain
read -p "Please enter the domain (e.g., example.com): " domain
# Get the current year and month
current_year=$(date +%Y)
current_month=$(date +%m)
# Get the first day of the current month
@bouroo
bouroo / pgautoupgrade.sh
Created October 20, 2024 08:27
pgauto docker script to update postgres database version
#!/usr/bin/env bash
docker run --name pgauto -it \
--mount type=bind,source=${PGDATA},target=/var/lib/postgresql/data \
-e TZ="Asia/Bangkok" \
-e LANG="C.UTF-8" \
-e POSTGRES_USER="${POSTGRES_USER}" \
-e POSTGRES_PASSWORD="${POSTGRES_PASSWORD}" \
-e PGAUTO_ONESHOT=yes \
pgautoupgrade/pgautoupgrade:17-bookworm
@bouroo
bouroo / intel_pve_vgpu.sh
Last active September 19, 2024 04:58
Intel Gen 12/13 vGPU SR-IOV on Proxmox Host Enabler (Installer)
#!/usr/bin/env bash
# Print header information
cat << "EOF"
+----------------------------------------------------------------------+
| Intel Gen 12/13 vGPU SR-IOV on Proxmox Host Enabler (Installer) |
| https://github.com/Upinel/Intel-vGPU-SRIOV-on-Proxmox |
+----------------------------------------------------------------------+
| This source file is subject to version 2.0 of the Apache license, |
| that is bundled with this package in the file LICENSE, and is |
@bouroo
bouroo / rewrite.js
Last active June 15, 2025 13:49
AWS CloudFront function for static web app on Amazon S3
async function handler(event) {
const request = event.request;
const uri = request.uri;
// Determine if the URI has a query string.
const hasQuery = uri.indexOf('?') !== -1;
// Determine if the URI has a file extension.
// An extension is considered present if there's a dot, and the last dot
// appears after the last slash (indicating it's part of a filename, not a directory).
@bouroo
bouroo / convert_latin1_to_utf8mb4.sql
Last active May 12, 2025 04:18
A script that performs the conversion of `latin1` encoded strings to `utf8mb4` for all columns in all tables of a specific mariadb database. Make sure to back up your data before running scripts that modify it.
DELIMITER //
-- Drop the procedure if it already exists
DROP PROCEDURE IF EXISTS convert_chars_to_utf8mb4 //
-- Create the procedure to convert character set of columns
CREATE PROCEDURE convert_chars_to_utf8mb4(IN db_name VARCHAR(255))
BEGIN
-- Declare variables for cursor and loop control
DECLARE done INT DEFAULT FALSE;