Skip to content

Instantly share code, notes, and snippets.

@claudiug
claudiug / ruby31onrails.md
Created December 26, 2021 10:37 — forked from yahonda/ruby31onrails.md
Ruby 3.1 on Rails

Ruby 3.1 on Rails

Actions required to use Ruby 3.1.0 with Rails

Rails 7.0.Z

  • Rails 7.0.0 is not compatible with Ruby 3.1.0.
  • "Rails::Engine is abstract, you cannot instantiate it directly.."
    $ bin/rails s
    Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.

[WARNING] Could not load command "rails/commands/server/server_command". Error: Rails::Engine is abstract, you cannot instantiate it directly..

@WagnerMatos
WagnerMatos / .rubocop.yml
Created May 9, 2019 14:10 — forked from jhass/.rubocop.yml
My preferred Rubocop config
AllCops:
RunRailsCops: true
# Commonly used screens these days easily fit more than 80 characters.
Metrics/LineLength:
Max: 120
# Too short methods lead to extraction of single-use methods, which can make
# the code easier to read (by naming things), but can also clutter the class
Metrics/MethodLength:
@mrmartineau
mrmartineau / stimulus.md
Last active April 19, 2024 09:41
Stimulus cheatsheet
@WagnerMatos
WagnerMatos / syncFilesystemToImage.sh
Created June 27, 2017 20:28 — forked from geoffreyanderson/syncFilesystemToImage.sh
A script to rsync a running Linux OS to an image file (specifically, a 10GB image file for deployment to AWS EC2).
#!/bin/bash
# Run this script on a running Linux OS that you want to be put into an image file.
# Ensure that the system you run this on is less than 10GB in size if you wish to
# deploy the image file to AWS EC2.
# Note: This is based on Michael Fairchild's instance-to-ebs-ami.sh script.
# -https://gist.github.com/249915
imageFile=${1:-"awsImage-$(date +%m%d%y-%H%M).img"}
imageMountPoint=${2:-'/mnt/image'}
extraFilesArchive=${3:-'awsInstanceFiles.tar.gz'}
@WagnerMatos
WagnerMatos / Procfile
Created September 15, 2016 20:13 — forked from david-meza/Procfile
Heroku node.js buildpack
web: node server.js
@jeffdeville
jeffdeville / 0002_sidekiq_initial.config
Created June 24, 2016 17:59
ElasticBeanstalk Sidekiq configuration
---
restart_sidekiq: &RESTART_SIDEKIQ
mode: "000755"
content: |
#!/bin/bash
initctl restart sidekiq || initctl start sidekiq
ln -sf /var/app/current/log/sidekiq.log /var/app/containerfiles/logs/sidekiq.log
mute_sidekiq: &MUTE_SIDEKIQ
mode: "000755"
content: |
@david-meza
david-meza / Procfile
Created January 4, 2016 04:38
Heroku node.js buildpack
web: node server.js
@chrismdp
chrismdp / s3.sh
Last active March 5, 2024 12:57
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@drkarl
drkarl / gist:739a864b3275e901d317
Last active October 17, 2023 10:43
Ask HN: Best Linux server backup system?

Linux Backup Solutions

I've been looking for the best Linux backup system, and also reading lots of HN comments.

Instead of putting pros and cons of every backup system I'll just list some deal-breakers which would disqualify them.

Also I would like that you, the HN community, would add more deal breakers for these or other backup systems if you know some more and at the same time, if you have data to disprove some of the deal-breakers listed here (benchmarks, info about something being true for older releases but is fixed on newer releases), please share it so that I can edit this list accordingly.

  • It has a lot of management overhead and that's a problem if you don't have time for a full time backup administrator.
@balos1
balos1 / Geofield_Customizing.md
Last active February 29, 2016 14:44
Drupal Geofield Module Customizing

Geofield Customizer Module

This is an exmaple of custom Drupal module that modifies portions of the [Geofield module][1].

Current Features

  1. Alter [Geofield][1] exposed filter
    • Change distance textfield to select box
  • Default unit to miles and hide the unit selector