Skip to content

Instantly share code, notes, and snippets.

View ThabetAmer's full-sized avatar
🎯
In the search for a new challenge!

Thabet Amer ThabetAmer

🎯
In the search for a new challenge!
View GitHub Profile
@OJ7
OJ7 / automations.yaml
Last active April 18, 2024 18:56
Home Assistant config for automatically playing Adhan on Google Home/Nest (updated 2022)
- id: '1660878281315'
alias: Play Adhan on Google Home
description: ''
trigger:
- platform: template
value_template: '{{ states.sensor.dhuhr.state == states.sensor.time.state }}'
- platform: template
value_template: '{{ states.sensor.asr.state == states.sensor.time.state }}'
- platform: template
value_template: '{{ states.sensor.maghrib.state == states.sensor.time.state }}'
@npearce
npearce / install-docker.md
Last active April 19, 2024 12:35
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
Jenkinsfile VIM syntax highlighting
echo 'au BufNewFile,BufRead Jenkinsfile setf groovy' >> ~/.vimrc
@LeonardoCardoso
LeonardoCardoso / gitzip.sh
Last active October 9, 2023 22:38
Zip folder ignoring files listed on .gitignore
#...
function gitzip() {
git archive -o $@.zip HEAD
}
#... gitzip ZIPPED_FILE_NAME
@rpherrera
rpherrera / get-aws-ecr-repositories-names.sh
Last active August 31, 2023 01:26
get aws ecr repositories names with aws cli, parsing results with jq and stripping double quotes with sed or tr
#!/bin/bash
# stripping double quotes with sed
aws ecr describe-repositories | jq '.repositories[].repositoryName' | sed s/\"//g
# stripping double quotes with tr
aws ecr describe-repositories | jq '.repositories[].repositoryName' | tr -d '"'