Skip to content

Instantly share code, notes, and snippets.

Diego Durante diegodurante

View GitHub Profile
View S3FixExistingMedia.php
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
/* ======================================================
This script is NOT FULLY TESTED (not tested on Windows Server either)
USE AT YOUR OWN RISK - development environment Ubuntu Linux 14.04.3 LTS
The purpose of this script is for small websites and blogs
@diegodurante
diegodurante / slack_delete.rb
Last active Apr 10, 2017 — forked from jamescmartinez/slack_delete.rb
This Ruby script will bulk remove all Slack files older than 30 days. Create your legacy token form here: https://get.slack.help/hc/en-us/articles/215770388-Create-and-regenerate-API-tokens and then add it into the token quotes at the top of the file.
View slack_delete.rb
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
You can’t perform that action at this time.