Skip to content

Instantly share code, notes, and snippets.

@yuezhu
yuezhu / AutoBotCmd.py
Last active June 3, 2024 10:33
Paramiko Example
#!/usr/bin/env python
import paramiko
from paramiko.ssh_exception import SSHException
import threading
import select
import time
import logging
import re
import os
@ivanleoncz
ivanleoncz / flask_job_scheduler.py
Last active June 27, 2024 07:23
Demonstrating APScheduler on a Flask App.
#!/usr/bin/python3
""" Demonstrating APScheduler feature for small Flask App. """
from apscheduler.schedulers.background import BackgroundScheduler
from flask import Flask
def sensor():
""" Function for test purposes. """
print("Scheduler is alive!")
@crosbymichael
crosbymichael / Dockerfile
Last active January 8, 2022 13:47
Docker with supervisor
FROM ubuntu
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade
RUN apt-get install -y openssh-server supervisor
ADD sshd.conf /etc/supervisor/conf.d/sshd.conf
RUN mkdir -p /var/run/sshd