Skip to content

Instantly share code, notes, and snippets.

View StanlyShauro's full-sized avatar

Stanley Shauto StanlyShauro

View GitHub Profile
@MichalAdorno
MichalAdorno / docker-compose.yml
Created November 1, 2019 15:31 — forked from zhunik/docker-compose.yml
docker-compose Postgres health-check
version: "3"
services:
postgress:
....
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
app:
@cdesch
cdesch / rails_generator_cheat_sheet.md
Last active May 15, 2024 13:40
Rails Generator CheatSheet

Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.

Command Line Generator Info

Reference

You can get all of this information on the command line.

rails generate with no generator name will output a list of all available generators and some information about global options. rails generate GENERATOR --help will list the options that can be passed to the specified generator.

@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active July 23, 2024 14:51
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@evadne
evadne / 0_CONTRIBUTORS.md
Last active July 14, 2023 12:52
RVM + MRI + Capistrano + Puma + Sidekiq
  • Josh Goebel (@yyyc514): suggested lazy evaluation on set
@umate
umate / image_uploader.rb
Last active December 3, 2023 03:05
CarrierWave gaussian blur filter using MiniMagick
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
version :blurred do
process :blur
end
def blur(radius=16)
manipulate! do |img|
original_path = img.path