This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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; |