Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Alcides Ramos AlcidesRC

🏠
Working from home
View GitHub Profile
@AlcidesRC
AlcidesRC / backup-projectx.sh
Last active Mar 15, 2021
Shell script that performs a complete backup and keeps the files locally and also in AWS S3
View backup-projectx.sh
#!/bin/sh
#
# Setup: crontab -e
#
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
@AlcidesRC
AlcidesRC / pre-push
Created Mar 12, 2021
Ejemplo de pre-push Git hook para aplicaciones PHP y Docker
View pre-push
#!/bin/bash
# Run '$(chmod +x pre-push; ln -s .git/hooks/pre-push pre-push)' to install
RESET='\e[0m'
RED='\e[31m'
GREEN='\e[32m'
YELLOW='\e[33m'
#----------------------------------------------------------------------------------------------------------------------
@AlcidesRC
AlcidesRC / pre-commit
Last active Mar 12, 2021
Ejemplo de pre-commit Git hook para aplicaciones PHP y Docker
View pre-commit
#!/bin/bash
# Run '$(chmod +x pre-commit; ln -s .git/hooks/pre-commit pre-commit)' to install
RESET='\e[0m'
RED='\e[31m'
GREEN='\e[32m'
YELLOW='\e[33m'
SERVICE_NAME='api'
@AlcidesRC
AlcidesRC / Makefile
Last active Mar 12, 2021
Makefile for dockerized PHP applications with available targets distributed on different files
View Makefile
.PHONY: no_targets__ info help build deploy doc
no_targets__:
.DEFAULT_GOAL := help
#-----------------------------------------------------------------
# CONSTANTS
#-----------------------------------------------------------------
ifneq (,$(findstring xterm,${TERM}))
@AlcidesRC
AlcidesRC / Makefile
Last active Mar 12, 2021
Makefile for dockerized PHP applications with available targets on the same file
View Makefile
.PHONY: no_targets__ info help build deploy doc
no_targets__:
.DEFAULT_GOAL := help
#-----------------------------------------------------------------
# CONSTANTS
#-----------------------------------------------------------------
ifneq (,$(findstring xterm,${TERM}))