Skip to content

Instantly share code, notes, and snippets.

@almoore
almoore / SSH_AGENT_SETUP.md
Created October 21, 2019 20:54
SSH Agent and Forwarding

SSH Agent

We already know how to use keys in order to connect through Secure Shell, but, there is an issue, it requires unlocking private key with a secret passphrase upon each connection.

To avoid this, we need to use ssh-agent, a program that runs in background and stores your keys in memory.

Enable ssh-agent

# start the ssh-agent in the background
$ eval "$(ssh-agent -s)"
@almoore
almoore / README.md
Last active April 10, 2024 12:34
Getting realtime output using Python Subprocess

Keybase proof

I hereby claim:

  • I am almoore on github.

  • I am alexgmoore (https://keybase.io/alexgmoore) on keybase.

  • I have a public key ASDk-zia1_eW4EXDRU3Sdr7CpGnxcuAyBVth3-0BE5Rd2go

# SETUP BASH with a bunch of predefined colors.
# Makes reading code easier than escape sequences.
# Customize BASH PS1 prompt to show current GIT repository and branch.
# Credit to Mike Stewart - http://MediaDoneRight.com
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@almoore
almoore / nodeApp.service
Created December 18, 2017 03:59
Systemd node start script
[Unit]
Description=hello_env.js - making your environment variables rad
Documentation=https://example.com
After=network.target
[Service]
Environment=NODE_PORT=3001
Type=simple
User=root
ExecStart=/usr/bin/node /home/ubuntu/hello_env.js