Skip to content

Instantly share code, notes, and snippets.

@colelawrence
colelawrence / slack-download.py
Last active February 2, 2022 18:31 — forked from marnitto/slack-download.py
Slack file downloader from export archive (2021)
# -*- 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)
@colelawrence
colelawrence / regex-console.re
Last active August 29, 2015 14:23
Remove all console.log statements from JavaScript in Sublime, acknowledging quotes, newlines, and parenthesis
Ensure regex button is selected and then type this in the search field.
\s*console\.(log|warn|debug|info|count)\((?:[^("'`]+|(["'`])[^\1]*?\1|(\()[^\2]*\2)*?\);?
// found on http://snipplr.com/view/36790/jscookies--my-simple-easy-pure-js-javascript-cookies-function/
// Modified with Regexes by Cole Lawrence (ZombieHippie)
// create my jsCookies function
var jsCookies = {
// this gets a cookie and returns the cookies value, if no cookies it returns blank ""
get: function(c_name) {
var regex = new RegExp(c_name + "=([^;]+)");