ตั้งค่า Username และ Email ใน git global หรือสำหรับ Project
สำหรับ Global
git config --global user.name "Your global username"
git config --global user.email "[email protected]"
ตรวจสอบค่า config
git config --global --get user.name
git config --global --get user.email
สำหรับ Project
Linux: How to gzip a folder
Note
tar -zcvf name-folder-giz.tar.gz folder-name/
Update Value Taxonomy
Update แบบ fix field นั้นๆ ว่าจะเป็นค่าอะไร
เปลี่ยน core/jqeruy ของ Drupal 8
mytheme.libraries.yml:
jquery-custom:
remote: https://github.com/jquery/jquery
version: "2.2.4"
license:
name: MIT
url: https://github.com/jquery/jquery/blob/2.2.4/LICENSE.txt
gpl-compatible: true
js:
js/jquery-2.2.4.min.js: { minified: true, weight: -20 }
mytheme.info.yml:
libraries-override:
# Replace an entire library.
core/jquery: mytheme/jquery-custom
Center Vertically - Using position & transform
ตัวอย่าง
.center {
height: 200px;
position: relative;
border: 3px solid green;
}
.center p {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
ลบ ?itok จาก Drupal 7 Images
settings.php
$conf['image_suppress_itok_output'] = TRUE;
$conf['image_allow_insecure_derivatives'] = TRUE;
ตั้งเวลาบน Ubuntu 18.04 Set Timezone เป็นประไทย
ตรวจสอบเวลาบนเครื่อง server เป็น Time zone ไหน โดยใชัคำสั่งนี้
timedatectl
เมื่อตรวจสอบเวลาแล้วว่าเป็น timezone เราจะเปลี่ยนให้เป็น timezone ประเทศไทย โดยใช้คำสั่งดังนี้