Skip to content

Instantly share code, notes, and snippets.

View ManotLuijiu's full-sized avatar
🏠
Working from home

Manot Luijiu ManotLuijiu

🏠
Working from home
View GitHub Profile
@ManotLuijiu
ManotLuijiu / gdebi-gtk.bash
Created August 19, 2026 17:44
gdebi-gtk lock screen (can't install new one)
how to fix this lock in Ubuntu ->
gdebi-gtk
Only one software management tool is allowed to run at the same time
Please close the other application e.g. 'Update Manager', 'aptitude' or 'Synaptic' first.
That message means Ubuntu's package-management database is already being used by another process. **Don't delete the lock files immediately**—first identify whether `apt`, `dpkg`, or the automatic updater is genuinely running.
### 1. Find what is holding the lock
Run:
@ManotLuijiu
ManotLuijiu / pi-setup-guide.md
Created May 11, 2026 23:38 — forked from schpet/pi-setup-guide.md
Pi Coding Agent Setup Guide

Pi Coding Agent Setup Guide

1. Install the Agent

npm install -g @mariozechner/pi-coding-agent

2. Launching Pi

# Interactive REPL
@ManotLuijiu
ManotLuijiu / erpnext-daily-frequency-fix.md
Created March 21, 2026 18:57
ERPNext v16: เพิ่ม Daily Frequency ใน Sales Forecast → MRP (แก้ปัญหา MRP ปฏิเสธ Daily)

แก้ปัญหา ERPNext v16: เพิ่ม Daily Frequency ใน Sales Forecast → MRP

สรุปปัญหา

เมื่อเพิ่ม "Daily" เป็นตัวเลือก frequency ใน Sales Forecast:

  • ✅ สร้าง Sales Forecast ได้
  • ✅ สร้าง MPS ได้
  • ❌ สร้าง MRP ไม่ได้ (ข้อมูลหายไปเงียบๆ)

สาเหตุ

@ManotLuijiu
ManotLuijiu / ssh.config
Last active February 28, 2026 06:48
Connect to Host (Remote Server via SSH)
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
Host {human_readable_name}
HostName {remote_server_ip}
User {Ubuntu_server_user}
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
@ManotLuijiu
ManotLuijiu / purchase_work_flow.md
Created July 20, 2025 10:22
Purchasing Workflow

No-Code Customer PO Allocation Workflow

Simple Solution Using Standard Frappe Features

No custom coding needed! Use existing Frappe functionality with some custom fields.


Method 1: Custom Fields in Purchase Order (Simplest)

@ManotLuijiu
ManotLuijiu / sales_invoice_moocoding.json
Last active July 19, 2025 08:58
ERPNext Print Format
Print Format
Sales Invoice - MooCoding
Print Designer Print Format:
{"header":{"firstPage":[{"id":"IqtuNamDWU","type":"rectangle","DOMRef":null,"childrens":[{"id":"uQtHknzjtd","type":"rectangle","DOMRef":null,"childrens":[{"id":"LqVzlEKDUJ","type":"image","isDraggable":true,"isResizable":true,"isDropZone":false,"isDynamic":true,"image":{"name":"g4mvo0i6mf","doctype":"Letter Head","fieldname":"image","fieldtype":"Attach Image","label":"Image","parentField":"letter_head","value":"/files/aws_solution_logo.jpeg"},"startX":24.000000000285,"startY":24,"pageX":244,"pageY":121,"width":54.33366757067898,"height":42.25,"styleEditMode":"main","style":{"borderWidth":"0px","zIndex":0},"classes":[],"isElementOverlapping":false,"index":0}],"isDraggable":false,"isResizable":false,"isDropZone":false,"startX":0,"startY":0,"pageX":0,"pageY":0,"width":78.33366757096398,"height":76.01437377929688,"styleEditMode":"main","style":{},"classes":["relative-column"],"layoutType":"column","relativeColumn":true,"heightType":"fixed"},{"id"
@ManotLuijiu
ManotLuijiu / App.jsx
Created April 21, 2025 11:34
How to sync dark theme from ERPNext
import React, { useEffect, useState } from 'react';
import '../../css/tailwind.css';
import Dashboard from '@/components/Dashboard';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
const queryClient = new QueryClient();
export function App() {
const [theme, setTheme] = useState('light');
#!/bin/bash
for app in "${apps_with_git[@]}"; do
echo "Checking branch in $app..."
git -C "$app" branch --show-current
done
@ManotLuijiu
ManotLuijiu / settings.json
Created April 14, 2025 05:24
Settings File for Frappe/ERPNext environment
{
"files.autoSave": "onFocusChange",
"editor.fontFamily": "Consolas, 'MesloLGS Nerd Font', monospace",
"terminal.integrated.fontFamily": "'MesloLGS Nerd Font'",
"terminal.integrated.fontSize": 13,
"editor.defaultFormatter": "ms-python.black-formatter",
"[json]": {
"editor.quickSuggestions": {
"strings": true
},
@ManotLuijiu
ManotLuijiu / setup-mariadb-10.6.sh
Created April 12, 2025 05:01
Purge MariaDB from Ubuntu 24.04 and Re-Install Scripts
#!/bin/bash
set -e
echo "🚨 Stopping and removing existing MariaDB..."
sudo systemctl stop mariadb || true
sudo apt remove --purge mariadb-server mariadb-client mariadb-common mariadb-server-core-* mariadb-client-core-* -y
sudo apt autoremove -y
sudo apt autoclean -y