vi ~/.bash_profile
#to find the file
#grep -s valet ~/.* | grep -v ".bash_history"
#and probably not do the following
#!/usr/bin/env bash | |
script_path=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P ) | |
root_path=$(dirname $(dirname $(dirname "$script_path"))); | |
#for simple any level using .. | |
script_path=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P ) | |
dirname=$(realpath "$script_path/..") |
#!/usr/bin/env bash | |
#inside docker container | |
HOST_IP=$(/sbin/ip route|awk '/default/ { print $3 }') | |
CONTAINER_IP=$(curl "$HOST_IP:8000" 2>/dev/null) | |
echo "container ip is $CONTAINER_IP" |
#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 |
<?php | |
umask(0); | |
require 'app/Mage.php'; | |
Mage::setIsDeveloperMode(true); | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
set_time_limit(0); | |
Mage::app(); |
* 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.... |
#!/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 |
#part of selinux (security enhance linux) | |
#as root allows php or similar to download remote urls | |
setsebool -P httpd_can_network_connect 1 |
Reflg with relative date
git reflog --format='%C(auto)%h %<|(20)%gd %C(blue)%cr%C(reset) %gs (%s)