Skip to content

Instantly share code, notes, and snippets.

View isyutaro's full-sized avatar
🏠
Working from home

Jean Sanchez isyutaro

🏠
Working from home
  • Mexico
  • 10:29 (UTC -06:00)
View GitHub Profile
@iamstuartwilson
iamstuartwilson / slack-file-killer.js
Last active August 8, 2018 20:58
Kill multiple slack files from your browser console. Simply paste this code when on the "https://[space].slack.com/files/[me]" page.
(function(){
$('#files_list > [data-file-id]').each(function(i) {
killIt($(this).attr('data-file-id'));
function killIt(id) {
console.log(id);
$.post('/api/files.delete', {
file: id,
token: boot_data.api_token
@jackcarter
jackcarter / slack_delete.py
Last active November 29, 2023 07:03
Delete Slack files older than 30 days. Rewrite of https://gist.github.com/jamescmartinez/909401b19c0f779fc9c1
import requests
import time
import json
token = ''
#Delete files older than this:
ts_to = int(time.time()) - 30 * 24 * 60 * 60
def list_files():