Skip to content

Instantly share code, notes, and snippets.

View andrewcmyk's full-sized avatar

Andrew Le andrewcmyk

View GitHub Profile
andrewcmyk / slack_delete.rb
Last active April 22, 2018 01:07 — forked from jamescmartinez/slack_delete.rb
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
require 'active_support/time'
@token = ''
def list_files
ts_to = ( - 6.months).to_i # 6 months ago
params = {