- right click file
- Hold down options button (Alt button)
- copy "file_name.ext" will change to copy "file_name.ext" as Pathname
lsof -nP -i4TCP:9000 | grep LISTEN
<?php | |
/** | |
* InternalLog | |
* | |
*/ | |
class InternalLog | |
{ | |
const TIMER_ACTION_START = 1; |
#!/usr/bin/env bash | |
#to find processes use netstat -ntlp | grep "3306" | |
portResponse=$(netstat -lnt | awk '$6 == "LISTEN" && $4 ~ ".3306"') | |
if [ -z "$portResponse" ] | |
then | |
echo "Port available for mysql, staring mysql" | |
service mysql start | |
else | |
echo "mysql already running" | |
fi |
curl http://127.0.0.1 -H 'Host: example.com' -H 'X-Forwarded-Proto: https' | |
curl https://127.0.0.1/ -H 'Host: example.com' -H 'X-Forwarded-Proto: https' --insecure | |
curl http://httpbin.org/headers -H 'Host: httpbin.org' -H 'X-Forwarded-Proto: https' | |
* 98-magerun2 db:dump --add-time prefix | |
//do not complain about setup scripts | |
// Use n98-magerun2.phar dev:console | |
\Magento\Framework\App\ObjectManager::getInstance()->get('\Magento\Framework\Config\CacheInterface')->save(serialize(true),'db_is_up_to_date'); | |
https://marketplace.magento.com/customer/accessKeys/ | |
Public Key: b... | |
Private Key: 0.... |
for private packages/magento modues consider using | |
"repositories": [ | |
{"type":"artifact","url":"packages/"}, | |
where packages/ has multiple zip files like vendor1_ext1.zip, vendor2_ext2.zip | |
and you just need to do composer require vendor1/ext1 | |
composer will find in packages zipped files and get the required extensions |
#currently for drupal but can be easily be tested and improved for magento | |
apt-get install -y php-mbstring | |
apt-get install -y php-xmlwriter | |
apt-get install -y php-dom php-curl php-bz2 | |
apt-get install -y zip unzip php7-zip | |
apt-get install -y zip unzip | |
apt-get install -y php-xml php-tidy | |
sudo service apache2 restart |
sudo mysql_secure_installation | |
#its sometimes enough | |
some time usual approach of passwords reset does not work | |
https://superuser.com/a/949768/366778 | |
SELECT user, plugin FROM user; | |
UPDATE user SET plugin=""; | |
#did not help but tried any ways | |
git config --global branch.autosetupmerge always | |
git config --global pusg.default current | |
#pull one might not be a real thing but putting it as makes sense | |
git config --global pull.default current | |
git config --global pull.default simple | |
git push -u origin HEAD | |
git config pull.default tracking |
Reflg with relative date
git reflog --format='%C(auto)%h %<|(20)%gd %C(blue)%cr%C(reset) %gs (%s)