Skip to content

Instantly share code, notes, and snippets.

@sdarwin
sdarwin / rc-slack.css
Created November 1, 2023 16:32
Rocket.Chat Slack Theme
/* Instructions
This guide assume that admin has added dark-mode from https://github.com/pbaity/rocketchat-dark-mode/blob/master/dark-mode.css and
https://github.com/pbaity/rocketchat-dark-mode/blob/master/dark-mode-toggle.js
for more detail about how to install these files, please refer to : https://github.com/pbaity/rocketchat-dark-mode
## Updating RC with Slack Style
1. Navigate to [rocket-chat-url]/admin/settings/General, and disable: "Enable Content-Security-Policy"
@sdarwin
sdarwin / gist:dcb4afc68f0952ded62d864a6f720ccb
Created September 15, 2023 15:35
delete-s3-directory.sh
#!/bin/bash
# Recursively delete an entire directory in S3, including versions and deletemarkers.
# Modify these variables:
BUCKET="_bucket_"
PROFILE="_profile_"
PREFIX="_directory_prefix_"
# Delete Object Versions:
@sdarwin
sdarwin / kubernetes_add_service_account_kubeconfig.sh
Last active February 28, 2024 11:42
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user.
#!/bin/bash
set -e
set -o pipefail
# https://gist.github.com/sdarwin/ffc5fed82b6128a7549fd6d5696d98a8
#
# Based on https://gist.github.com/innovia/fbba8259042f71db98ea8d4ad19bd708
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
#!/usr/bin/python3
# Replaces indented code with fenced code blocks
import re
import glob
skiplist=['doc/src/concepts.md', 'doc/src/faq.md']
def replfunction1(matchobj):