Skip to content

Instantly share code, notes, and snippets.

View RyanSquared's full-sized avatar

Ryan RyanSquared

View GitHub Profile
@RyanSquared
RyanSquared / scrape
Last active November 3, 2022 17:39
Capturing optionally ANSI colored output of commands
#!/bin/zsh
output="$1"
if [ "$MODE" = "internal-run-command" ]; then
shift
# Run the command
"$@"
# Capture the output, removing empty lines from the end of the file.
@RyanSquared
RyanSquared / sigv2.md
Created February 15, 2022 22:03 — forked from lrvick/sigv2.md
Sig v2 Design
@RyanSquared
RyanSquared / README.md
Last active October 17, 2020 00:24
pgcrypto example case

this assumes you have Docker installed. if you don't, just run the .sql script against a clean pgsql instance.

i've included two PGP keys. one is called "working.asc", one is called "breaking.asc". the working one has a single UID, the breaking one has two UIDs. they are still one single key.

#!/bin/sh
set -e
# fat stax of hax
# expects files in Music~/<artist>/<album>/<song>-<song ID>.opus
# modify to your liking
cat > /dev/null <<LICENSE_BLOB
MIT License
#!/bin/bash
set -e
get_modtime() {
curl -qs https://hub.docker.com/v2/repositories/vandor2012/website/tags/ \
| jq -r '.results | map(select(.name == "latest")) | .[0].last_updated'
}
datetime_to_unix() {
date -d "$1" +%s
@RyanSquared
RyanSquared / death-potion.md
Created April 18, 2020 08:18
Death Potion

Death Potion

version: 0.1

  • 1.5lbs various sweet peppers
  • 1 habanero
  • 4-6 serranos
  • 1 mango
  • 1 orange
  • 1 lemon

Topic Ideas

  • Podcast introduction

    • Who we are, what we do, what we're striving for
    • Privacy
    • Security
    • Decentralization, self-reliance
  • Role of open source in self-driving automobile tech

  • nvidia's role in this? Are they still dicks?

#!/bin/bash
set -eufo pipefail
user="$1"
logger "Handling user login $user"
psql "postgresql://ssh_auth:sheiJoh9chei7eezae9v@userdb-attempt-too-do-user-989073-0.db.ondigitalocean.com:25060/userdb?sslmode=require" \
-t --pset border=0 \
@RyanSquared
RyanSquared / ansible.cfg
Created April 16, 2018 19:58
Ansible stuffs
[defaults]
inventory = ./hosts
[package]
name = "testingstuffs"
version = "0.1.0"
authors = ["Ryan"]
[features]
debug = []
[dependencies]
pest = "~1.0"