- Add
hooks
configuration into extra segment of composer.json:
"extra": {
"hooks": {
"pre-commit": [
"./vendor/bin/php-cs-fixer fix",
"git add -u"
(cors) { | |
@cors_preflight method OPTIONS | |
header { | |
Access-Control-Allow-Origin "{header.origin}" | |
Vary Origin | |
Access-Control-Expose-Headers "Authorization" | |
Access-Control-Allow-Credentials "true" | |
} |
(async () => { | |
const fetchCloudFlare = async () => { | |
return fetch('https://www.cloudflare.com/cdn-cgi/trace') | |
.then(response => response.text()) | |
.then(data => { | |
return data | |
.trim() | |
.split("\n") | |
.reduce(function(obj, pair) { | |
pair = pair.split("="); |
(async () => { | |
const fetchCloudFlare = async () => { | |
return fetch('https://www.cloudflare.com/cdn-cgi/trace') | |
.then(response => response.text()) | |
.then(data => { | |
const $data = {}; | |
(data || "").trim().split("\n").map((el) => { | |
if (el.includes('ip=')) { | |
$data.ip = el.replace('ip=', ''); | |
} |
#!/bin/bash | |
sudo curl -SL https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose |
laravel/laravel | |
symfony/symfony |
wget $(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep -oP '"browser_download_url": "\K(.*)hugo_0(.*)Linux-64bit.deb') | |
sudo dpkg -i hugo_0*Linux-64bit.deb |