Skip to content

Instantly share code, notes, and snippets.

View abcprintf's full-sized avatar
🎯
Focusing

Mix Abcprintf abcprintf

🎯
Focusing
View GitHub Profile
# ---------------------------------------
# Script: change-rdp-port.ps1
# เปลี่ยน RDP port จาก 3389 → 33900
# ---------------------------------------
# New RDP port
$newPort = 33900
Write-Host "⚙️ เปลี่ยน RDP port เป็น $newPort..."
@abcprintf
abcprintf / git-command-line.md
Created April 26, 2024 07:09
git command line

GIT COMMAND LINE

stash

  • Listing your stashes
$ git stash list
$ git stash show

$ git stash save "command message stash"
@abcprintf
abcprintf / __setup_00_.md
Last active August 24, 2023 05:15
Add VirtualHost Apache

httpd.conf

Listen 80
Listen 8089 // <-- Add new port

httpd-vhosts.conf

NameVirtualHost *:80 // turn on
@abcprintf
abcprintf / git-config-lf.md
Created August 7, 2023 06:50
git config LF
git config --global core.eol lf
git config --global core.autocrlf false

git rm -rf --cached .
git reset --hard HEAD
@abcprintf
abcprintf / import-mysql.md
Created August 7, 2023 05:03
Import Mysql With Command line (Fast)

set allow max executetime

SET GLOBAL max_allowed_packet=1073741824;
SET GLOBAL wait_timeout=6000;
SET GLOBAL net_read_timeout=6000;
SET GLOBAL connect_timeout=6000;

// sql_mode default local
sql_mode = "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION";
// sql_mode prod
# Auto-detect text files, ensure they use LF.
* text=auto eol=lf
# These files are always considered text and should use LF.
# See core.whitespace @ https://git-scm.com/docs/git-config for whitespace flags.
*.php text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4 diff=php
*.json text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4
*.test text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4
*.yml text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=2
PHP 7 hrs 4 mins ███████▓░░░░░░░░░░░░ 23.5%
Other 5 hrs 4 mins ██████▒░░░░░░░░░░░░░ 16.9%
YAML 3 hrs 22 mins █████░░░░░░░░░░░░░░░ 11.2%
Docker 2 hrs 48 mins ████▓░░░░░░░░░░░░░░░ 9.3%
@abcprintf
abcprintf / sc-command-line.md
Last active November 18, 2020 07:51
วิธีสร้าง service โดยใช้ sc.exe

คำสั่ง สร้าง

sc CREATE "abcprintf.exe"  binpath="D:\Path\abcprintf.exe"  displayname="abcprintf"

คำสั่ง ลบ

sc DELETE "abcprintf.exe"
@abcprintf
abcprintf / import_SQL_file.md
Created November 6, 2020 02:57
How to import SQL file from Xampp for windows

2020-11-06_9-46-02

Open Xampp Control Panel

  • Click "Shell"

2020-11-06_9-49-25

Command

  • -u => username
  • -p => password
{
"draw": 1,
"recordsTotal": 57,
"recordsFiltered": 57,
"data": [
[
"Airi",
"Satou",
"Accountant",
"Tokyo",