Skip to content

Instantly share code, notes, and snippets.

View jbq's full-sized avatar

Jean-Baptiste Quenot jbq

View GitHub Profile
@jbq
jbq / slack_delete.py
Last active October 28, 2016 11:22 — forked from Paradoxis/slack_delete.py
Delete Slack files via API. Usage: python slack_delete.py --token <apiToken> [-d <olderThanDays>] [-c <maxCount>]
import argparse
import requests
import time
import json
def main():
"""
Entry point of the application
:return: void
@jbq
jbq / docker-cleanup
Last active November 2, 2016 09:47 — forked from Dufgui/gist:72debe81068bf3ecd7d8
Script to delete exited containers and untagged/unused images from docker
#! /bin/bash
set -o errexit
echo "Removing exited docker containers..."
docker ps -a -f status=exited -q | xargs -r docker rm -v
# Do not remove dangling images they may still be in use
#echo "Removing dangling images..."
#docker images --no-trunc -q -f dangling=true | xargs -r docker rmi