Skip to content

Instantly share code, notes, and snippets.

View zk-1's full-sized avatar

Zoë Kelly zk-1

  • Shopify
  • Ontario, Canada
View GitHub Profile
@zk-1
zk-1 / slack_conversations_export_genericized_markdown.rb
Last active June 8, 2023 18:29
Ruby script to export Slack conversations to a genericized markdown format suitable for ingestion by AI LLMs. Supports CSV, JSONL and JSON.
# typed: false
# frozen_string_literal: true
# usage: ruby ./slack_conversations_export_genericized.rb
require "slack-ruby-client"
require "nokogiri"
require "yaml"
require "json"
require "csv"
@zk-1
zk-1 / install_GAMADV-XTD3_alongside_GAM.sh
Last active January 7, 2022 21:45
Install GAMADV-XTD3 alongside GAM
#!/usr/bin/env bash
# Name: Install GAMADV-XTD3 alongside GAM
# Usage: ./install_GAMADV-XTD3_alongside_GAM.sh
# Description: Installs latest version of GAMADV-XTD3 alongside GAM, and creates 'gam3' alias for it
# Author: Zoë Kelly (zoe@starshade.ca)
# License: MIT
# Created: 2021-12
# Updated:
## Note: For macOS only, and assumes original GAM was installed in the regular way
@zk-1
zk-1 / list-slack-app-users.js
Last active December 7, 2021 21:34
Get a list of all authorized users IDs of a Slack app (max 1001 users)
// Gets a list of all authorized users IDs of a Slack app in your org (max 1001 users)
// In your browser, go to the app's page (slack.com/apps -> Manage -> click on the app), then run this in the browser console:
JSON.parse($("div[data-automount-component|='AppDirectoryAuthorizations']")[0].attributes["data-automount-props"].value).authorizations.map(this_auth => this_auth.encodedUserLink).toString()
@zk-1
zk-1 / slack-profile-field-migrate.sh
Created June 29, 2021 00:13
Migrate profile fields for one or all members of a Slack workspace
#!/usr/bin/env bash
# Name: Slack Profile Field Migrate
# Usage: slack-profile-field-migrate.sh
# Description: Migrate profile fields for one or all members of a Slack workspace
# Author: Zoë Kelly (zoe@starshade.ca)
# License: MIT
# Created: 2021-06
# Updated: 2021-06-28
## Note:
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <ArduinoOTA.h>
#include <WiFiUdp.h>
#include <PubSubClient.h>
#include <NTPClient.h>
#include <ArduinoJson.h>
#include <string>
#include <DHT.h>
@zk-1
zk-1 / gam-batch-archive.sh
Last active July 19, 2022 13:12
This scripts allows the batch archival of G Suite accounts, via the accompanying gam-archive.sh script
#!/usr/bin/env bash
# Name: gam-batch-archive.sh
# Usage: cat archive_user_list.txt | gam-batch-archive.sh mail|drive|both
# Description: This scripts allows the batch archival of G Suite accounts, via the accompanying gam-archive.sh script
# Author: Zoë Kelly (zoe@starshade.ca)
# License: MIT
# Created: 2020
# Updated:
## Note: The gam-archive.sh script should be in the same folder or else added to $PATH. The input file should have a list of G Suite users to be archived, each on a newline. The email prefix should be used, i.e. jsmith.
@zk-1
zk-1 / gam-archive.sh
Last active January 12, 2023 20:35
This script will archive a G Suite account's email (as .mbox) and/or Google Drive files to a specified IT Google Drive folder.
#!/usr/bin/env bash
# Name: gam-archive.sh
# Usage: gam-archive.sh email_prefix [mail|drive|both]
# Example: gam-archive.sh jsmith mail
# Description: This script will archive a G Suite account's email (as .mbox) and/or Google Drive files to a specified IT Google Drive folder.
# Author: Zoë Kelly (zoe@starshade.ca)
# License: MIT
# Created: 2020
# Updated: 2020
## Note: Depending on the export size and your upload speed, it could take 10 minutes or longer for each archival.
@zk-1
zk-1 / chp.sh
Last active August 5, 2020 03:15
A CLI tool to allow quicker changing of the AWS_PROFILE env var. You can save it as /usr/local/bin/chp for easy access
# Name: CHP
# Usage: . chp
# . chp [1|2|3]
# Description: Quickly change the AWS_PROFILE environment variable
# Author: Zoë Kelly (zoe@starshade.ca)
# License: MIT
# Created: 2020
# Updated: 2020
## Note: