Skip to content

Instantly share code, notes, and snippets.

@patrickklug
patrickklug / slack-download.py
Created December 30, 2019 03:12 — forked from marnitto/slack-download.py
Slack file downloader from export archive
# -*- coding: utf-8 -*-
#
# Slack file downloader from export archive
#
# Requirements:
# Python 2 (or Python3 if you can use six)
#
# How to use:
# 1. Log in as admin, export your chat logs, and download archive.
# 2. Unarchive archive to directory (ex. TeamName export Apr 24 2016)
if (!Array.prototype.contains) {
Array.prototype.contains = function (element) {
return this.indexOf(element) != -1;
};
}
if (!String.prototype.contains) {
String.prototype.contains = function (str) {
return this.indexOf(str) != -1;
}
@patrickklug
patrickklug / gist:10526120
Created April 12, 2014 09:10
keybase gist
### Keybase proof
I hereby claim:
* I am patrickklug on github.
* I am patrickklug (https://keybase.io/patrickklug) on keybase.
* I have a public key whose fingerprint is D695 7005 4D70 8746 1CC5 8485 2828 184D 6E7E D4CE
To claim this, I am signing this object:
@patrickklug
patrickklug / preciseTimeout.js
Created June 15, 2012 04:36
high precision setTimeout alternative based on setImmediate API
//high precision setTimeout alternative which uses setImmediate internally to schedule callback.
//can only work in IE 10 since no other browser supports setImmediate yet.
var setPreciseTimeout = function (fn, delay) {
if (!setImmediate)
return setTimeout(fn, delay);
var start = Date.now();
function loop() {
var delta = Date.now() - start;