Skip to content

Instantly share code, notes, and snippets.

View egorzot's full-sized avatar
I want to break free

Egor Zotov egorzot

I want to break free
View GitHub Profile
git config \
--global \
url."https://oauth2:${personal_access_token}@privategitlab.com".insteadOf \
"https://privategitlab.com"
#or
git config \
--global \
url."https://${user}:${personal_access_token}@privategitlab.com".insteadOf \
@egorzot
egorzot / get_last_symfony_security_checker.sh
Last active August 28, 2021 12:16
Getting the last symfony security checker. You may add this script to the composer.json. Full details in the article https://egor.work/blog/all/automate-security-check-in-your-symfony-project/
rm -f local-php-security-checker && curl -s https://api.github.com/repos/fabpot/local-php-security-checker/releases/latest | grep -E \"browser_download_url(.+)linux_amd64\" | cut -d : -f 2,3 | tr -d \\\" | xargs -I % curl % -L -o local-php-security-checker && chmod +x local-php-security-checker
@egorzot
egorzot / run_security_check.sh
Last active August 28, 2021 12:28
Runs symfony security check with one line of code. Full details in article https://egor.work/blog/all/automate-security-check-in-your-symfony-project/
composer get-security && composer security
@egorzot
egorzot / composer_scripts_example.json
Last active August 28, 2021 14:53
Composer.json scripts section example for checking symfony security. Full details in article https://egor.work/blog/all/automate-security-check-in-your-symfony-project/
"scripts": {
"get-security": "rm -f local-php-security-checker && curl -s https://api.github.com/repos/fabpot/local-php-security-checker/releases/latest | grep -E \"browser_download_url(.+)linux_amd64\" | cut -d : -f 2,3 | tr -d \\\" | xargs -I % curl % -L -o local-php-security-checker && chmod +x local-php-security-checker",
"security": "./local-php-security-checker",
}
#!/bin/sh
#docker git
sudo apt-get update && sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common \
git-all