This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -f storage/logs/web.log | grep -A 10 -n '\[saml-\]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "Usage run-on-one-server.bash <eb-environment-name>"; | |
exit 0; | |
fi | |
LEADER_INSTANCE=$(aws --region us-west-2 ec2 describe-instances --filters "Name=instance-state-name,Values=running" "Name=tag:elasticbeanstalk:environment-name,Values=$1" | jq '[.Reservations[].Instances[0]] | sort_by(.LaunchTime) | .[0].InstanceId' -r) | |
THIS_INSTANCE=$(curl http://169.254.169.254/latest/meta-data/instance-id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this script queries aws logs with insights filtering on ERROR | |
# explanation of start and end times | |
#--start-time = unix timestamp 30 mins in the past | |
#--end-time = unix timestamp now | |
QUERY_ID=$(aws logs start-query \ | |
--profile $profile \ | |
--log-group-name /aws/lambda/aap-event-consumer-dev \ | |
--start-time `date -v-30M "+%s"` \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
grep -B 3 -A 10 -n '\[error\]' storage/logs/web.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "AWSRegionToAMI:" | |
for region in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text) | |
do | |
echo " ${region}:"; | |
AMI=$(aws ssm get-parameters --names /aws/service/ecs/optimized-ami/amazon-linux/recommended --region $region | jq -r '.Parameters[0].Value | fromjson | .image_id') | |
printf " AMI: %s \n" $AMI | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Reference: https://stackoverflow.com/questions/36647058/removing-duplicates-with-unique-index | |
ALTER IGNORE TABLE mytable ADD UNIQUE INDEX myindex (A, B, C, D); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer require flipboxfactory/saml-sp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#waiting for craftcms v3! | |
while true; do composer update; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# REPOs | |
# https://hub.docker.com/r/flipbox/php/ | |
version: "3" | |
services: | |
web: | |
image: flipbox/php:72-fpm-alpine | |
volumes: | |
- .:/app/ | |
# point to your fpm inis | |
- ./general.ini:/usr/local/etc/php/conf.d/general.ini |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
web: | |
image: flipbox/php:71-amazonlinux-apache | |
ports: | |
- 80:80 | |
#I have a self signed cert for local dev work | |
- 443:443 | |
volumes: | |
- .:/var/www/html |