Skip to content

Instantly share code, notes, and snippets.

View rsp2k's full-sized avatar

Ryan Malloy rsp2k

View GitHub Profile
@jamesmishra
jamesmishra / README.md
Last active February 18, 2025 04:52
Using Terraform to run a docker-compose.yml file directly on an Amazon EC2

Introduction

This is a Hashicorp Terraform module that provisions an AWS EC2 instance for the purpose of running a given docker-compose.yml file.

Usage

# ===== OUR MAGIC DOCKER-COMPOSE.YML FILE HERE =====
# It is also possible to get Terraform to read an external `docker-compose.yml`
# file and load it into this variable.
# We'll be showing off a demo nginx page.
@ixs
ixs / cimc-certgen.sh
Last active October 23, 2024 10:55
Cisco UCS CIMC/IMC Certificate Generator
#!/bin/bash
set -euo pipefail
#
# Use the Cisco IMC XML Interface to generate a CSR, use dehydrated to
# have this signed and upload the resulting cert back to the IMC.
# This script requires a working dehydrated setup, preferably using the
# DNS-01 ACME protocol.
#
@narenst
narenst / quota.py
Created August 13, 2019 19:00
programmatically view and increase aws quota using boto3
import argparse
import boto3
def get_value_for_quota_name(quotas, quota_name):
for quota in quotas:
if quota['QuotaName'] == quota_name:
return quota['Value'], quota['QuotaCode']
return None, None
@meain
meain / loading_messages.js
Last active April 12, 2025 00:24
Funny loading messages
export default [
"Reticulating splines...",
"Generating witty dialog...",
"Swapping time and space...",
"Spinning violently around the y-axis...",
"Tokenizing real life...",
"Bending the spoon...",
"Filtering morale...",
"Don't think of purple hippos...",
"We need a new fuse...",
@slav0nic
slav0nic / custom_views.py
Created September 5, 2016 12:03
Django oscar authoprize.net backend
from django.db import transaction
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from django.views.generic import DeleteView
from oscar.core.loading import get_model
from apps.oscar_authorize.facade import Facade
@tylermakin
tylermakin / Multipart MIME Email.md
Last active December 17, 2024 13:32
Multipart MIME Email Guide

Multipart MIME Email Guide

This is a guide on how to send a properly formatted multipart email. Multipart email strings are MIME encoded, raw text email templates. This method of structuring an email allows for multiple versions of the same email to support different email clients.

// Example Multipart Email:
From: [email protected]
To: [email protected]
Subject: Multipart Email Example
Content-Type: multipart/alternative; boundary="boundary-string"
@shmup
shmup / torrents.md
Last active May 7, 2025 17:50
transmission blocklist guide

Transmission Blocklist

The Transmission torrent client has an option to set a Blocklist, which helps protect you from getting caught and having the DMCA send a letter/email.

It's as simple as downloading and installing the latest client:

@squadbox
squadbox / cool_gpu2.sh
Last active October 20, 2024 09:32
A script to control Nvidia GPU fan speed on headless (non-X) linux nodes
#!/bin/bash
# cool_gpu2.sh This script will enable or disable fixed gpu fan speed
#
# Description: A script to control GPU fan speed on headless (non-X) linux nodes
# Original Script by Axel Kohlmeyer <[email protected]>
# https://sites.google.com/site/akohlmey/random-hacks/nvidia-gpu-coolness
#
# Modified for newer drivers and removed old work-arounds