Skip to content

Instantly share code, notes, and snippets.

@techyboy
techyboy / Ansible Let's Encrypt Nginx setup
Created February 12, 2024 15:47 — forked from mattiaslundberg/Ansible Let's Encrypt Nginx setup
Let's Encrypt Nginx setup with Ansible
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
@techyboy
techyboy / resize-root-partition
Last active December 6, 2020 01:34 — forked from troyfontaine/readme.md
Resize root partition (or how to remove the default /home partition) on CentOS 7 online
# Resize root partition (or how to remove the default /home partition) on CentOS 7 online
This requires you to be able to ssh into the instance using the root user account and that no services be running as users out of /home on the target machine.
The examples are from a default installation with no customation-you NEED to know what you're working with for volumes/partitions to not horribly break things.
By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: `/`,`/home` and
## Step 1 - Copy /home Contents
To backup the contents of /home, do the following:
```bash
@techyboy
techyboy / install nodejs, npm and gulp
Created March 10, 2018 06:48 — forked from luisfc/install nodejs, npm and gulp
Install nodejs, npm and gulp ubuntu 16.04
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
## Use n module from npm in order to upgrade node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
@techyboy
techyboy / gist:e829bd9c6929d79715f335b201378989
Created February 24, 2018 06:15 — forked from mikepfeiffer/gist:a4ce6d25ae092f1a4ea97afad5879530
EC2 user data script to boostrap Windows instance with Python and AWS CLI
<powershell>
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
choco install python -y
(new-object net.webclient).DownloadFile('https://s3.amazonaws.com/aws-cli/AWSCLI64.msi','c:\AWSCLI64.msi')
msiexec.exe /i 'C:\AWSCLI64.msi' /qn
</powershell>