Skip to content

Instantly share code, notes, and snippets.

View hoangnamitc's full-sized avatar

hoangnamitc hoangnamitc

View GitHub Profile
@hoangnamitc
hoangnamitc / subl-terminal.md
Last active November 25, 2025 02:45
Open SublimeText with Terminal

Terminal run code:

sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl

DONE !

(for any site)
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
Header always set Content-Security-Policy "upgrade-insecure-requests;"
(with WordPress) - (replace line: "RewriteEngine On")
@hoangnamitc
hoangnamitc / php-ini-setting.txt
Created June 26, 2021 04:25
Các thông số PHP settings lý tưởng
-------------------------------
Xem php.init ở đâu: php --ini
- post_max_size : 750M
- upload_max_filesize : 750M (Dung lượng tối đa cho việc upload file)
- max_execution_time : 120 (Thời gian tối đa để thực thi 1 tác vụ PHP "giây")
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
  • Mở Automator
  • Tạo mới "Service" (Quick Action)
  • Thêm một action "Run Shell Script"
  • Mục Workflow receives current bạn chọn: "files or folders" in "Finder.app"
  • Mục Run Shell Script:
    • Shell chọn: /bin/bash
    • Pass input chọn: as arguments
    • nội dung nhập:
  • Mở Automator
  • Quick Action
  • Tạo mới "Service"
  • Thêm một action "Run Shell Script"
  • Mục Workflow receives current bạn chọn: "files or folders" in "Finder"
  • Mục Run Shell Script:
    • Shell chọn: /bin/bash
    • Pass input chọn: as arguments
    • nội dung nhập:
# Sau khi cài xong mà ko gõ được lệnh composer thì chạy lệnh sau:
sudo mv composer.phar /usr/local/bin/composer
@hoangnamitc
hoangnamitc / php-install.md
Last active November 25, 2025 03:03
PHP Installation