Skip to content

Instantly share code, notes, and snippets.

View daluamon's full-sized avatar

Marcio Alves daluamon

View GitHub Profile
@daluamon
daluamon / git-deployment.md
Created September 26, 2023 21:23 — forked from JonatanFlores/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@daluamon
daluamon / node_nginx_ssl.md
Created September 26, 2023 21:18 — forked from JonatanFlores/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to Digital Ocean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@daluamon
daluamon / react.md
Created April 29, 2023 20:12
React

‎‎​

@daluamon
daluamon / php8_docker.sh
Created April 15, 2023 14:31 — forked from webarchitect609/php8_docker.sh
Quick docker PHP 8 setup for composer and unit testing
# Terminal Tab #1 (with privileges inside container)
# =============
cd "/the/dir/you/want/to/work/with/php8"
docker run --name php8 \
-it \
-v $PWD:/var/php:rw \
php:8.0-cli-alpine3.12 \
ash
cd /tmp
@daluamon
daluamon / laravel_horizon.md
Created February 24, 2023 19:38 — forked from ankurk91/laravel_horizon.md
Laravel Horizon, redis-server, supervisord on Ubuntu server

Laravel Horizon, redis-server, supervisord on Ubuntu 20/22 server

Laravel 8+, Horizon 5.x, Redis 6+

Parepare application

  • Install and configure Laravel Horizon as instructed in docs
  • Make sure you can access the Horizon dashboard like - http://yourapp.com/horizon
  • For now it should show status as inactive on dashbaord

Install redis-server

@daluamon
daluamon / Laravel.md
Last active February 20, 2023 20:28
@daluamon
daluamon / git.md
Created January 20, 2023 16:28 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@daluamon
daluamon / Docker - Comandos Úteis
Last active June 16, 2020 00:27
Comando Docker
# Docker - Comandos Úteis
## Containers
- Abrir um shell em um container em execução:
- `docker exec -t -i <container_id> <shell>`
## Limpeza
- Excluir containers com status equivalente a Exited:
@daluamon
daluamon / Gerar chave ssh no git
Created January 14, 2017 11:53
Gerar chave ssh no git
Primeiramente, devemos gerar um novo par de chaves usando o comando ssh-keygen:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
O comando irá perguntar em qual arquivo você deseja salvar sua chave. Se você não tem nenhuma chave configurada, não tem problema usar o nome padrão (id_rsa). Em seguida, ele perguntará se você deseja usar uma senha que será perguntada toda vez que você fizer uma autenticação baseada nas suas chaves. Recomendo configurar uma senha se você compartilha seu computador com outras pessoas.
Enter passphrase (empty for no passphrase): [digite sua senha]
Enter same passphrase again: [digite sua senha novamente]
Finalmente, sua chave será salva na pasta ~/.ssh: