Skip to content

Instantly share code, notes, and snippets.

View marrold's full-sized avatar

Matthew Harrold marrold

View GitHub Profile
Action: Login
Username: USER
Secret: PASSWORD
ActionID: 0
Asterisk Call Manager/5.0.3
Response: Success
ActionID: 0
Message: Authentication accepted
import time
from settings import login, connection
from asterisk.ami import AMIClient,AutoReconnect
def ami_disconnected(client, response):
print(f"The AMI has disconnected: {response}")
def event_notification(source, event):
print(f"Event: {event}")
#!/usr/bin/env bash
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce
@marrold
marrold / InitialBootScript
Last active July 9, 2018 22:19
Initial Boot Script
#!/bin/sh
# Disable root login
sed -i -z 's/PermitRootLogin yes\|$/PermitRootLogin no/' /etc/ssh/sshd_config
sed -i -z 's/#PasswordAuthentication yes\|$/PasswordAuthentication no/' /etc/ssh/sshd_config
# Update and install packages
apt update
apt upgrade -y
apt install -y\