Skip to content

Instantly share code, notes, and snippets.

View koramit's full-sized avatar

Koramit Pichanaharee koramit

  • Bangkok, Thailand.
View GitHub Profile
#!/usr/bin/env bash
set -e
##
# Note: This script is assumed to be run as user root
##
## Add PHP repository
add-apt-repository -y ppa:ondrej/php
@koramit
koramit / default.conf
Created May 10, 2022 15:16
nginx test php page
server {
listen 80 default_server;
root /home/ubuntu/html;
# Include the basic h5bp config set
include h5bp/basic.conf;
index index.html index.htm index.php;
error_page 404 /index.php;
@koramit
koramit / laravel-vscode-php-setup.md
Last active October 10, 2021 12:08
VS Code + Laravel setup for php files

Setup สำหรับไฟล์ PHP

PHP Intelephense Extension

  • auto complete
  • auto import
  • search symbols
  • check syntax
  • check variables
  • link to definition
@koramit
koramit / laravel-7-vue-inertiajs-tailwindcss.md
Created April 22, 2020 14:47
# Laravel + Vuejs + Inertiajs + Tailwindcss Config

Laravel + Vuejs + Inertiajs + Tailwindcss Config

Setup dependencies

from Laravel fresh install

Laravel packages

# free Login/Register controller
composer require laravel/ui
@koramit
koramit / dba-exams.md
Created March 9, 2020 04:36
แบบฝึกหัดนักวิชาการการจัดการฐานข้อมูล

แบบฝึกหัด

  • ไม่จำกัดเวลา
  • เปิดตำรา internet ถามจากใครก็ได้ยกเว้นผู้ออก
  1. ให้สร้าง db สำหรับ app medsicon จากนั้นสร้าง account ที่มีสิทธิ์เต็มใน db นี้จำนวน 3 account เพื่อใช้กับ app server ทั้ง 3 ตัว โดยตัว server นั้นเป็นแบบ static ip

  2. ทำเหมือนข้อ 1 แต่เป็นตัว app server นั้นเป็น DHCP

  3. นงนภัสต้องการเห็นตาราง medsicon.failed_jobs ได้จากเครื่อง PC บนโต๊ะทำงานของตัวเอง ให้สร้าง account และกำหนดสิทธิ์ให้อย่างเหมาะสมเพื่อทำให้นงนภัสพึงพอใจ

Laravel 6.x InertiaJS + VueJS + Bootstrap

Part 0

ติดตั้ง Laravel น่ะสิ

Part I Laravel JavaScript & CSS Scaffolding

  1. ติดตั้ง laravel-ui เพื่อใช้งาน bootstrap

composer require laravel/ui --dev

# login เข้า server ครั้งแรกด้วยสิทธิ์ root เพื่อเพิ่ม user แบบ sudo ใช้งานแทน root
ssh root@[server_ip]
adduser [username]
usermod –aG sudo [username]
exit
# login เข้า server ด้วย user สิทธิ์ sudo
ssh [username]@server_ip
@koramit
koramit / laravel-6-tailwindcss.md
Created November 26, 2019 10:16
Laravel 6.x with TailwindCSS

Laravel 6.x with TailwindCSS

  1. หลังจากติดตั้ง laravel ให้ติดตั้ง node packages พื้นฐานที่มาพร้อมกับ laravel
npm install
  1. ติดตั้ง tailwindcss ด้วยคำสั่ง
npm install tailwindcss --save-dev
This file has been truncated, but you can view the full file.
[
{
"district": "คลองท่อมเหนือ",
"amphoe": "คลองท่อม",
"province": "กระบี่",
"zipcode": 81120,
"district_code": 810402,
"amphoe_code": 8104,
"province_code": 81
},
{
"window.zoomLevel": 2,
"explorer.confirmDelete": false,
"workbench.colorTheme": "Monokai",
"sublimeTextKeymap.promptV3Features": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
"editor.formatOnPaste": true,
"workbench.statusBar.visible": false,
"explorer.openEditors.visible": 0,