Skip to content

Instantly share code, notes, and snippets.

View cweiland's full-sized avatar

Christophe WEILAND cweiland

View GitHub Profile
#!bin/bash
for pid in `lsof +L1 | grep deleted | awk '{print $2}' | uniq`
do
for fdid in `ls -l /proc/${pid}/fd | grep deleted | awk '{print $9}'`
do
> "/proc/${pid}/fd/${fdid}"
done
done
@cweiland
cweiland / get_snds_data.py
Created June 1, 2019 07:58 — forked from mkubenka/get_snds_data.py
Download Outlook Smart Network Data Service Data for last 90 days
# Enable automated data access under https://postmaster.live.com/snds/auto.aspx
import datetime
import requests
import shutil
DATA_URL = 'https://postmaster.live.com/snds/data.aspx?key=xx'
for i in range(90):
date = datetime.datetime.now() + datetime.timedelta(-i)