Skip to content

Instantly share code, notes, and snippets.

@davidgiesberg
davidgiesberg / slack_delete.rb
Created November 15, 2016 15:26 — 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 https://api.slack.com/web#authentication 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,
@davidgiesberg
davidgiesberg / statsd.sh
Created September 21, 2012 20:16 — forked from erickr/statsd.init.sh
Modified statsd.init.sh file to work on Debian
#!/bin/bash
#
# StatsD
#
# chkconfig: 3 50 50
# description: StatsD init.d
. /lib/lsb/init-functions
prog=statsd
STATSDDIR=/opt/statsd