Skip to content

Instantly share code, notes, and snippets.

@levigroker
levigroker / dump.sh
Last active September 5, 2023 09:24
Companion to slackdump to perform selective exports and export updates from Slack
#!/bin/bash
#
# dump.sh
#
# Dumps messages and attachments for selected 1-1 direct messages, and selected named
# channels and group PMs, from the authenticated Slack workspace. Subsequent runs will
# fetch only the new content since the previous run.
#
# NOTE: This will cache the user and channel listing, so if new users or channels are
# expected it is best to delete these files so they are re-acquired.
@levigroker
levigroker / Normalize Table.py
Last active July 27, 2022 23:24
A BBEdit Text Filter script to "pretty print" GitHub Flavored Markdown tables.
#!/usr/local/bin/python3
#
# Normalize Table.py
# https://gist.github.com/levigroker/630b9920ff5d74840c37aa3538b5c78f
#
# A BBEdit Text Filter script to "pretty print" GitHub Flavored Markdown tables.
# See http://bbeditextras.org/wiki/index.php?title=Text_Filters
# See # GitHub Flavored Markdown Spec: https://github.github.com/gfm/
#
# Originally from http://www.leancrew.com/all-this/2012/11/markdown-table-scripts-for-bbedit/
@levigroker
levigroker / JSON Compact.sh
Last active November 16, 2023 21:59
BBEdit Text Filter to format JSON compactly
#!/bin/bash
# JSON Compact - BBEdit Text Filter to format JSON compactly
# https://gist.github.com/levigroker/83fbb569f1c3bb9e445d83b25293aac5
# 2023-11-16
JQ_E="jq"
which "$JQ_E" >/dev/null 2>&1
[ $? == 0 ] || { echo "ERROR: Please ensure '$JQ_E' is installed. 'brew install $JQ_E' (see https://jqlang.github.io/jq/ )" >&2; exit 1; }
$JQ_E -c .
@levigroker
levigroker / Base64 Decode.sh
Last active January 15, 2022 20:23
A BBEdit Text Filter script to take textual input and produce Base64 decoded text of the same.
#!/bin/bash
#
# Base64 Decode
# https://gist.github.com/levigroker/aacf13e1d3f88403df214542c05483b4
#
# A BBEdit Text Filter script to take textual input and produce Base64 decoded text of the
# same.
# See https://www.bbeditextras.org/text-filters/
# Levi Brown
# @levigroker
@levigroker
levigroker / Base64 Encode.sh
Last active January 8, 2022 19:38
A BBEdit Text Filter script to take textual input and produce Base64 encoded text of the same.
#!/bin/bash
#
# Base64 Encode
# https://gist.github.com/levigroker/cd252cc656234dd8b19bfd4d96255a5c
#
# A BBEdit Text Filter script to take textual input and produce Base64 encoded text of the
# same.
# See https://www.bbeditextras.org/text-filters/
# Levi Brown
# @levigroker
@levigroker
levigroker / GitHubFlavoredMarkdown.sh
Last active February 27, 2024 23:20
A BBEdit Preview Filter script to render GitHub flavored markdown as HTML
#!/bin/bash
#
# GitHub Flavored Markdown
# https://gist.github.com/levigroker/96f96253c992b7a947d93c3d32d80b8d
#
# A BBEdit Preview Filter script to render GitHub flavored markdown as HTML
# See the "Applying Preview Filters" section of the BBEdit Manual
# https://www.barebones.com/support/bbedit/index.html#docs
# GitHub Flavored Markdown Spec: https://github.github.com/gfm/
# GitHub Flavored Markdown CLI: https://github.com/github/cmark-gfm
@levigroker
levigroker / URLEncode.sh
Last active April 14, 2022 06:48
A BBEdit Text Filter script to take textual input and produce URL encoded text of the same.
#!/bin/bash
#
# URL Encode
# https://gist.github.com/levigroker/36525010ba0bce15450c89fe6a5f36b1
#
# A BBEdit Text Filter script to take textual input and produce URL encoded text of the same.
# See https://www.bbeditextras.org/text-filters/
# Levi Brown
# @levigroker
# levigroker@gmail.com
@levigroker
levigroker / URLDecode.sh
Last active June 27, 2023 21:40
A BBEdit Text Filter script to take textual input and produce URL decoded text of the same.
#!/bin/bash
#
# URL Decode
# https://gist.github.com/levigroker/892fd435d701b4e8f56bfcec819d5ef2
#
# A BBEdit Text Filter script to take textual input and produce URL decoded text of the same.
# See https://www.bbeditextras.org/text-filters/
# Levi Brown
# @levigroker
# levigroker@gmail.com
@levigroker
levigroker / spikeroak.sh
Created December 10, 2016 02:20
A bash script to download and verify spideroak.com's warrant canary file.
#!/bin/bash
#
# spideroak.sh
#
# A bash script to download and verify spideroak.com's warrant canary file.
# Requires GnuPG to be installed ( https://gpgtools.org https://www.gnupg.org )
#
# by Levi Brown
# levigroker@gmail.com
# December 9, 2016
@levigroker
levigroker / ASCII to Hex
Last active May 25, 2021 20:35
A BBEdit Text Filter script to take textual input and produce hedidecimal array values of the same.
#!/bin/bash
#
# ASCII to Hex
# https://gist.github.com/levigroker/193ba909e2354de870513eec46c08222
#
# A BBEdit Text Filter script to take textual input and produce hedidecimal array values of the same.
# See http://bbeditextras.org/wiki/index.php?title=Text_Filters
# Levi Brown
# levigroker@gmail.com
# December 8, 2016