Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View diegodurante's full-sized avatar

Diego Durante diegodurante

View GitHub Profile
@diegodurante
diegodurante / slack_delete.rb
Last active April 10, 2017 09:03 — 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.
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,
<?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