Skip to content

Instantly share code, notes, and snippets.

@pca2
pca2 / datetime_to_cron.py
Last active March 23, 2022 15:07 — forked from kathawala/datetime_to_cron.py
Converts a python datetime to a crontab expression which fires once (at the date+time specified in the python datetime object)
from datetime import datetime
def datetime_to_cron(dt):
return f"{dt.minute} {dt.hour} {dt.day} {dt.month} *"
@pca2
pca2 / install-tmux.sh
Last active August 17, 2016 03:45 — forked from rothgar/install-tmux
Install tmux 2.0 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
sudo yum install -y gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local