Skip to content

Instantly share code, notes, and snippets.

View RyanSquared's full-sized avatar

Ryan RyanSquared

View GitHub Profile
@RyanSquared
RyanSquared / Dockerfile
Last active October 15, 2025 01:02
Can't cross compile to GNU, run on Debian
ARG PROFILE
ARG CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu
FROM stagex/pallet-rust@sha256:740b9ed5f2a897d45cafdc806976d84231aa50a64998610750b42a48f8daacab AS pallet-rust
FROM stagex/core-cross-x86_64-gnu-gcc@sha256:88a885049fddb21b48511d36b65d944322f3edfb699e95f1876b6ded8aa91da4 AS cross-x86_64-gnu-gcc
FROM stagex/core-cross-x86_64-gnu-rust@sha256:12d60727f597a67a5ca8ec95c3ec7a6df13c516df30d1d98b4296308f430b1e1 AS cross-x86_64-gnu-rust
FROM stagex/core-cross-x86_64-gnu-libunwind@sha256:3a5a3e2049d56830164b2677df8d96a1081209a6ff59ccecd5c743f69ae5008e AS cross-x86_64-gnu-libunwind
FROM stagex/core-clang@sha256:abf6d2868bc441b5910ef28f38123c6053391521948b33eaf68980fb8be7d105 AS clang
FROM stagex/core-llvm@sha256:bc1c6d67aa73a96dd92f5def7e2701de78b0639d0c815d69110fbb9b3b3e85fe AS llvm
FROM stagex/core-lld@sha256:a5cb61edc071d404cd33cb0b5c7113a334cb90ca203cb40fe6cafd3559b6daa5 AS lld
@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