Skip to content

Instantly share code, notes, and snippets.

View jaircuevajunior's full-sized avatar
:octocat:
Hello there!

Jair Cueva Júnior jaircuevajunior

:octocat:
Hello there!
View GitHub Profile
@jaircuevajunior
jaircuevajunior / aws-ec2-setup-guide.md
Last active April 17, 2024 15:08
A simple guide to help myself setup a common LAmP environment on a AWS Ubuntu 18.04 instance with things that I should not forget

AWS EC2 Setup Guide

Enable Swap File (2GB)

fallocate -l 2G /swapfile &&\
chmod 600 /swapfile &&\
mkswap /swapfile &&\
swapon /swapfile &&\
echo "/swapfile swap swap defaults 0 0" >> /etc/fstab &&\
free -h
@jaircuevajunior
jaircuevajunior / plesk_php_composer.md
Created February 6, 2018 12:32
PLESK - PHP CLI + COMPOSER

PHP

Available versions:

  • 5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1

Example:

/opt/plesk/php/7.1/bin/php

COMPOSER

@dduvnjak
dduvnjak / add_cloudflare_ips.sh
Last active September 27, 2024 17:49
Add CloudFlare IP addresses to an EC2 Security Group using awscli
# first we download the list of IP ranges from CloudFlare
wget https://www.cloudflare.com/ips-v4
# set the security group ID
SG_ID="sg-00000000000000"
# iterate over the IP ranges in the downloaded file
# and allow access to ports 80 and 443
while read p
do
@djdefi
djdefi / .gitignore
Last active April 19, 2022 13:54
Wordpress change tracking with Git
# Keep these files out of the repo
/wp-content/themes/twenty*
/wp-content/upgrade
/wp-content/uploads
/sitemap.*
/wp-config.php
*.sql
# Hidden files
*.DS_Store