Skip to content

Instantly share code, notes, and snippets.

View dbuteau's full-sized avatar
🤘
Always busy

Daniel Buteau dbuteau

🤘
Always busy
  • Sophia Antipolis, France
View GitHub Profile
@bhcopeland
bhcopeland / require_updated_git_branch.py
Created December 11, 2014 09:23
ansible callback_plugin to check that the locally git directory is up to date/in sync.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import subprocess
import sys
from ansible.callbacks import display, banner
@EronHennessey
EronHennessey / check4siteupdate.py
Created October 15, 2013 18:21
A Python script that checks the last-modified date of a URL against the last-modified date of a previous look at it. If the last-modified date has changed, it emails the designated address, saying so. This could be used as a cron job to periodically check for updates of any page on the internet.
# check for an update on a web-page, and email the user
import httplib
import sys
import pickle
from datetime import datetime
import smtplib
from email.mime.text import MIMEText
import yaml
def email_user(cur_data, email_from, email_to):