Midnight commander portable (mc portable) for Linux x86_64
.
If you do not have root on server, and there is no mc, but you need it, just download mc-portable.tar.gz from this gist, extract into user's home ~/ and enjoy.
# fast and explore | |
SERVER=xxx | |
WWWROOT=/home/bitrix/www | |
# fast and explore | |
cd public_html | |
# первая часть exlude для ускорения на первом этапе, чтобы просто увидеть все, что скачается, и при необходимости |
Допустим, есть объект yii2 ActiveRecord, созданный как $model = new Model(). | |
А надо сохранить его в БД вместо существующей записи. | |
Казалось бы, $model->id = <существующий id> ; $model->save(), но нет. | |
Надо сделать подготовительную работу: | |
<?php | |
Midnight commander portable (mc portable) for Linux x86_64
.
If you do not have root on server, and there is no mc, but you need it, just download mc-portable.tar.gz from this gist, extract into user's home ~/ and enjoy.
#!/usr/bin/env bash | |
# Creates .htaccess and .htpasswd in current directory to protect site with password | |
# Default login/password are dev/dev | |
[ -e .htaccess ] && { | |
echo " !! .htaccess already exists! Exiting." >&2 | |
exit 1 | |
} |
#!/usr/bin/env bash | |
BITRIX_WWW_DIR="$1" | |
[ -z "$BITRIX_WWW_DIR" ] && BITRIX_WWW_DIR="." | |
[ ! -d "$BITRIX_WWW_DIR" ] || [ ! -d "$BITRIX_WWW_DIR/bitrix" ] || [ ! -f "$BITRIX_WWW_DIR/index.php" ] || [ ! -d "$BITRIX_WWW_DIR/bitrix/php_interface" ] && { | |
if [ "$BITRIX_WWW_DIR" = "." ] ; then | |
echo " !! Bitrix not found in current directory." >&2 | |
else |
// who is changing element in DOM? | |
const element = $0 | |
const callback = function () { | |
console.trace('here is who and how') | |
} | |
const observer = new MutationObserver(callback) |