Ron and Ella Wiki Page

Extremely Serious

Page 24 of 34

Creating a Google App Password

Procedure

    1. Sign-in to https://accounts.google.com/ using the account to wanted to use.
    2. Click Security from the side menu
    3. On the Signing in to Google section, click App Passwords.
    4. Select the application you wanted to use from google (e.g. Mail, Calendar, Contacts or YouTube).
    5. Select the Other (Custom name) for the device, and name it appropriately.
    6. Click the generate button.
  1. Now you have your 16-character password that you can use.

Using RSYNC to Sync Some Local Directories to Remote Directory via SSH

Requirement

  • SSH Server on Remote Computer

Syntax

To sync some of your local directories to a remote directory via ssh you can use the following syntax:

rsync -av -L --delete -e ssh <DIR1>[[ <DIR2>] <DIRn>] <REMOTE_USER>@<REMOTE_HOST>:<REMOTE_DIR>
Token Description
DIR1, DIR2, DIRn These are the local directories you've wanted to be synced remotely. Only DIR1 is required and the rest are optional.
REMOTE_USER A valid user on the remote machine.
REMOTE_HOST A valid address of the remote machine.
REMOTE_DIR The destination directory on the remote machine.

Example

rsync -av -L --delete -e ssh /data/artifactory backup01@10.0.0.204:/volume1/backup

Create a New Azure Function App with .Net Core by Azure Function Core Tools

Requirements

Procedures

  1. Create a directory to house your azure function codes.
  2. Using the command console,  navigate to the newly created directory.
  3. Execute the following command and select dotnet (i.e. usign the arrow keys) and press enter.
    func init

    Wait for the command prompt to come back.

  4. On the new prompt, execute the following command and select the template you want (i.e. using the arrow keys) and press enter.
    func new
  5. Type a name for the function and press enter.

Schedule Certbot-Auto to Auto Renew Weekly with NGINX

  1. Create the file in /etc/cron.weekly/certbot-renewal using the following command
    sudo vi /etc/cron.weekly/certbot-renewal
  2. Place in the following in the file and save it:
    #!/bin/sh
    
    /usr/sbin/certbot-auto renew --no-bootstrap --no-self-upgrade --post-hook "service nginx restart"
  3. Change the mode of file to 755 using the following command:
    sudo chmod 755 /etc/cron.weekly/certbot-renewal
« Older posts Newer posts »