Skip to content

Instantly share code, notes, and snippets.

View rrichards's full-sized avatar
💭
Rocking the CLI

Ryan Richards rrichards

💭
Rocking the CLI
  • R3 Technologies, Inc.
  • Edmond, OK
  • 16:48 (UTC -12:00)
  • X @rrichards
View GitHub Profile
@rrichards
rrichards / ffmpeg.md
Created March 23, 2025 13:47 — forked from liangfu/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@rrichards
rrichards / github-action-ssh.md
Created March 17, 2025 18:34 — forked from raviagheda/github-action-ssh.md
Github Action with EC2 using SSH
@rrichards
rrichards / .dockerignore
Last active March 11, 2025 15:42 — forked from yizeng/.dockerignore
An example .dockerignore file for Rails
.git
.gitignore
# Created by https://www.gitignore.io/api/git,ruby,rails,jetbrains+all
# Edit at https://www.gitignore.io/?templates=git,ruby,rails,jetbrains+all
### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig
@rrichards
rrichards / .dockerignore
Created March 11, 2025 15:42 — forked from yizeng/.dockerignore
An example .dockerignore file for Rails
.git
.gitignore
# Created by https://www.gitignore.io/api/git,ruby,rails,jetbrains+all
# Edit at https://www.gitignore.io/?templates=git,ruby,rails,jetbrains+all
### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig
@rrichards
rrichards / Dockerfile
Created March 11, 2025 14:48 — forked from yves-vogl/Dockerfile
Sample of multistage Dockerfile for Rails app in production
FROM madnight/docker-alpine-wkhtmltopdf as wkhtmltopdf_savior
# STAGE for bundle & yarn install
FROM ruby:2.4.3-alpine3.7 as builder
ENV CA_CERTS_PATH /etc/ssl/certs/
ENV RAILS_ENV production
ENV RAILS_LOG_TO_STDOUT true
ENV RAILS_SERVE_STATIC_FILES true
@rrichards
rrichards / .Dockerfile
Created March 10, 2025 21:21 — forked from kinoute/.Dockerfile
Example of Ruby on Rails 6 Multi-stage builds with Docker. Development/production environments share the same Dockerfile.
FROM ruby:2.7.1-slim AS base
LABEL maintainer="Yann Defretin <[email protected]"
# Common dependencies
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq \
--no-install-recommends \
build-essential=12.6 \
gnupg2=2.2.12-1+deb10u1 \
@rrichards
rrichards / ec2-spot-github-self-hosted-runners.md
Created February 28, 2025 15:45 — forked from terma/ec2-spot-github-self-hosted-runners.md
AWS EC2 Spot Instances for GitHub Self-hosted runners

AWS EC2 Spot Instances for GitHub Self-hosted runners

Below CloudFormation stack which runs GitHub Self-hosted runners on EC2 Spot Instances managed by AutoScalingGroup. It automatically register new instances as self-hosted runners and removes them when Spot is interrupted.

How to use?

  1. Download YML below into file
  2. Create AWS CloudFormation stack
    • Provide values for parameters
  • If you need to install smt in UserData fill stack parameter AdditionalUserData
@rrichards
rrichards / nginx-https-local.md
Created February 27, 2025 08:08 — forked from mehmetsefabalik/nginx-https-local.md
Enable https on your local environment with nginx

enable https on your local environment

install mkcert and create certificates

brew install mkcert
mkcert -install
@rrichards
rrichards / vpc-inside.py
Created November 12, 2024 18:17 — forked from alonlavian/vpc-inside.py
Describe resources inside an AWS VPC
import logging
import boto3
from argparse import ArgumentParser, HelpFormatter
from botocore.exceptions import ClientError, ProfileNotFound
# logger config
logger = logging.getLogger()
logging.basicConfig(level=logging.INFO,
format='%(message)s')
@rrichards
rrichards / docker-compose.yml
Created May 9, 2024 15:14 — forked from ju2wheels/docker-compose.yml
docker-compose reference YAML file with comments
# https://docs.docker.com/compose/yml/
# Each service defined in docker-compose.yml must specify exactly one of
# image or build. Other keys are optional, and are analogous to their
# docker run command-line counterparts.
#
# As with docker run, options specified in the Dockerfile (e.g., CMD,
# EXPOSE, VOLUME, ENV) are respected by default - you don't need to
# specify them again in docker-compose.yml.
#
service_name: