Skip to content

Instantly share code, notes, and snippets.

View rmrfslashbin's full-sized avatar

Robert Sigler rmrfslashbin

View GitHub Profile
rmrfslashbin / Quick text
Created March 28, 2023 17:35
Quick text encryption via openssl

Quick text encryption

Do not use this in production. YYMV.

]$ echo -n 'this is the plaintext' | openssl aes-256-cbc -e -salt -pbkdf2 -iter 10000 -out ciphertext.enc -p

]$ cat ciphertext.enc|openssl enc -base64

]$ openssl aes-256-cbc -d -salt -pbkdf2 -iter 10000 -in ciphertext.enc -p
rmrfslashbin /
Last active November 13, 2022 15:19
Trino SQL Queries

Helpful Trino queries

... to fetch data from my aws-cf-rtl and Trino/Superset projects.


I run Trino in a local Docker container. A Trino query can be invoked from the CLI by passing the query into the --execute param.

docker exec -it trino-us-east-1 trino --output-format ALIGNED --execute "${QUERY}"
rmrfslashbin /
Last active April 9, 2022 01:15
Minimal MacOS setup guide. System/UI and CLI (zsh, Oh My Zsh, brew, etc).
rmrfslashbin /
Last active October 28, 2021 14:05
Python API Credentials Storage

How to store & access API credentials in Python projects

This gist will explore how to leverage a "dotenv" ecosystem to mange application credentials.

Github Repo

The gist follows code in the repo

The twelve-factor app

The Twelve-Factor App concept provides numerous best-practice guidelines for applications and scipts. This gist will provide a python-based foundation, using the dotenv concept, to manage application credentials as described here:


rmrfslashbin / main.go
Last active September 22, 2021 21:09
Golang function to return a "simple number"
package main
import (
func main() {
rmrfslashbin /
Created August 21, 2021 14:39
A simple one-liner to re-process videos from the phone.

ffmpeg -i ${INPUT} -c:v libx265 -preset veryslow -vf 'format=yuv420p' -crf 28 ${OUTPUT}.mp4

rmrfslashbin /
Last active April 4, 2021 16:44
Quick guide to setting up Clevis TPM/Luks boot-time unlock

A brief guide to set up TPM based luks partition unlocing at boot-time.


The TPM must be enabled in the BIOS

Software install

sudo apt install \
  clevis \
 clevis-luks \
#!/usr/bin/env python3
# This script walks block storage devices and locates
# EC2 instance stores. It then lables the disks as
# LMV2 physical volumes (PV), creates an LVM2 volume
# group (VG), then an LVM2 logical volume (LV) and
# finally formats the new LV as XFS.
rmrfslashbin /
Last active December 29, 2020 00:34
ESLint fix-on-save for VSCode

ESLint fix-on-save for VSCode

This brief guide will enable fix-on-save in VScode for js and vue files.

Install ESLint

ESLint needs to be installed twice: once inside your project and once globally.

# Install globally
$ npm install -g eslint

# Install in project
rmrfslashbin /
Created October 3, 2019 01:04
Convert a string to hex
#!/usr/bin/env python
import binascii
def getHex(string):
x = binascii.hexlify(string.encode())
y = str(x,'ascii')
print("hex ", y)