Skip to content

Instantly share code, notes, and snippets.

# 2c7f00643f730285d05ed64f460ad075
export ZSH="/Users/ryanj/.oh-my-zsh"
# ZSH_THEME="robbyrussell"
# ZSH_THEME="gentoo"
ZSH_THEME="dieter"
# CASE_SENSITIVE="true"
# HYPHEN_INSENSITIVE="true"
@ryanjohnston
ryanjohnston / fixed-image-backgrounds.markdown
Created October 16, 2019 17:04
Fixed image backgrounds

Connect to Serverless RDS from an EC2 Instance.

Note: Both the EC2 Instance and the Serverless RDS cluster must be in the same AWS Virtual Private Cloud (VPC) for this to work*

For this example, new EC2 instances are deployed in the 'VPC Security' group. AWS Serverless RDS setup the other security group when the database was created. Follow these steps to allow your EC2 instances to connect directly to the Serverless RDS cluster.

Change the following sample ID's to match your AWS setup

brew cask install openconnect-gui
chmod 600 example_rsa
@ryanjohnston
ryanjohnston / aws-change-profile.md
Last active September 3, 2019 11:24
[aws-cli] Code Samples
export AWS_PROFILE=amplifydev2
@ryanjohnston
ryanjohnston / backblaze b2 backup script
Created April 21, 2019 15:24 — forked from AlexanderProd/backblaze b2 backup script
Backup script for backblaze working with backlaze b2 command line tool
#!/usr/bin/env bash
#
# Backup selected directories to a Backblaze B2 bucket
#
# If youre encountering errors running the script you probably need Bash 4.0
#
# You need to login to your b2 account once with b2 authorize-account [<accountId>] [<applicationKey>] before running it.
#
# Example daily cron running script.sh in home directory:
# @daily /usr/local/bin/bash ~/script.sh
// ==UserScript==
// @name SOJM
// @namespace salembeats
// @version 2.11
// @description Compare your earnings to the crowd, to tell whether it's "Slow, Or Just Me?"
// @author Cuyler Stuwe (salembeats)
// @include https://worker.mturk.com/dashboard*
// @grant GM_info
// ==/UserScript==
@ryanjohnston
ryanjohnston / class-decorators.js
Last active September 10, 2018 14:10
[🛠 TypeScript - Snippets] Snippets, Gists and Workflows on working with Typescript #dev
/**
* See original for discussion and updates:
* https://gist.github.com/remojansen/16c661a7afd68e22ac6e
*/
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
@ryanjohnston
ryanjohnston / duckdns.sh
Created September 9, 2018 18:45
[Docker - Servers] Collection of scripts used to launch Docker server resources
#!/usr/bin/env bash
#
# Free dynamic DNS service
#
# Requires the following global values to be defined elsewhere:
#
# DUCKDNS_TOKEN - Get this from your account page at DuckDNS.
# PGID - Your users GID
# PUID - Your users UID
# SUBDOMAINS - Get this from your account page at DuckDNS.