Skip to content

Instantly share code, notes, and snippets.

View imrodrigoalves's full-sized avatar
🧭

Rodrigo Alves Vilela imrodrigoalves

🧭
View GitHub Profile
Install vagrant and homestaed
Using git for windows add to your user in C:\Users\YOUR_USER_NAME a file called .bash_profile with the function
below:
function homestead() {
( cd PATH-TO-HOMESTEAD && vagrant $* )
}
You can call the function in the terminal anywhere at anytime and have direct access to homestead
Install Laravel Homestead Box
## List Docker CLI commands
docker
docker container --help
## Display Docker version and info
docker --version
docker version
docker info
## Execute Docker image
@imrodrigoalves
imrodrigoalves / Cloudwatch Query
Last active January 8, 2022 10:37 — forked from viezel/log query
Laravel Vapor - Cloudwatch insights logs
fields @message | filter @log like "$log_group" | filter @message like /(?i)$search/
| filter @message not like "START RequestId"
| filter @message not like "END RequestId"
| filter @message not like "REPORT RequestId"
| filter @message not like "Starting FPM Process..."
| filter @message not like "Ensuring ready to start FPM"
| filter @message not like "Preparing to boot FPM"
| filter @message not like "NOTICE: ready to handle connections"
@imrodrigoalves
imrodrigoalves / ssh.md
Created February 10, 2022 08:17 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh [email protected]

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@imrodrigoalves
imrodrigoalves / bitbucket-pipelines.yml
Last active August 29, 2022 10:30 — forked from barryvdh/bitbucket-pipelines.yml
Bitbucket Pipeline config for Laravel Vapor, make sure to `composer require laravel/vapor-cli` and set the VAPOR_API_TOKEN environment var.
# image: smartapps/bitbucket-pipelines-debian-10 # php 7.3
image: bitnami/laravel:8.6.9 # php 7.4
pipelines:
branches:
master:
- step:
name: Deploy Test
deployment: test
script:
@imrodrigoalves
imrodrigoalves / resetWSLSpeeds.bat
Last active October 26, 2022 15:46
Allow WSL Fast Internet
@echo off
wsl exit
powershell -Command "Set-NetAdapterLso -Name 'vEthernet (WSL)' -IPv4Enabled $False -IPv6Enabled $False"
@imrodrigoalves
imrodrigoalves / certbot-systemd-ubuntu.md
Created September 20, 2022 09:35 — forked from dbirks/certbot-systemd-ubuntu.md
Certbot renew with a systemd timer on Ubuntu

Ubuntu 16.04

/etc/systemd/system/certbot.service

[Unit]
Description=Let's Encrypt renewal

[Service]
Type=oneshot
ExecStart=/usr/bin/certbot renew --quiet --agree-tos
@imrodrigoalves
imrodrigoalves / README.md
Created April 3, 2023 16:11 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@imrodrigoalves
imrodrigoalves / install_docker_ec2.sh
Last active October 3, 2023 14:40 — forked from dhavaln/install_docker_ec2.sh
Install Docker on EC2
#! /bin/sh
sudo yum update -y
sudo yum install docker -y
sudo usermod -a -G docker ec2-user
sudo id ec2-user
sudo newgrp docker
wget https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)
sudo mv docker-compose-$(uname -s)-$(uname -m) /usr/local/bin/docker-compose
sudo chmod -v +x /usr/local/bin/docker-compose
sudo systemctl enable docker.service