Skip to content

Instantly share code, notes, and snippets.

View dheniges's full-sized avatar

Dirk Heniges dheniges

View GitHub Profile
@dheniges
dheniges / slack_delete.rb
Created June 5, 2018 23:09 — 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,
@dheniges
dheniges / strategy.js
Last active August 29, 2015 14:09 — forked from jcontonio/strategy.js
// Web server does this, hits an endpoint
// { type: 'saml', strategy: company.strategy }
var company = Company.findByDomain(__domain);
if (company) {
var strategy = company.strategy;
}