Skip to content

Instantly share code, notes, and snippets.

View brentkirby's full-sized avatar

Brent Kirby brentkirby

View GitHub Profile
@jperry
jperry / remote_authenticatable.rb
Last active February 8, 2023 15:48
Devise and warden remote authentication
module Devise
module Models
module RemoteAuthenticatable
extend ActiveSupport::Concern
#
# Here you do the request to the external webservice
#
# If the authentication is successful you should return
# a resource instance
@matiaskorhonen
matiaskorhonen / sign-pdf.rb
Last active March 21, 2025 02:34
Quick and dirty PDF signing in Ruby (using Origami)
#!/usr/bin/env ruby
require "openssl"
require "time"
begin
require "origami"
rescue LoadError
abort "origami not installed: gem install origami"
end
@AshvinGudaliya
AshvinGudaliya / AGAudioRecorder.swift
Last active June 2, 2023 08:21
Simple Audio recorder and player in swift 4
//
// AGAudioRecorder.swift
// BaseProject
//
// Created by AshvinGudaliya on 17/09/18.
// Copyright © 2018 AshvinGudaliya. All rights reserved.
//
import UIKit
import AVFoundation
@martijn
martijn / Dockerfile
Created January 26, 2021 12:09
Ruby on Rails deployment Dockerfile
# This multi-stage Dockerfile will use the full ruby image during build phase
# after this it wil build the deployment image based on the slim ruby container,
# copying over all artifacts from the build phase.
#
# The deployer image will not include a Javascript runtime and will come in at
# under 200MB for an average Rails application.
ARG BUILDER_FROM_IMAGE=ruby:3.0
ARG DEPLOY_FROM_IMAGE=ruby:3.0-slim
ARG NODE_VERSION 14.15.4