Ssh
Ssh
ssh -i key.pem user@host => login
scp -i key.pem file user@host:location_path => upload
Git
git fetch
git branch
git diff
git checkout feature/update_content
git checkout -p public/js/app.js => revert
git pull origin release/1.0.0
git reset --hard => note : revert all
git reset --hard origin/develop
git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch backend/xxx.json' feature/xxx => remove file and history
git reset --hard [commitId]
git push --force
git add [pathFile]
git commit --amend --no-edit
git rebase branch-parent
git rebase --onto new-parent old-parent
Permission Storage
sudo chown -R $USER:www-data {directory}
sudo chmod -R 775 {directory}
Install Package
/usr/bin/php7.3 /usr/local/bin/composer install => another php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xxx
Restart php.ini
sudo service nginx restart
sudo service php7.3-fpm restart
Up Max Size Upload
upload_max_filesize = 10M
post_max_size = 10MB
client_max_body_size = 10MB
Reload Cache
php artisan config:cache
php artisan config:clear
composer global update
composer dump-autoload
Update Package
composer update => note : for all
composer update facade/ignition
Certificate Update
git config --global http.sslVerify false
Cek Log
/var/log/nginx
sudo tail error.log
Redis
cli > KEYS *
cli > KEYS tus:*
cli > GET tus:xxx
cli > FLUSHALL
cli > MONITOR
Docker Python First
pip freeze > requirements.txt
pip install -r requirements.txt
--------------------------------------
command: tail -f /dev/null
ENV VIRTUAL_ENV=/app/env
$ . env/bin/activate
Git Config
$PATH\.git\config
Linux Information
uname -sr
lsb_release -a
sudo systemctl status xxx
sudo service xxx status
sudo service xxx reload
sudo apt search xxx
sudo usermod -aG docker jenkins
export JAVA_HOME=/usr/bin/java
echo $JAVA_HOME