Skip to content

Instantly share code, notes, and snippets.

View naala89's full-sized avatar

Naala89 naala89

View GitHub Profile

Notes for setting up a new server

Add new user for general use

sudo su
useradd -m -d /home/<username> <username>
passwd <username>
visudo
  ALL=(ALL) NOPASSWD:ALL
@naala89
naala89 / Ubuntu 22.04, NGINX + Certbot.md
Last active April 11, 2024 03:01
Implement Certbot on NGINX on Ubuntu 22.04

Implement Certbot on NGINX on Ubuntu 22.04

Install

Certbot package

sudo snap install core; sudo snap refresh core
sudo apt remove certbot
sudo snap install --classic certbot

Download a branch or tag from a reopository into a destination.

This is a script I am using to download a branch or tag from a repository in Gitlab or GitHub. It is used in https://gitlab.com/apiopenstudio/docker_images/apiopenstudio_docker_prod and I wanted to share it for anyone that might find it useful. It takes 3 inputs:

  1. Repository URL (examples: https://github.com/naala89/apiopenstudio, https://gitlab.com/apiopenstudio/apiopenstudio)
  2. Branch name (optional)
  3. Tag name (optional)

example usage:

@naala89
naala89 / aws-security-group-for-github-ssh.md
Last active January 13, 2023 00:44
AWS Security group for GitHub SSH

Add an AWS Security group for GitHub SSH

  • Visit https://api.github.com/meta for the latest GitHub IP ranges
  • Copy all of the ranges in the git section, and paste into a text editor
  • Replace ", " with ,
  • In AWS console, navigate to Network & Security > Security Groups