- Install with lando: https://docs.lando.dev/laravel/getting-started.html
Error
"Your requirements could not be resolved to an installable set of packages."
Fix
# With php XDEBUG on or off | |
tooling: | |
xdebug-on: # run: lando xdebug-on | |
service: appserver | |
description: Enable xdebug for apache. | |
cmd: "docker-php-ext-enable xdebug && /etc/init.d/apache2 reload" | |
user: root | |
xdebug-off: # run: lando xdebug-off | |
service: appserver | |
description: Disable xdebug for apache. |
Error
"Your requirements could not be resolved to an installable set of packages."
Fix
name: codetot-vn | |
recipe: wordpress | |
proxy: | |
appserver_nginx: | |
- codetot.test | |
config: | |
webroot: . | |
database: mariadb | |
via: nginx | |
php: '7.4' |
import { select, selectAll, hasClass, removeClass, loadNoscriptContent } from 'lib/dom' | |
import Swiper, { Navigation } from 'swiper' | |
export default el => { | |
const sliderEl = select('.js-slider', el) | |
const slideEls = selectAll('.swiper-slide', el) | |
if (sliderEl) { | |
const swiper = new Swiper(sliderEl, { | |
freeMode: true, |
# import db .sql to site | |
# tutorial: https://fullstack-tutorials.com/mysql/mysql-import-database-from-sql-file-in-linux | |
gunzip < dump.sql.gz | mysql -u username -p database | |
# extract db to .sql.gz | |
# tutorial: https://fullstack-tutorials.com/mysql/mysql-export-database-to-gzip-file-in-linux | |
mysqldump -u username -p database_name | gzip > dump.sql.gz |
<?php | |
// Local Dev | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true ); |
<?php | |
function codetot_is_localhost() | |
{ | |
return !empty($_SERVER['HTTP_X_CODETOT_THEME_HEADER']) && $_SERVER['HTTP_X_CODETOT_THEME_HEADER'] === 'development'; | |
} | |
function codetot_is_local_dev() { | |
$is_localhost = azpet_is_localhost(); | |
$domain_name = $_SERVER['HTTP_HOST'] ?? ''; | |
$is_test_domain = !empty($domain_name) && strpos($domain_name, '.test') !== false; |
<?php | |
function _get_youtube_video_thumbnail_url($video_id) { | |
return "https://i.ytimg.com/vi/$video_id/hqdefault.jpg"; | |
} |
Hà Nội | Quận Ba Đình | Phường Phúc Xá | Đường An Xá | |
---|---|---|---|---|
Hà Nội | Quận Ba Đình | Phường Trúc Bạch | Đường Bắc Sơn | |
Hà Nội | Quận Ba Đình | Phường Vĩnh Phúc | Đường Bưởi |
<?php | |
/** | |
* Sử dụng để nhập danh sách quận huyện vào Tỉnh/Thành phố. | |
* Bạn cần tạo đủ danh sách Tỉnh Thành phố rồi mới chạy phần import này. | |
* Set trong wp-config.php WP_DEBUG = true và WP_DEBUG_LOG = TRUE, rồi mở file wp-content/debug.log để xem kết quả import từng dòng | |
*/ | |
/** | |
* Import district | |
* |