Skip to content

Instantly share code, notes, and snippets.

View defmans7's full-sized avatar

DanielVee defmans7

View GitHub Profile
@defmans7
defmans7 / improved-chat-script.js
Created October 2, 2025 10:16
Improved Chat Script
// Chat Widget Script
(function() {
// Utility: Merge configs deeply
function deepMerge(target, source) {
for (const key in source) {
if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {
target[key] = deepMerge(target[key] || {}, source[key]);
} else {
target[key] = source[key];
}
version: '2.1'
services:
nocodb:
depends_on:
root_db:
condition: service_healthy
environment:
NC_DB: "pg://root_db:5432?u=postgres&p=password&d=root_db"
image: "nocodb/nocodb:latest"
ports:
@defmans7
defmans7 / N8N subflow - Alter Milvus DB Fields.json
Created September 12, 2025 00:45
Alater the Milvus meta fields manually.
{
"nodes": [
{
"parameters": {
"method": "POST",
"url": "={{ $('Start').item.json.milvus_url }}/v2/vectordb/collections/fields/alter_properties",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"collectionName\": \"{{ $('Start').item.json.collection_name }}\",\n \"fieldName\": \"{{ $json.fields }}\",\n \"fieldParams\": { \"max_length\": \"{{ $('Set fields to adjust').item.json.field_length }}\" }\n}",
"options": {}
{
"name": "n8n dateTime strategy",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
0,
0
{
"name": "Search and load local file",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
0,
0
{
"name": "N8N API",
"nodes": [
{
"parameters": {
"operation": "get",
"workflowId": {
"__rl": true,
"value": "={{ $json.workflow_id }}",
"mode": "id"
@defmans7
defmans7 / check-opcache.php
Created April 24, 2025 01:01
Check if Opcache is enabled and show some stats
<?php
header('Content-Type: text/plain');
echo "PHP Version: " . phpversion() . "\n\n";
echo "OPCache Enabled: " . (opcache_get_status() ? "Yes" : "No") . "\n\n";
if (opcache_get_status()) {
$status = opcache_get_status();
$config = opcache_get_configuration();
echo "Memory Usage: " . round($status['memory_usage']['used_memory'] / (1024*1024), 2) . "MB / " .
@defmans7
defmans7 / check-jit.php
Created April 24, 2025 00:59
Verify and check PHP Opcache jit is working
<?php
// Force JIT to engage with a computationally intensive loop
function test_jit() {
$start = microtime(true);
$sum = 0;
for ($i = 0; $i < 10000000; $i++) {
$sum += $i * 0.01;
}
$end = microtime(true);
return [
@defmans7
defmans7 / style.css
Last active June 27, 2024 13:15
Remove / Hide ClickUp AI nags and "suggestions"
/* can be used in Chrome Extension like Stylebot */
cu-task-ai-button,
cu-comment-ai-quick-reply,
cu-content-assistant-list-ai,
cu-content-assistant-fab,
cu-content-assistant-launch-button,
.content-assistant-icon,
.search-modal-toggle__ai-button,
.content-assistant-launch-button__icon,